Merge "Wait the wsrep_ready to be ON in mariadb"

This commit is contained in:
Jenkins 2016-11-11 17:09:34 +00:00 committed by Gerrit Code Review
commit 9099b8be4d

View File

@ -19,7 +19,7 @@ function bootstrap_db {
# NOTE(sbezverk): Currently kolla-kubernetes does not use Galera and disables wsrep driver.
# This check will run only for non kolla-kubernetes bootstrap deployments.
if [[ ! "${!KOLLA_KUBERNETES[@]}" ]]; then
CLUSTER_READY=$(mysql -u root --exec="SHOW STATUS LIKE 'wsrep_cluster_status'" | grep Primary)
CLUSTER_READY=$(mysql -u root --exec="SHOW STATUS LIKE 'wsrep_ready'" | grep ON)
TIMEOUT=${DB_MAX_TIMEOUT:-60}
while [[ -z "${CLUSTER_READY}" ]]; do
if [[ ${TIMEOUT} -gt 0 ]]; then