cloud-init has two interactions with network backplanes
1. to write (or render) network configuration to the approapriate config files for the network system: systemd, netplan, network-manager, ENI, freebsd, netbsd, openbsd. This is done via cloudinit.net.renderers discovery[1]
2. optionally to bring up the network configuration via "network activation" for datasources discovered only in init boot stage after network is already up[2]
/etc/cloud/cloud.cfg allows system_info:network:renderers to configure overrides for default renderers, but not for activators. The two discovery/mechanisms don't know about each other and have separate logic to determine which is applicable on the given system.
Cloud-init should either:
- Expose system_info: network: activators discovery priorty/order configuration in /etc/cloud/cloud.cfg*
-- OR --
- make activators aware of customized/overridden renderers priority from cloud.cfg and honor that priority order when discovering activators to use.
Without this feature, overridden network: renderer priority order to set network-manager as default renderer will result in cloud-init writing /etc/NetworkManager/system-connections/cloud-init-<NIC_NAME>.nmconnection but then trying to run `netplan apply` for a non-existent configuration on ubuntu Desktop installs.
cloud-init has two interactions with network backplanes
1. to write (or render) network configuration to the approapriate config files for the network system: systemd, netplan, network-manager, ENI, freebsd, netbsd, openbsd. This is done via cloudinit. net.renderers discovery[1]
2. optionally to bring up the network configuration via "network activation" for datasources discovered only in init boot stage after network is already up[2]
/etc/cloud/ cloud.cfg allows system_ info:network: renderers to configure overrides for default renderers, but not for activators. The two discovery/ mechanisms don't know about each other and have separate logic to determine which is applicable on the given system.
Cloud-init should either: cloud.cfg*
- Expose system_info: network: activators discovery priorty/order configuration in /etc/cloud/
-- OR --
- make activators aware of customized/ overridden renderers priority from cloud.cfg and honor that priority order when discovering activators to use.
Without this feature, overridden network: renderer priority order to set network-manager as default renderer will result in cloud-init writing /etc/NetworkMan ager/system- connections/ cloud-init- <NIC_NAME> .nmconnection but then trying to run `netplan apply` for a non-existent configuration on ubuntu Desktop installs.
References: /github. com/canonical/ cloud-init/ blob/main/ cloudinit/ net/renderers. py#L67
[1] network renderers discovery: https:/
[2] network activators discovery: