[newton only] Cinder services cleanup should happen when mysql is up

In a previous patch we attempt to fix a issue with old entries in the
cinder service database making the upgrade fail[1].  The fix was wrong
as the cinder-manage command was triggered after the galera shutdown,
making it useless.

This patch re-order the pacemaker shutdown process to have a state
where cinder-volume is stopped and pacemaker is up so that we can run
cinder-manage service cleanup safely.

[1] https://review.openstack.org/#/c/478922/

Closes-Bug: #1701259

Change-Id: I4ee6799b32820a681ffcbf339effdf86337485f7
This commit is contained in:
Sofer Athlan-Guyot 2017-09-25 17:59:32 +02:00
parent 640367a183
commit 0616f2d0be
1 changed files with 2 additions and 3 deletions

View File

@ -58,11 +58,8 @@ if [[ -n $(is_bootstrap_node) ]]; then
check_resource redis stopped 600
pcs resource disable rabbitmq
check_resource rabbitmq stopped 600
pcs resource disable galera
check_resource galera stopped 600
pcs resource disable openstack-cinder-volume
check_resource openstack-cinder-volume stopped 600
# We want to remove any duplicate/leftover cinder service
# leftover in the database.
cinder-manage service list | \
@ -71,6 +68,8 @@ if [[ -n $(is_bootstrap_node) ]]; then
cinder-manage service remove $service $host;
done
pcs resource disable galera
check_resource galera stopped 600
# Disable all VIPs before stopping the cluster, so that pcs doesn't use one as a source address:
# https://bugzilla.redhat.com/show_bug.cgi?id=1330688
for vip in $(pcs resource show | grep ocf::heartbeat:IPaddr2 | grep Started | awk '{ print $1 }'); do