summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-06-29 13:17:10 +0000
committerGerrit Code Review <review@openstack.org>2016-06-29 13:17:10 +0000
commit9878997b6e84ba68d1e966d61957062ae592ccd8 (patch)
treef28ce539d59618c8e90143c16608723bb8b8c64a
parent749d24ec9d6d6c3d0198a287bd7adebca263d7b3 (diff)
parent257855082abd78ac81407b8b11f8325fab649e8c (diff)
Merge "Disable stonith temporarily during upgrades"
-rwxr-xr-xextraconfig/tasks/major_upgrade_controller_pacemaker_1.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh b/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh
index f5399222..72bb81f5 100755
--- a/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh
+++ b/extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh
@@ -9,6 +9,14 @@ if pcs status 2>&1 | grep -E '(cluster is not currently running)|(OFFLINE:)'; th
exit 1
fi
+
+# We want to disable fencing during the cluster --stop as it might fence
+# 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 [ "$(hiera -c /etc/puppet/hiera.yaml bootstrap_nodeid)" = "$(facter hostname)" ]; then
pcs resource disable httpd
check_resource httpd stopped 1800
@@ -49,6 +57,12 @@ done
yum -y install python-zaqarclient # needed for os-collect-config
yum -y -q update
+
+# 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
+fi
+
# Pin messages sent to compute nodes to kilo, these will be upgraded later
crudini --set /etc/nova/nova.conf upgrade_levels compute "$upgrade_level_nova_compute"
# https://bugzilla.redhat.com/show_bug.cgi?id=1284047