Browse Source

Merge "Fix pcs restart in composable HA" into stable/train

changes/81/739481/8
Zuul 12 months ago
committed by Gerrit Code Review
parent
commit
80d36e645c
  1. 6
      container_config_scripts/pacemaker_restart_bundle.sh

6
container_config_scripts/pacemaker_restart_bundle.sh

@ -41,8 +41,10 @@ if [ x"${TRIPLEO_MINOR_UPDATE,,}" != x"true" ]; then
if [[ "${HOSTNAME,,}" == "${SERVICE_NODEID,,}" ]]; then
replicas_running=$(crm_resource -Q -r $BUNDLE_NAME --locate 2>&1 | wc -l)
if [ "$replicas_running" != "0" ]; then
echo "$(date -u): Restarting ${BUNDLE_NAME} globally"
/sbin/pcs resource restart --wait=__PCMKTIMEOUT__ $BUNDLE_NAME
echo "$(date -u): Restarting ${BUNDLE_NAME} globally. Stopping:"
/sbin/pcs resource disable --wait=__PCMKTIMEOUT__ $BUNDLE_NAME
echo "$(date -u): Restarting ${BUNDLE_NAME} globally. Starting:"
/sbin/pcs resource enable --wait=__PCMKTIMEOUT__ $BUNDLE_NAME
else
echo "$(date -u): ${BUNDLE_NAME} is not running anywhere," \
"cleaning up to restart it globally if necessary"

Loading…
Cancel
Save