Commit b5f7545
[libvirt_manager] generate unique MAC per interface in generate_macs
Previously, a single MAC address (_fixed_mac) was generated once per
VM and assigned to all its network interfaces. For OCP master VMs with
multiple networks (e.g. ocppr, ocpbm, osp_trunk, osp_trunk), all
interfaces shared the same MAC.
This caused the networking_mapper to always resolve to the first
interface (enp5s0, on the ocppr bridge) when looking up any network
by MAC, since all MACs matched equally. The incorrect interface name
then flowed into ci_gen_kustomize_values, setting enp5s0 as the
macvlan master in the ctlplane NetworkAttachmentDefinition. Bootstrap
pods sent ARP on the wrong bridge and never reached compute nodes,
causing wait_for_connection to time out.
Fix: generate a unique MAC per (VM, network-index) pair by
incorporating loop.index0 into the seed, ensuring each interface gets
a distinct MAC. The networking_mapper can then correctly identify
enp7s0 (on cifmw-osp_trunk) as the ctlplane interface.
Fixes: OSPRH-28297
Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: John Fulton <fulton@redhat.com>1 parent ef818ee commit b5f7545
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | 14 | | |
16 | 15 | | |
17 | 16 | | |
| |||
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
0 commit comments