Skip to content

Commit bb2837f

Browse files
committed
[libvirt_manager] Create DNS/DHCP records when mac_map is pre-defined
When cifmw_libvirt_manager_mac_map is defined (baremetal deploy-bm flow), generate_networking_data.yml is skipped because MAC addresses are already known. However, this also skips the DNS/DHCP record creation (create_dns_records.yml) which is called at the end of that file. Without DHCP reservations, compute VMs provisioned by Ironic never get a ctlplane IP, leaving them unreachable for EDPM bootstrap. Add a separate call to create_dns_records.yml that runs when mac_map is defined and cifmw_networking_env_definition is available. Related-Issue: ANVIL-109 Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Roberto Alfieri <ralfieri@redhat.com>
1 parent f67ae9b commit bb2837f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

roles/libvirt_manager/tasks/deploy_layout.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,12 @@
118118
- cifmw_libvirt_manager_mac_map is undefined
119119
ansible.builtin.include_tasks: generate_networking_data.yml
120120

121+
- name: Ensure DNS/DHCP records exist when mac_map is pre-defined
122+
when:
123+
- cifmw_libvirt_manager_mac_map is defined
124+
- cifmw_networking_env_definition is defined
125+
ansible.builtin.include_tasks: create_dns_records.yml
126+
121127
- name: Create group inventories
122128
when:
123129
- _cifmw_libvirt_manager_layout.vms[item].manage | default(true)

0 commit comments

Comments
 (0)