So if I understand correctly, this does not affect Focal or Bionic. It also does not affect Mantic or Noble.
We're just hitting this issue on Jammy = systemd v249.11 (and probably Lunar = systemd v252.5). Netplan's behavior seems to be correct, here. It writes sensible configuration for systemd-networkd. The issue is in (upstream) systemd, which blocks on an empty list, which it shouldn't. That behavior is apparently fixed in systemd v253. I think we should not try to work around this systemd behaviour in Netplan, but either live with the upstream behavior for v249 or backport the fixes from systemd v253 into Jammy. ** Tags added: rls-jj-incoming ** Changed in: netplan Status: Triaged => Invalid -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to systemd in Ubuntu. https://bugs.launchpad.net/bugs/2039083 Title: "optional: true" flag introduces problem it's meant to fix in certain circumstances Status in netplan: Invalid Status in systemd package in Ubuntu: Confirmed Bug description: Hello! This bug is in relation to the situation where the "systemd-networkd- wait-online.service" hangs for several minutes on boot before eventually failing. I guess I don't know if this flag was introduced specifically for this situation, but I do know that one of the fixes for this issue is to add "optional: true" to any non-critical interfaces (as per the docs[1]). While this may be the case, it just so happens that adding this flag to an interface when it's the only configured interface in netplan can actually INTRODUCE the issue as well. Example: --- :~# grep -Ev "^#" /etc/netplan/50-cloud-init.yaml network: version: 2 ethernets: enp5s0: dhcp4: true optional: true --- The above config will cause the service hang/failure, and the removal of the flag will resolve the issue. I primarily opened this bug report with the idea that we might update aforementioned documentation to include a caveat that you want to avoid adding this flag to the only configured interface. However, it was also discussed that we might consider having the netplan config parser complain about such a setup and consider it invalid, which it kinda is. I believe in a situation where you may have a server that should have NO network connectivity, you would simply leave netplan unconfigured and/or stop any relevant services, rather than try to configure all interfaces as optional. My original test was on Jammy, though I tested this also on Focal and Bionic, and neither of those appear to be affected by this - setting the only interface as optional in either of those does not cause the "systemd-networkd-wait-online" service to hang and the system boots normally. Let me know if you'd like/need any more info from me! Thank you! [1] https://netplan.io/faq#prevent-waiting-for-interface To manage notifications about this bug go to: https://bugs.launchpad.net/netplan/+bug/2039083/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp