From f609ae27a073aac351e703751b7731df9230cc20 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Tue, 10 Oct 2023 08:03:47 +0200 Subject: [PATCH] bifrost: Populate bifrost host vars on deprovision Closes-Bug: #2038889 Change-Id: I4609494d009c6e1f97d833a9a11529d107b3216f (cherry picked from commit 672d6fa24a978009588e66dd19c623ee244a8f8e) --- kayobe/cli/commands.py | 3 ++- kayobe/tests/unit/cli/test_commands.py | 2 ++ .../bifrost-host-vars-deprovision-525c450cf20f7f71.yaml | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bifrost-host-vars-deprovision-525c450cf20f7f71.yaml diff --git a/kayobe/cli/commands.py b/kayobe/cli/commands.py index 110bc9b3d..5b98adc88 100644 --- a/kayobe/cli/commands.py +++ b/kayobe/cli/commands.py @@ -1080,7 +1080,8 @@ class OvercloudDeprovision(KayobeAnsibleMixin, VaultMixin, Command): def take_action(self, parsed_args): self.app.LOG.debug("Deprovisioning overcloud") - playbooks = _build_playbook_list("overcloud-deprovision") + playbooks = _build_playbook_list("kolla-bifrost-hostvars", + "overcloud-deprovision") self.run_kayobe_playbooks(parsed_args, playbooks) diff --git a/kayobe/tests/unit/cli/test_commands.py b/kayobe/tests/unit/cli/test_commands.py index 7e4f440dd..a2442e9f8 100644 --- a/kayobe/tests/unit/cli/test_commands.py +++ b/kayobe/tests/unit/cli/test_commands.py @@ -1241,6 +1241,8 @@ def test_overcloud_deprovision(self, mock_run): mock.call( mock.ANY, [ + utils.get_data_files_path( + "ansible", "kolla-bifrost-hostvars.yml"), utils.get_data_files_path( "ansible", "overcloud-deprovision.yml"), ], diff --git a/releasenotes/notes/bifrost-host-vars-deprovision-525c450cf20f7f71.yaml b/releasenotes/notes/bifrost-host-vars-deprovision-525c450cf20f7f71.yaml new file mode 100644 index 000000000..4b866b30f --- /dev/null +++ b/releasenotes/notes/bifrost-host-vars-deprovision-525c450cf20f7f71.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Fixes failure to run ``kayobe overcloud deprovision`` after Bifrost is + redeployed. + `LP#2038889 `__ +