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
This commit is contained in:
parent
2e01ce50f5
commit
4417ffbfab
@ -19,7 +19,7 @@ function bootstrap_db {
|
|||||||
# NOTE(sbezverk): Currently kolla-kubernetes does not use Galera and disables wsrep driver.
|
# NOTE(sbezverk): Currently kolla-kubernetes does not use Galera and disables wsrep driver.
|
||||||
# This check will run only for non kolla-kubernetes bootstrap deployments.
|
# This check will run only for non kolla-kubernetes bootstrap deployments.
|
||||||
if [[ ! "${!KOLLA_KUBERNETES[@]}" ]]; then
|
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}
|
TIMEOUT=${DB_MAX_TIMEOUT:-60}
|
||||||
while [[ -z "${CLUSTER_READY}" ]]; do
|
while [[ -z "${CLUSTER_READY}" ]]; do
|
||||||
if [[ ${TIMEOUT} -gt 0 ]]; then
|
if [[ ${TIMEOUT} -gt 0 ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user