[Newton-only] Enable services in the major-upgrade-pacemaker step

During the "major-upgrade-pacemaker" step we basically do the following:
1) For all the OSP9-mitaka pacemaker services we first delete any
constraints and then disable and then delete the pacemaker resource from
the cluster CIB https://github.com/openstack/tripleo-heat-templates/blob/stable/newton/extraconfig/tasks/major_upgrade_pacemaker_migrations.sh#L67-L99
2) We then update all packages via yum
3) Then we start all the services.

In 3) we do this:
for service in $services; do
    manage_systemd_service start "${service%%-clone}"
    check_resource_systemd "${service%%-clone}" started 600
done

We also want to explicitly enable the service so that if a reboot
happens before the convergence step the controller node will come up
with the services being enabled.

Change-Id: Ie163e5f1d24b23b46092a9a3cb844fcb4e810f7b
Closes-Bug: #1677346
This commit is contained in:
Michele Baldessari 2017-03-29 20:45:43 +02:00
parent 443bdc0ab2
commit a7e6dcdb55
1 changed files with 4 additions and 2 deletions

View File

@ -3,13 +3,15 @@
set -eu
# We need to start the systemd services we explicitely stopped at step _1.sh
# FIXME: Should we let puppet during the convergence step do the service enabling or
# should we add it here?
# We add the enablement of the systemd services here because if a node gets rebooted
# before the convergence step for whatever reason the migrated services will
# not be enabled and we potentially have a bigger disruption.
services=$(services_to_migrate)
if [[ ${keep_sahara_services_on_upgrade} =~ [Ff]alse ]] ; then
services=${services%%openstack-sahara*}
fi
for service in $services; do
manage_systemd_service start "${service%%-clone}"
manage_systemd_service enable "${service%%-clone}"
check_resource_systemd "${service%%-clone}" started 600
done