diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-10-16 17:52:32 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-10-16 17:52:32 +0000 |
commit | 0f2bf59910639c62442aa3a1266ea4e67d76d25a (patch) | |
tree | 13f3d50ea16ad920e73ddbbffc477ba6810bd62a /extraconfig/tasks/yum_update.sh | |
parent | 4fc272c30ae43e5c5866c057870752aa3f835965 (diff) | |
parent | 77e8ec22a9cfa05c11a8654ce3a02c1bb3b4578f (diff) |
Merge "Force stop a single node pacemaker on yum update"
Diffstat (limited to 'extraconfig/tasks/yum_update.sh')
-rwxr-xr-x | extraconfig/tasks/yum_update.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/extraconfig/tasks/yum_update.sh b/extraconfig/tasks/yum_update.sh index eaeb7ef0..9125ca07 100755 --- a/extraconfig/tasks/yum_update.sh +++ b/extraconfig/tasks/yum_update.sh @@ -44,7 +44,13 @@ pacemaker_status=$(systemctl is-active pacemaker) if [[ "$pacemaker_status" == "active" ]] ; then echo "Pacemaker running, stopping cluster node and doing full package update" - pcs cluster stop + node_count=$(pcs status xml | grep -o "<nodes_configured.*/>" | grep -o 'number="[0-9]*"' | grep -o "[0-9]*") + if [[ "$node_count" == "1" ]] ; then + echo "Active node count is 1, stopping node with --force" + pcs cluster stop --force + else + pcs cluster stop + fi else echo "Excluding upgrading packages that are handled by config management tooling" command_arguments="$command_arguments --skip-broken" |