Public bug reported: netplan.io version 1.0-3ubuntu1, on Ubuntu 24.10, triggers udev add events for every already present network interface:
``` $ lxc launch ubuntu-daily:o oo # open `udevadm monitor` on another window within the container o: # netplan apply o: # udevadm monitor monitor will print the received events for: UDEV - the event which udev sends out after rule processing KERNEL - the kernel uevent KERNEL[23616.687850] add /devices/virtual/net/eth0 (net) KERNEL[23616.687890] add /devices/virtual/net/lo (net) UDEV [23616.691806] add /devices/virtual/net/lo (net) UDEV [23616.697810] add /devices/virtual/net/eth0 (net) ``` This is wrong by its own, but, with cloud-init on aws images is even worse because: cloud-init installs the following udev rules to configure hotplugged nics: ``` # cat /etc/udev/rules.d/90-cloud-init-hook-hotplug.rules # Installed by cloud-init due to network hotplug userdata ACTION!="add|remove", GOTO="cloudinit_end" ENV{ID_NET_DRIVER}=="vif|ena|ixgbevf", GOTO="cloudinit_hook" GOTO="cloudinit_end" LABEL="cloudinit_hook" SUBSYSTEM=="net", RUN+="/usr/lib/cloud-init/hook-hotplug" LABEL="cloudinit_end" ``` which gets triggered by the udev add events, and hook-hotplug instructs cloud-init to configure the new nic, and during that reconfiguration `netplan apply` is called by cloud-init, which starts an infinite loop. ** Affects: cloud-init (Ubuntu) Importance: Undecided Status: Invalid ** Affects: netplan.io (Ubuntu) Importance: Undecided Status: New ** Affects: cloud-init (Ubuntu Oracular) Importance: Undecided Status: Invalid ** Affects: netplan.io (Ubuntu Oracular) Importance: Undecided Status: New ** Also affects: netplan.io (Ubuntu) Importance: Undecided Status: New ** Also affects: cloud-init (Ubuntu Oracular) Importance: Undecided Status: New ** Also affects: netplan.io (Ubuntu Oracular) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2071363 Title: netplan apply triggers udev add events for every network interfdace To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/2071363/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs