When first booted, the bonds do not exist. Cloud-init brings up one interface
(physical) and dhcp's for crawling metadata and finds a network_data.json
which includes bonding configuration. cloud-init-local.service will convert
and render this as netplan yaml (writes to /etc/netplan/50-cloud-init.yaml)
and then exit. Next, systemd-networkd will run and apply the network config
which includes a bond0 which enslaves ens4 (and uses the nic's mac). Now that
networking is online, cloud-init.service runs and when it resumes it runs
apply_network_config once more (which attempts to ensure nics are named as per
config) and this is where cloud-init detects the duplicate mac.
I thought we had a bug open that was meant to address applying networking twice
on OpenStack Datasource which would also prevent this issue. I'll see if I can
find that.
All said, I do agree that we should ignore 'mac' duplicates on bonds.
I think I understand what happened here. If you could please run and attach output of:
journalctl -b 0 -o short-monotonic \ local.service \ networkd- wait-online \
-u cloud-init-
-u systemd-networkd \
-u systemd-
-u cloud-init.service
When first booted, the bonds do not exist. Cloud-init brings up one interface local.service will convert 50-cloud- init.yaml) config once more (which attempts to ensure nics are named as per
(physical) and dhcp's for crawling metadata and finds a network_data.json
which includes bonding configuration. cloud-init-
and render this as netplan yaml (writes to /etc/netplan/
and then exit. Next, systemd-networkd will run and apply the network config
which includes a bond0 which enslaves ens4 (and uses the nic's mac). Now that
networking is online, cloud-init.service runs and when it resumes it runs
apply_network_
config) and this is where cloud-init detects the duplicate mac.
I thought we had a bug open that was meant to address applying networking twice
on OpenStack Datasource which would also prevent this issue. I'll see if I can
find that.
All said, I do agree that we should ignore 'mac' duplicates on bonds.