diff options
author | Jenkins <jenkins@review.openstack.org> | 2016-10-25 14:38:50 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2016-10-25 14:38:50 +0000 |
commit | ab00d9393b1d1b3a4eceb81135b0e816791e190f (patch) | |
tree | 3906200eac520c1c6ba4df706dc6d1768a93cd79 /extraconfig/tasks | |
parent | 38664900523ae0cdd346d4c66395b8fd0184b03a (diff) | |
parent | 7ce217909ab0ef1492e20cfc44470aeeaec3a791 (diff) |
Merge "Fix the stonith property during upgrades"
Diffstat (limited to 'extraconfig/tasks')
-rwxr-xr-x | extraconfig/tasks/major_upgrade_controller_pacemaker_1.sh | 12 |
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 2690ee64..4a10fa7e 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 @@ -185,8 +187,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 |