Skip to content
Snippets Groups Projects
Commit 4417ffbf authored by Jeffrey Zhang's avatar Jeffrey Zhang Committed by Jeffrey Zhang
Browse files

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
parent 2e01ce50
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment