5 # Run if pacemaker is running, we're the bootstrap node,
6 # and we're updating the deployment (not creating).
7 if [[ -n $(pcmk_running) && -n $(is_bootstrap_node) ]]; then
10 SERVICES_TO_RESTART="$(ls /var/lib/tripleo/pacemaker-restarts)"
11 PCS_STATUS_OUTPUT="$(pcs status)"
13 for service in $SERVICES_TO_RESTART; do
14 if ! echo "$PCS_STATUS_OUTPUT" | grep $service; then
15 echo "Service $service not found as a pacemaker resource, cannot restart it."
20 for service in $SERVICES_TO_RESTART; do
21 echo "Restarting $service..."
22 pcs resource restart --wait=$TIMEOUT $service
23 rm -f /var/lib/tripleo/pacemaker-restarts/$service