Ceci est une ancienne révision du document !


systemd-networkd-wait-online service timing out during boot

After reading all of the answers, I've started thinking and I think I've solved it. I have 3 interfaces (one being hp ilo):

  IDX LINK        TYPE     OPERATIONAL SETUP      
1 lo          loopback carrier     unmanaged
2 eno1        ether    routable    configured 
3 eno2        ether    no-carrier  configuring
4 docker0     bridge   routable    unmanaged

64 veth0653007 ether degraded unmanaged

I've created 2 network config files for both eno interfaces to setup priorities:

sudo nano /etc/systemd/network/20-wired-first.network
sudo nano /etc/systemd/network/30-wired-second.network

First config:

[Match]
Name=eno1
[Network]
DHCP=yes
[DHCP]
RouteMetric=10
Second config:
[Match]
Name=eno2
[Network]
DHCP=yes
[DHCP]
RouteMetric=20
Then I've updated the (god-forsaken) service:
sudo nano /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service
[Service]
  Type=oneshot
  ExecStart=/lib/systemd/systemd-networkd-wait-online --interface=eno1
  RemainAfterExit=yes

Then I've restarted the services:

sudo systemctl restart systemd-networkd
sudo systemctl restart systemd-networkd-wait-online

Now, without the config files interfaces lacked the proper prioritization as ExecStart only tells systemd which interface to wait for and doesn't configure how they should work.

I saw 2 options here:

  Keep the ExecStart parameter for boot and keep the .network files
  Disable wait-online
Haut de page