From 0e7c4bd3ba56d9122d33fc69271fc204dcabdfae Mon Sep 17 00:00:00 2001 From: Rabi Mishra Date: Thu, 2 Apr 2020 10:24:25 +0530 Subject: [PATCH] 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 --- tripleoclient/constants.py | 3 --- .../test_overcloud_ffwd_upgrade.py | 7 ------ tripleoclient/v1/overcloud_ffwd_upgrade.py | 22 ------------------- 3 files changed, 32 deletions(-) diff --git a/tripleoclient/constants.py b/tripleoclient/constants.py index dbd462f9a..cddfb622e 100644 --- a/tripleoclient/constants.py +++ b/tripleoclient/constants.py @@ -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 diff --git a/tripleoclient/tests/v1/overcloud_ffwd_upgrade/test_overcloud_ffwd_upgrade.py b/tripleoclient/tests/v1/overcloud_ffwd_upgrade/test_overcloud_ffwd_upgrade.py index 7c2c1afc4..de7300a5f 100644 --- a/tripleoclient/tests/v1/overcloud_ffwd_upgrade/test_overcloud_ffwd_upgrade.py +++ b/tripleoclient/tests/v1/overcloud_ffwd_upgrade/test_overcloud_ffwd_upgrade.py @@ -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') diff --git a/tripleoclient/v1/overcloud_ffwd_upgrade.py b/tripleoclient/v1/overcloud_ffwd_upgrade.py index b3120d129..47f19915d 100644 --- a/tripleoclient/v1/overcloud_ffwd_upgrade.py +++ b/tripleoclient/v1/overcloud_ffwd_upgrade.py @@ -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