As far as I can tell we are facing this issue:
https://github.com/systemd/systemd/issues/25813

This was fixed in systemd 253 with the following patch
https://github.com/systemd/systemd/commit/ab3aed4a0349bbaa26f53340770c1b59b463e05d
(and
https://github.com/systemd/systemd/commit/2f96a29c2c55bdd67cdd8e0b0cfd6971968e4bca
to fix a regression introduced by the first patch).

If all managed interfaces have RequiredForOnline=no, and the rest are
unmanaged, this issue pops up.

** Bug watch added: github.com/systemd/systemd/issues #25813
   https://github.com/systemd/systemd/issues/25813

-- 
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:
  Triaged
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

Reply via email to