From 64f789dd85414fff8b48df6335d5cd7e7fb55eb7 Mon Sep 17 00:00:00 2001 From: Sofer Athlan-Guyot Date: Thu, 29 Jun 2017 14:57:08 +0200 Subject: [PATCH] [newton only] Ensure cinder services are cleanup during upgrade. It may happen that some leftover services definition stay in the database. We don't want to prevent upgrade because of that so we just clean them up before going on. Cleaning up the database while cinder services are running is not a problem as the entry are recreated. But duplicate and leftover /will/ be erased. Closes-Bug: #1701259 Change-Id: I4ea3138e45aa430a89aad305fbb4b5eeefdfa16e --- .../tasks/major_upgrade_controller_pacemaker_2.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh b/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh index 5f1da220b0..4b01197683 100755 --- a/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh +++ b/extraconfig/tasks/major_upgrade_controller_pacemaker_2.sh @@ -62,6 +62,15 @@ if [[ -n $(is_bootstrap_node) ]]; then 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 | \ + awk '/^cinder/{print $1 " " $2}' | \ + while read service host; do + cinder-manage service remove $service $host; + done + # 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