aboutsummaryrefslogtreecommitdiffstats
path: root/extraconfig
diff options
context:
space:
mode:
authorYurii Prokulevych <yprokule@redhat.com>2017-03-23 14:35:54 +0100
committerYurii Prokulevych <yprokule@redhat.com>2017-03-30 11:56:24 +0000
commit129734a1bccb4bc444dc054eef0098e66d525fb2 (patch)
tree60777316133f5cecb4d46fd6ec6397d8cfb16d76 /extraconfig
parent14335bd054b56ab6724fc01abf2fcf8f1b6c69f7 (diff)
Run cluster check on nodes configured in wsrep_cluster_address.
Attempt to check galera's cluster status fails when galera service is not running on the same node. Change-Id: I27fb0841d85cd0dc86e92ac2e21eedf5f8f863ab Closes-Bug: #1677574 (cherry picked from commit d39c952fd3150d24c9e01c15806181715d0760f8 )
Diffstat (limited to 'extraconfig')
-rwxr-xr-xextraconfig/tasks/yum_update.sh22
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