Comment 8 for bug 2036358

Revision history for this message
pernacentus (pernacentus) wrote :

It also affects Ubuntu Server 22.04 after updating to 249.11-0ubuntu3.10, since I'm on a headless server, I'm not using NetworkManager.
On boot systemd-networkd-wait-online hangs and fails after a timeout.

Here's my netplan configuration:

----

$ cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    enp2s0:
      addresses: [192.168.178.116/24]
      nameservers:
        addresses: [1.1.1.1,1.0.0.1]
      routes:
        - to: default
          via: 192.168.178.1
      dhcp4: false
      dhcp6: false
      optional: true
    enp3s0:
      dhcp4: false
      dhcp6: false
      optional: true
    enp4s0:
      dhcp4: false
      dhcp6: false
      optional: true
    enp5s0:
      dhcp4: false
      dhcp6: false
      optional: true
    enp6s0:
      dhcp4: false
      dhcp6: false
      optional: true
    enp7s0:
      dhcp4: false
      dhcp6: false
      optional: true
  version: 2

----

cat /run/systemd/network/10-netplan-enp2s0.network

----

[Match]
Name=enp2s0

[Link]
RequiredForOnline=no

[Network]
LinkLocalAddressing=ipv6
Address=192.168.178.116/24
DNS=1.1.1.1
DNS=1.0.0.1

[Route]
Destination=0.0.0.0/0
Gateway=192.168.178.1

---

Other interfaces have also RequiredForOnline=no, hence they should be ignored by systemd-networkd-wait-online and it should not hang at boot.

Also for me running SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd-wait-online --timeout=5 --any yelds:

---

Found link 7
Found link 6
Found link 5
Found link 4
Found link 3
Found link 2
Found link 1
enp4s0: link is ignored
enp6s0: link is ignored
enp5s0: link is ignored
enp2s0: link is ignored
enp3s0: link is ignored
lo: link is ignored
enp7s0: link is ignored

---