diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-03-30 09:03:54 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-03-30 09:03:54 +0000 |
commit | d95674dc708e2d4c6e03136154d7ccf3d3380574 (patch) | |
tree | 4790a12961023c15efa1f14db6cebba087030494 | |
parent | ebf1d47b71e629344ee91910d81f6ca433bbec27 (diff) | |
parent | d39c952fd3150d24c9e01c15806181715d0760f8 (diff) |
Merge "Run cluster check on nodes configured in wsrep_cluster_address."
-rwxr-xr-x | extraconfig/tasks/yum_update.sh | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/extraconfig/tasks/yum_update.sh b/extraconfig/tasks/yum_update.sh index 3bf72f14..d3d38114 100755 --- a/extraconfig/tasks/yum_update.sh +++ b/extraconfig/tasks/yum_update.sh @@ -113,15 +113,19 @@ if [[ "$pacemaker_status" == "active" ]] ; then fi done - tstart=$(date +%s) - while ! clustercheck; do - sleep 5 - tnow=$(date +%s) - if (( tnow-tstart > galera_sync_timeout )) ; then - echo "ERROR galera sync timed out" - exit 1 - fi - done + RETVAL=$( pcs resource show galera-master | grep wsrep_cluster_address | grep -q `crm_node -n` ; echo $? ) + + if [[ $RETVAL -eq 0 && -e /etc/sysconfig/clustercheck ]]; then + tstart=$(date +%s) + while ! clustercheck; do + sleep 5 + tnow=$(date +%s) + if (( tnow-tstart > galera_sync_timeout )) ; then + echo "ERROR galera sync timed out" + exit 1 + fi + done + fi echo "Waiting for pacemaker cluster to settle" if ! timeout -k 10 $cluster_settle_timeout crm_resource --wait; then |