From 6128bce5d7795cfeb017e2aeda10acc7d7923280 Mon Sep 17 00:00:00 2001
From: Vasyl Saienko <vsaienko@mirantis.com>
Date: Tue, 15 Aug 2017 12:28:56 +0300
Subject: [PATCH] Do not restart n-cpu during upgrade

As we do not upgrade nova on multinode grenade, there is no need to
restart it. This way we avoid breaking n-cpu service, as new
dependencies are installed and they may not work with old code.

Change-Id: Id0c13704654d43a663458b9c099a1a0477c746a6
---
 devstack/upgrade/upgrade.sh | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/devstack/upgrade/upgrade.sh b/devstack/upgrade/upgrade.sh
index e8105df152..b7cae14e3a 100755
--- a/devstack/upgrade/upgrade.sh
+++ b/devstack/upgrade/upgrade.sh
@@ -100,11 +100,14 @@ fi
 
 start_ironic
 
-# NOTE(vsaienko) installing ironic service triggers apache restart, that
-# may cause nova-compute failure due to LP1537076
-stop_nova_compute || true
-wait_for_keystone
-start_nova_compute
+# NOTE(vsaienko) do not restart n-cpu on multinode as we didn't upgrade nova.
+if [[ "${HOST_TOPOLOGY}" != "multinode" ]]; then
+    # NOTE(vsaienko) installing ironic service triggers apache restart, that
+    # may cause nova-compute failure due to LP1537076
+    stop_nova_compute || true
+    wait_for_keystone
+    start_nova_compute
+fi
 
 if [[ -n "$ensure_stopped" ]]; then
     ensure_services_stopped $ensure_stopped