Merge "Drop bootstrap_host_exec from pacemaker_restart_bundle" into stable/train

This commit is contained in:
Zuul 2020-08-20 22:41:33 +00:00 committed by Gerrit Code Review
commit f34a2be238
1 changed files with 9 additions and 2 deletions

View File

@ -36,8 +36,15 @@ if [ x"${TRIPLEO_MINOR_UPDATE,,}" != x"true" ]; then
# have been updated on all nodes. So we need to run pcs only # have been updated on all nodes. So we need to run pcs only
# once (e.g. on the service's boostrap node). # once (e.g. on the service's boostrap node).
if bundle_can_be_restarted ${BUNDLE_NAME}; then if bundle_can_be_restarted ${BUNDLE_NAME}; then
echo "$(date -u): Restarting ${BUNDLE_NAME} globally" HOSTNAME=$(/bin/hostname -s)
/usr/bin/bootstrap_host_exec $TRIPLEO_SERVICE /sbin/pcs resource restart --wait=__PCMKTIMEOUT__ $BUNDLE_NAME SERVICE_NODEID=$(/bin/hiera -c /etc/puppet/hiera.yaml "${TRIPLEO_SERVICE}_short_bootstrap_node_name")
if [[ "${HOSTNAME,,}" == "${SERVICE_NODEID,,}" ]]; then
echo "$(date -u): Restarting ${BUNDLE_NAME} globally"
/sbin/pcs resource restart --wait=__PCMKTIMEOUT__ $BUNDLE_NAME
else
echo "$(date -u): Skipping global restart of ${BUNDLE_NAME} on ${HOSTNAME} it will be restarted by node ${SERVICE_NODEID}"
fi
else else
echo "$(date -u): No global restart needed for ${BUNDLE_NAME}." echo "$(date -u): No global restart needed for ${BUNDLE_NAME}."
fi fi