Dimitri John Ledkov wrote on 26/03/18 11:34: > 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
But how do you differentiate a device which is not present vs. one which is slow to appear? If the system isn't online then surely any dependant units don't need to be started anyway. If the system requires being online to operate properly then all this behaviour is correct. If you don't use systemd-networkd then you possibly don't want systemd-networkd-wait-online either and thus it can be happily disabled. So I don't really appreciate why this is an issue. Unless, you're trying to use a kind of hybrid environment (e.g. using networkd for wired networks (perhaps USB dongles) and NetworkManager for wifi and you'd want networkd-wait-online to be a no-op when the USB dongle is not there?) I guess it's possible to know if networkd is configured to not manage any devices *at all*, but perhaps there isn't much point in enabling the networkd-wait-online service at all in that case anyway? Struggling to understand the "why" question here, but could easily be missing something! :-) Col -- Colin Guthrie gmane(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited http://www.tribalogic.net/ Open Source: Mageia Contributor http://www.mageia.org/ PulseAudio Hacker http://www.pulseaudio.org/ Trac Hacker http://trac.edgewall.org/ _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/systemd-devel