From a51c7202ef36bf4931b1bf752982ec33567d970d Mon Sep 17 00:00:00 2001 From: marios Date: Thu, 17 Mar 2016 13:16:24 +0200 Subject: [PATCH] Add a restart of openstack-nova-api after upgrading undercloud During upgrades testing and as discussed in bug 1558495 the initial overcloud upgrade step (major-upgrade-pacemaker-init.yaml) times out. The fix for now is to restart openstack-nova-api after the undercloud upgrade. Change-Id: Ifd9c2f4bdbca701d655c741ab21da2a571c1dcb5 Closes-Bug: 1558495 --- tripleoclient/tests/v1/undercloud/test_undercloud.py | 4 +++- tripleoclient/v1/undercloud.py | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tripleoclient/tests/v1/undercloud/test_undercloud.py b/tripleoclient/tests/v1/undercloud/test_undercloud.py index 477234d26..cccd8a7ef 100644 --- a/tripleoclient/tests/v1/undercloud/test_undercloud.py +++ b/tripleoclient/tests/v1/undercloud/test_undercloud.py @@ -66,6 +66,8 @@ class TestUndercloudUpgrade(TestPluginV1): mock_subprocess.assert_has_calls( [ mock.call(['sudo', 'yum', 'update', '-y']), - mock.call('instack-install-undercloud') + mock.call('instack-install-undercloud'), + mock.call(['sudo', 'systemctl', 'restart', + 'openstack-nova-api']) ] ) diff --git a/tripleoclient/v1/undercloud.py b/tripleoclient/v1/undercloud.py index 518062f47..4bdcd8efc 100644 --- a/tripleoclient/v1/undercloud.py +++ b/tripleoclient/v1/undercloud.py @@ -49,3 +49,6 @@ class UpgradeUndercloud(command.Command): subprocess.check_call(['sudo', 'yum', 'update', '-y']) subprocess.check_call("instack-install-undercloud") + # restart nova-api https://bugzilla.redhat.com/show_bug.cgi?id=1315467 + subprocess.check_call(['sudo', 'systemctl', 'restart', + 'openstack-nova-api'])