summaryrefslogtreecommitdiffstats
path: root/extraconfig/tasks/pacemaker_resource_restart.sh
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-09-17 17:28:53 +0000
committerGerrit Code Review <review@openstack.org>2016-09-17 17:28:53 +0000
commit1296dad97aa431a41acbd05a6a094822375e5de6 (patch)
treea1510eb0b6d6ad1f0d62bd7a16a0ed4dcf9c6385 /extraconfig/tasks/pacemaker_resource_restart.sh
parent109497552b557f8744d0033947ad43dfc8eccb70 (diff)
parentfb25385d34e604d2f670cebe3e03fd57c14fa6be (diff)
Merge "Rework the pacemaker_common_functions for M..N upgrades"
Diffstat (limited to 'extraconfig/tasks/pacemaker_resource_restart.sh')
-rwxr-xr-xextraconfig/tasks/pacemaker_resource_restart.sh6
1 files changed, 1 insertions, 5 deletions
diff --git a/extraconfig/tasks/pacemaker_resource_restart.sh b/extraconfig/tasks/pacemaker_resource_restart.sh
index fd1fd0dc..3da7efec 100755
--- a/extraconfig/tasks/pacemaker_resource_restart.sh
+++ b/extraconfig/tasks/pacemaker_resource_restart.sh
@@ -2,12 +2,9 @@
set -eux
-pacemaker_status=$(systemctl is-active pacemaker)
-
# Run if pacemaker is running, we're the bootstrap node,
# and we're updating the deployment (not creating).
-if [ "$pacemaker_status" = "active" -a \
- "$(hiera bootstrap_nodeid)" = "$(facter hostname)" ]; then
+if [[ -n $(pcmk_running) && -n $(is_bootstrap_node) ]]; then
TIMEOUT=600
SERVICES_TO_RESTART="$(ls /var/lib/tripleo/pacemaker-restarts)"
@@ -25,5 +22,4 @@ if [ "$pacemaker_status" = "active" -a \
pcs resource restart --wait=$TIMEOUT $service
rm -f /var/lib/tripleo/pacemaker-restarts/$service
done
-
fi