Revert "Call undercloud install function directly"
This broke undercloud upgrades - tripleoclient imports
instack_undercloud.undercloud, then upgrades the package.
This means the upgrade call then runs against the old version
of the module, which is incompatible with some of the new
puppet stuff.
Closes-Bug: 1701362
This reverts commit b6e71724e0
.
Change-Id: Ie79dfff667437305ff4109da5a9c42ae358b1a3e
This commit is contained in:
parent
b6e71724e0
commit
12299487f8
@ -15,4 +15,3 @@ six>=1.9.0 # MIT
|
||||
osc-lib>=1.5.1 # Apache-2.0
|
||||
websocket-client>=0.32.0 # LGPLv2+
|
||||
tripleo-common>=7.1.0 # Apache-2.0
|
||||
instack-undercloud>=7.0.0 # Apache-2.0
|
||||
|
@ -35,8 +35,8 @@ class TestUndercloudInstall(TestPluginV1):
|
||||
# Get the command object to test
|
||||
self.cmd = undercloud.InstallUndercloud(self.app, None)
|
||||
|
||||
@mock.patch('instack_undercloud.undercloud.install')
|
||||
def test_undercloud_install(self, mock_install):
|
||||
@mock.patch('subprocess.check_call', autospec=True)
|
||||
def test_undercloud_install(self, mock_subprocess):
|
||||
arglist = []
|
||||
verifylist = []
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
@ -44,7 +44,7 @@ class TestUndercloudInstall(TestPluginV1):
|
||||
# DisplayCommandBase.take_action() returns two tuples
|
||||
self.cmd.take_action(parsed_args)
|
||||
|
||||
mock_install.assert_called_once_with('/usr/share/instack-undercloud')
|
||||
mock_subprocess.assert_called_with('instack-install-undercloud')
|
||||
|
||||
|
||||
class TestUndercloudUpgrade(TestPluginV1):
|
||||
@ -54,9 +54,8 @@ class TestUndercloudUpgrade(TestPluginV1):
|
||||
# Get the command object to test
|
||||
self.cmd = undercloud.UpgradeUndercloud(self.app, None)
|
||||
|
||||
@mock.patch('instack_undercloud.undercloud.install')
|
||||
@mock.patch('subprocess.check_call', autospec=True)
|
||||
def test_undercloud_upgrade(self, mock_subprocess, mock_install):
|
||||
def test_undercloud_upgrade(self, mock_subprocess):
|
||||
arglist = []
|
||||
verifylist = []
|
||||
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
|
||||
@ -67,9 +66,8 @@ class TestUndercloudUpgrade(TestPluginV1):
|
||||
mock_subprocess.assert_has_calls(
|
||||
[
|
||||
mock.call(['sudo', 'yum', 'update', '-y']),
|
||||
mock.call('instack-upgrade-undercloud'),
|
||||
mock.call(['sudo', 'systemctl', 'restart',
|
||||
'openstack-nova-api'])
|
||||
]
|
||||
)
|
||||
mock_install.assert_called_once_with('/usr/share/instack-undercloud',
|
||||
upgrade=True)
|
||||
|
@ -18,8 +18,6 @@
|
||||
import logging
|
||||
import subprocess
|
||||
|
||||
from instack_undercloud import undercloud
|
||||
|
||||
from osc_lib.command import command
|
||||
from tripleoclient import utils
|
||||
|
||||
@ -35,7 +33,7 @@ class InstallUndercloud(command.Command):
|
||||
|
||||
utils.ensure_run_as_normal_user()
|
||||
|
||||
undercloud.install('/usr/share/instack-undercloud')
|
||||
subprocess.check_call("instack-install-undercloud")
|
||||
|
||||
|
||||
class UpgradeUndercloud(command.Command):
|
||||
@ -50,7 +48,7 @@ class UpgradeUndercloud(command.Command):
|
||||
utils.ensure_run_as_normal_user()
|
||||
|
||||
subprocess.check_call(['sudo', 'yum', 'update', '-y'])
|
||||
undercloud.install('/usr/share/instack-undercloud', upgrade=True)
|
||||
subprocess.check_call("instack-upgrade-undercloud")
|
||||
# restart nova-api https://bugzilla.redhat.com/show_bug.cgi?id=1315467
|
||||
subprocess.check_call(['sudo', 'systemctl', 'restart',
|
||||
'openstack-nova-api'])
|
||||
|
Loading…
Reference in New Issue
Block a user