check mariadb galera status in every loop.
in extend_start.sh, if Mariadb galera is not ready at first time, it will sleep 60s and then exit 1. we should check it`s status every time in the loop. Change-Id: I89174969687eecbf467ca3cad9aad1bfbfb8c4fe Closes-Bug: #1676316
This commit is contained in:
parent
464ca08bfe
commit
f1d143128e
@ -22,6 +22,7 @@ function bootstrap_db {
|
||||
CLUSTER_READY=$(mysql -u root --exec="SHOW STATUS LIKE 'wsrep_ready'" | grep ON)
|
||||
TIMEOUT=${DB_MAX_TIMEOUT:-60}
|
||||
while [[ -z "${CLUSTER_READY}" ]]; do
|
||||
CLUSTER_READY=$(mysql -u root --exec="SHOW STATUS LIKE 'wsrep_ready'" | grep ON)
|
||||
if [[ ${TIMEOUT} -gt 0 ]]; then
|
||||
let TIMEOUT-=1
|
||||
sleep 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user