Skip to content

Commit

Permalink
Fix IP allocation limit in overcloud inventory discover
Browse files Browse the repository at this point in the history
After generating an inventory file in 'kayobe overcloud inventory
discover', the IP allocation playbook runs to allocate IP addresses for
the new hosts. Currently this runs without a limit, meaning it targets
all hosts. This change fixes it to use a limit of overcloud.

TrivialFix

Change-Id: Ic3a98fb9e741a2dea792b2e6cf6a6ff802d099a2
(cherry picked from commit d490367)
  • Loading branch information
markgoddard committed Aug 30, 2022
1 parent 85efbbe commit 0b92d64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kayobe/cli/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,7 +1004,8 @@ def take_action(self, parsed_args):
"overcloud-inventory-discover"))
# If necessary, allocate IP addresses for the discovered hosts.
self.run_kayobe_playbook(parsed_args,
_get_playbook_path("ip-allocation"))
_get_playbook_path("ip-allocation"),
limit="overcloud")
# Now populate the Kolla Ansible inventory.
self.generate_kolla_ansible_config(parsed_args, service_config=False)

Expand Down
1 change: 1 addition & 0 deletions kayobe/tests/unit/cli/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,7 @@ def test_overcloud_inventory_discover(self, mock_run_one, mock_run):
mock.call(
mock.ANY,
utils.get_data_files_path("ansible", "ip-allocation.yml"),
limit="overcloud",
),
]
self.assertEqual(expected_calls, mock_run_one.call_args_list)
Expand Down

0 comments on commit 0b92d64

Please sign in to comment.