5 # Run if pacemaker is running, we're the bootstrap node,
6 # and we're updating the deployment (not creating).
8 RESTART_FOLDER="/var/lib/tripleo/pacemaker-restarts"
10 if [[ -d "$RESTART_FOLDER" && -n $(pcmk_running) && -n $(is_bootstrap_node) ]]; then
13 PCS_STATUS_OUTPUT="$(pcs status)"
14 SERVICES_TO_RESTART="$(ls $RESTART_FOLDER)"
16 for service in $SERVICES_TO_RESTART; do
17 if ! echo "$PCS_STATUS_OUTPUT" | grep $service; then
18 echo "Service $service not found as a pacemaker resource, cannot restart it."
23 for service in $SERVICES_TO_RESTART; do
24 echo "Restarting $service..."
25 pcs resource restart --wait=$TIMEOUT $service
26 rm -f "$RESTART_FOLDER"/$service
31 if [ $(systemctl is-active haproxy) = "active" ]; then
32 systemctl reload haproxy