From bb01bcdbdc95c4e64594f86fbe2f5e06108ae045 Mon Sep 17 00:00:00 2001 From: Lukas Bezdicka Date: Tue, 2 Aug 2022 15:17:36 +0200 Subject: [PATCH] Fix upgrade playbook path. Ansible is now generated into overcloud-deploy while constants.MAJOR_UPGRADE_PLAYBOOKS is no longer static path within the ansible execution dir. Co-authored-by: Daniel Bengtsson Change-Id: I2c7fd4304701f128ec0588c5a2bf4a3c7da842ad (cherry picked from commit fe6a5a30ff45b6d4484c93a1d88f1f88c23eb7ca) (cherry picked from commit 4cf89d81712de8003b09ceb78834cf9f10b6ca40) --- tripleoclient/v1/overcloud_upgrade.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tripleoclient/v1/overcloud_upgrade.py b/tripleoclient/v1/overcloud_upgrade.py index 785ff2029..b07d59394 100644 --- a/tripleoclient/v1/overcloud_upgrade.py +++ b/tripleoclient/v1/overcloud_upgrade.py @@ -208,19 +208,20 @@ class UpgradeRun(command.Command): constants.UPGRADE_PROMPT, self.log)): raise OvercloudUpgradeNotConfirmed(constants.UPGRADE_NO) - # NOTE(cloudnull): The string option "all" was a special default - # that is no longer relevant. To retain compatibility - # this condition has been put in place. - if not parsed_args.playbook or parsed_args.playbook == ['all']: - playbook = constants.MAJOR_UPGRADE_PLAYBOOKS - else: - playbook = parsed_args.playbook - working_dir = oooutils.get_default_working_dir(parsed_args.stack) config_download_dir = os.path.join(working_dir, 'config-download') ansible_dir = os.path.join(config_download_dir, parsed_args.stack) inventory_path = os.path.join(ansible_dir, 'tripleo-ansible-inventory.yaml') + # NOTE(cloudnull): The string option "all" was a special default + # that is no longer relevant. To retain compatibility + # this condition has been put in place. + if not parsed_args.playbook or parsed_args.playbook == ['all']: + playbook = [os.path.join(ansible_dir, p) + for p in constants.MAJOR_UPGRADE_PLAYBOOKS] + else: + playbook = parsed_args.playbook + key = oooutils.get_key(parsed_args.stack) oooutils.run_ansible_playbook( playbook=playbook,