aboutsummaryrefslogtreecommitdiffstats
path: root/extraconfig
diff options
context:
space:
mode:
authorJames Slagle <jslagle@redhat.com>2015-11-11 15:54:25 -0500
committerJames Slagle <jslagle@redhat.com>2015-11-17 11:27:16 -0500
commitfe87f5bb6b748d54f9829fb4f7cb5431a832c406 (patch)
tree4ca26a272e0d1c509607ab7200dd61318be26c21 /extraconfig
parent49be1648bd937c9901d87c17d527c374ebbc24a2 (diff)
Verify galera is sync'd in yum_update.sh
When the cluster is brought back online after a yum update in yum_update.sh, we should verify that galera is fully sync'd before moving on. This ensures the sync is complete before moving on to update any other nodes in the cluster. Change-Id: Ie8fc2c5d5214deacea94ca658ac75359b318ced1
Diffstat (limited to 'extraconfig')
-rwxr-xr-xextraconfig/tasks/yum_update.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/extraconfig/tasks/yum_update.sh b/extraconfig/tasks/yum_update.sh
index 3ba13f23..fa523e83 100755
--- a/extraconfig/tasks/yum_update.sh
+++ b/extraconfig/tasks/yum_update.sh
@@ -23,6 +23,7 @@ update_identifier=${update_identifier//[^a-zA-Z0-9-_]/}
# seconds to wait for this node to rejoin the cluster after update
cluster_start_timeout=360
+galera_sync_timeout=360
timestamp_file="$timestamp_dir/$update_identifier"
if [[ -a "$timestamp_file" ]]; then
@@ -185,6 +186,17 @@ if [[ "$pacemaker_status" == "active" ]] ; then
exit 1
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
+
pcs status
else