diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-03-31 03:23:12 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-03-31 03:23:12 +0000 |
commit | 495754e2cb739f15678227c4f6de1227f6a5e059 (patch) | |
tree | ca26ce6f3ac2d84eec341a9086eb70815a8f0b74 | |
parent | b03099182ce4c444f6cfdaf86e47b090108bb83d (diff) | |
parent | 129734a1bccb4bc444dc054eef0098e66d525fb2 (diff) |
Merge "Run cluster check on nodes configured in wsrep_cluster_address." into stable/ocata
-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 |