From 4417ffbfab77efd67eafe0d5ed57263c6a1b796c Mon Sep 17 00:00:00 2001 From: Jeffrey Zhang Date: Mon, 7 Nov 2016 19:12:33 +0800 Subject: [PATCH] Wait the wsrep_ready to be ON in mariadb Mariadb galera will be ready only when wsrep_ready to be ON, rather then wsrep_cluster_status is equal to Primary. Closes-Bug: #1639838 Change-Id: I9ef60a39a195057eeee0404a39b174cc8feed793 --- docker/mariadb/extend_start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/mariadb/extend_start.sh b/docker/mariadb/extend_start.sh index d0a42825e3..8e6be1a1e4 100644 --- a/docker/mariadb/extend_start.sh +++ b/docker/mariadb/extend_start.sh @@ -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