Merge "Remove OrchestrationDeployAction call in ffwd upgrade prepare"
This commit is contained in:
commit
0eaf44d198
|
@ -68,9 +68,6 @@ UPGRADE_PREPARE_ENV = "environments/lifecycle/upgrade-prepare.yaml"
|
|||
UPGRADE_CONVERGE_ENV = "environments/lifecycle/upgrade-converge.yaml"
|
||||
FFWD_UPGRADE_PREPARE_ENV = "environments/lifecycle/ffwd-upgrade-prepare.yaml"
|
||||
FFWD_UPGRADE_CONVERGE_ENV = "environments/lifecycle/ffwd-upgrade-converge.yaml"
|
||||
FFWD_UPGRADE_PREPARE_SCRIPT = ("#!/bin/bash \n"
|
||||
"rm -f /usr/libexec/os-apply-config/templates/"
|
||||
"etc/os-net-config/config.json || true \n")
|
||||
|
||||
ENABLE_SSH_ADMIN_TIMEOUT = 600
|
||||
ENABLE_SSH_ADMIN_STATUS_INTERVAL = 5
|
||||
|
|
|
@ -35,13 +35,6 @@ class TestFFWDUpgradePrepare(fakes.TestFFWDUpgradePrepare):
|
|||
uuid4_patcher = mock.patch('uuid.uuid4', return_value="UUID4")
|
||||
self.mock_uuid4 = uuid4_patcher.start()
|
||||
self.addCleanup(self.mock_uuid4.stop)
|
||||
deploy_action = mock.patch(
|
||||
'tripleo_common.actions.deployment.OrchestrationDeployAction.run',
|
||||
autospec=True
|
||||
)
|
||||
deploy_action.start()
|
||||
deploy_action.return_value = mock.Mock(is_success=True)
|
||||
self.addCleanup(deploy_action.stop)
|
||||
|
||||
@mock.patch('tripleoclient.v1.overcloud_deploy.DeployOvercloud.'
|
||||
'take_action')
|
||||
|
|
|
@ -18,11 +18,8 @@ from oslo_log import log as logging
|
|||
from osc_lib.i18n import _
|
||||
from osc_lib import utils
|
||||
|
||||
from tripleo_common.actions import deployment as deployment_actions
|
||||
|
||||
from tripleoclient import command
|
||||
from tripleoclient import constants
|
||||
from tripleoclient import exceptions
|
||||
from tripleoclient import utils as oooutils
|
||||
from tripleoclient.v1.overcloud_deploy import DeployOvercloud
|
||||
from tripleoclient.workflows import deployment
|
||||
|
@ -64,25 +61,6 @@ class FFWDUpgradePrepare(DeployOvercloud):
|
|||
|
||||
stack_name = stack.stack_name
|
||||
|
||||
# ffwd-upgrade "init" run command on overcloud nodes
|
||||
context = clients.tripleoclient.create_mistral_context()
|
||||
jobs = dict()
|
||||
for server in clients.compute.servers.list():
|
||||
init_deploy = deployment_actions.OrchestrationDeployAction(
|
||||
server_id=server.id,
|
||||
config=constants.FFWD_UPGRADE_PREPARE_SCRIPT,
|
||||
name='ffwd-upgrade-prepare'
|
||||
)
|
||||
init_deploy_return = init_deploy.run(context=context)
|
||||
jobs[server.name] = init_deploy_return.is_success()
|
||||
|
||||
if jobs and any([not i for i in jobs.values() if not i]):
|
||||
raise exceptions.DeploymentError(
|
||||
'The following nodes failed: {}'.format(
|
||||
[k for k, v in jobs.items() if not v]
|
||||
)
|
||||
)
|
||||
|
||||
# In case of update and upgrade we need to force the
|
||||
# update_plan_only. The heat stack update is done by the
|
||||
# packag_update mistral action
|
||||
|
|
Loading…
Reference in New Issue