Skip to content

Instantly share code, notes, and snippets.

@MartinBrugnara
Created February 10, 2021 21:23
Show Gist options
  • Save MartinBrugnara/3a3db4f20b1892b8ea99b1291453e0d4 to your computer and use it in GitHub Desktop.
Save MartinBrugnara/3a3db4f20b1892b8ea99b1291453e0d4 to your computer and use it in GitHub Desktop.
systemd-networkd-wait-online stuck with all relevant interfaces online
By default will wait on all the interfaces managed by `systemd-networkd` to come online and get fully configured.
All interfaces that appear in any file in `/etc/systemd/network` (and friends) are considered managed.
We can use `networkctl` to see the actual "configuration progress status". Any interface stuck on "configuring" is an issue.
While this is usually an indication of network problem, it may be a false positive, for example:
* Slave interfaces in a bond
* Slave interfaces in a bridge
Since these interfaces appear in the folders above but do not have any ip will never reach the state of "configured",
hence the service will halt.
A solution is to tell `systemd-networkd-wait-online` to ignore these interfaces, for we are only interested in the bond/bridge themselves.
To this end, we can edit `/etc/systemd/network/systemd-networkd-wait-online.service` and add the list of `--ignore <interface>`.
Example:
* bond0
* enp44s0f0
* enp44s0f1
```
ExecStart=/lib/systemd/systemd-networkd-wait-online --ignore enp44s0f0 --ignore enp44s0f1
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment