aboutsummaryrefslogtreecommitdiffstats
path: root/extraconfig
diff options
context:
space:
mode:
authorMichele Baldessari <michele@acksyn.org>2016-10-20 20:16:28 +0200
committerMichele Baldessari <michele@acksyn.org>2016-10-20 20:16:28 +0200
commit7ce217909ab0ef1492e20cfc44470aeeaec3a791 (patch)
tree460ef16456c0deb396c92b95cdf3b642d2081dbb /extraconfig
parent81aa47d3143bf58cffdb0bd9fbacfd0e05e195e4 (diff)
Fix the stonith property during upgrades
We currently set the stonith property from all controller nodes during upgrade. This is racy and can actually end up disabling stonith after the upgrade even if when it was enabled. Let's set the property only from the bootstrap node. Change-Id: Id4afb867b485ac853be874a0179a7ed7cc914068 Closes-Bug: #1635294
Diffstat (limited to 'extraconfig')
-rwxr-xr-xextraconfig/tasks/major_upgrade_controller_pacemaker_1.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh b/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh
index 23074fcb..71279d40 100755
--- a/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh
+++ b/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh
@@ -17,8 +17,10 @@ check_disk_for_mysql_dump
# nodes where a service fails to stop, which could be fatal during an upgrade
# procedure. So we remember the stonith state. If it was enabled we reenable it
# at the end of this script
-STONITH_STATE=$(pcs property show stonith-enabled | grep "stonith-enabled" | awk '{ print $2 }')
-pcs property set stonith-enabled=false
+if [[ -n $(is_bootstrap_node) ]]; then
+ STONITH_STATE=$(pcs property show stonith-enabled | grep "stonith-enabled" | awk '{ print $2 }')
+ pcs property set stonith-enabled=false
+fi
# Migrate to HA NG and fix up rabbitmq queues
# We fix up the rabbitmq ha queues after the migration because it will
@@ -170,8 +172,10 @@ if [ $DO_MYSQL_UPGRADE -eq 1 ]; then
fi
# Let's reset the stonith back to true if it was true, before starting the cluster
-if [ $STONITH_STATE == "true" ]; then
- pcs -f /var/lib/pacemaker/cib/cib.xml property set stonith-enabled=true
+if [[ -n $(is_bootstrap_node) ]]; then
+ if [ $STONITH_STATE == "true" ]; then
+ pcs -f /var/lib/pacemaker/cib/cib.xml property set stonith-enabled=true
+ fi
fi
# Pin messages sent to compute nodes to kilo, these will be upgraded later