missing option "--any" to /lib/systemd/systemd-networkd-wait-online

Asked by Rajko Albrecht on 2021-06-07

We have a cluster of hundreds of ubuntu machines. All of them have two physical network interfaces on board while only one is connected.

The results in various problems with systemd - it hangs 2 minutes at start because of waiting of systemd-networkd-wait-online for the second card coming online.

Because the machines are not always the same physical hardware the cards have different names while installing via MAAS. I searched around: the original systemd-networkd-wait-online has an option "--any" which means "mark system as online when at least ONE interface is connected".

This is the most important option you can have for such a check. But whyever - in Ubuntu this option is missing.

So my questions:

* why is this option stripped out, see https://www.freedesktop.org/software/systemd/man/systemd-networkd-wait-online.service.html - there is absolute no reason I can see myself for doing this.
* How can I solve this. using "-i" isn't an option because names are different and using script figuring out at install which interfaces exists and which one is the connected will be a mess and fail on a regular base - so creating a /etc/systemd/system/systemd-networkd-wait-online.service.d/override.conf using "-i" for the one interface connected isn't stable enough.

Having the ability using "--any" or any other option "ok, wait until at least ONE network is online and mark system as online and than ignore state of other interfaces" is a real need. Not only in such large environments like ours.

R

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu systemd Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said (last edit ):
#1

Which Ubuntu release (and systemd version) are you running?
According to the manpages http://manpages.ubuntu.com/manpages/focal/en/man8/systemd-networkd-wait-online.8.html the "--any" option exists on systemd for Ubuntu focal (version 245.*), but not in bionic (version 237.*) http://manpages.ubuntu.com/manpages/bionic/en/man8/systemd-networkd-wait-online.8.html

from the NEWS file:
CHANGES WITH 242:
...
        * systemd-networkd-wait-online gained a new setting --any for waiting
          for only one of the requested interfaces instead of all of them.
...

Revision history for this message
Rajko Albrecht (elektritter) said :
#2

Hm. ok, this is the difference: because not compatible slurm versions our cluster is using bionic ... is there a backport or a backport possible?

Upgrading the whole cluster to focal cannot be done in near future because it has to be done all at once. :/

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

I do not think that there is an "official" version of systemd version 242+ for bionic on Ubuntu.
There is at least one PPA https://launchpad.net/~ubuntu-support-team/+archive/ubuntu/systemd
(see https://launchpad.net/ubuntu/+ppas?name_filter=systemdfor a full list of candidate PPAs),
but I doubt that it is advisable to use a version of systemd from a PPA on important systems.

Ideas for a completely different approach:
Maybe it is possible to fully deactivate the unused NIC in BIOS, such that there is no waiting for it,
or lowering the timeout from the default value of 120 seconds to something considerably shorter.

Can you help with this problem?

Provide an answer of your own, or ask Rajko Albrecht for more information if necessary.

To post a message you must log in.