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
(cherry picked from commit 7ce217909a
)
This commit is contained in:
parent
e25bc9e468
commit
64e2cc66d3
|
@ -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
|
||||
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
|
||||
if [[ -n $(is_bootstrap_node) ]]; then
|
||||
|
@ -181,9 +183,11 @@ 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 [[ -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
|
||||
crudini --set /etc/nova/nova.conf upgrade_levels compute "$upgrade_level_nova_compute"
|
||||
|
|
Loading…
Reference in New Issue