Remove OrchestrationDeployAction call in ffwd upgrade prepare

This was added for ffwd upgrade from N->Q, where we moved to use
scipt hook rather than os-apply-config. This does not seem relevant
any more is it would be removed for both normal upgrade[1] and ffwd
upgraded N->Q deployments.

Also, it won't be needed for Q->T ffu.

[1] https://review.opendev.org/560022

Change-Id: I5c55938b1c313e4ebf24f3babeb377e87bf7cd30
This commit is contained in:
Rabi Mishra 2020-04-02 10:24:25 +05:30
parent 62c43e7626
commit 0e7c4bd3ba
3 changed files with 0 additions and 32 deletions

View File

@ -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

View File

@ -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')

View File

@ -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