X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=extraconfig%2Ftasks%2Fpacemaker_resource_restart.sh;h=3da7efec45daf259d942f398075202cfd9d40030;hb=2f5fa1ccba61ca85e98e2f8bed641f9f9608ddca;hp=fd1fd0dc73bd36b7199974be00c8f90582147c4f;hpb=26b56d0e9a76b00b4c87fe394dbdf54fd6a8d3b5;p=apex-tripleo-heat-templates.git 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