[systemd-devel] systemd-networkd-wait-online should know if there is anything to wait for
Dimitri John Ledkov
xnox at ubuntu.com
Mon Mar 26 10:34:43 UTC 2018
Hello,
When systemd-networkd-wait-online was originally introduced, it was
the only tool that correctly waited and blocked the boot, until after
networking is configured.
These days, however, all/most network configurations tools ship
appropriate wait-online integration. E.g. there is network-manager
wait online service and ifupdown wait online, on Debian/Ubuntu.
These other helpers, seem to be slightly smarter than
systemd-networkd-wait-online. Specifically, all other helpers exit
straight away, if they have no devices configured / managed. Whilst
systemd-networkd-wait-online, doesn't appear to know if it expects any
devices / can manage any devices. Ideally, if no devices are
configured / no devices match .network files, maybe it should exit
straight away? Or for example, do so if no devices are found in
"configuring/pending/not yet processed by udev".
(code wise, it is to change one_ready to true by default, and only
continue blocking the, if there is anything pending configuration).
I'm considering doing this by default, or for-example, doing it if
there are no /run/systemd/network/*.network
/etc/systemd/network/*.network files.
The use cases when it matters:
- installer ISO booted without any NICs attached
(or NICs require special drivers / firmware loaded etc)
- cloud-image booted and cloud-init failed to find network-config and
generate networkd stanzas
--
Regards,
Dimitri.
More information about the systemd-devel
mailing list