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

This commit is contained in:
Zuul 2020-08-23 09:11:10 +00:00 committed by Gerrit Code Review
commit 80d36e645c
1 changed files with 4 additions and 2 deletions

View File

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