systemd-networkd-wait-online.service Failed to start Wait for Network to be Configured with bridge

Bug #1779340 reported by Johan Ehnberg
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
systemd (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

The following simple netplan config results in a 2-minut unneccessary delay on boot. Everything works like it should in the end. The bridge has no interfaces due to a regression in Ubuntu migrating to netplan (see https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1779341).

ubuntu@molnix3:~$ cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    enp4s0:
      dhcp4: yes
      dhcp6: yes

ubuntu@molnix3:~$ cat /etc/netplan/br1.yaml
network:
  version: 2
  bridges:
    br1:
      addresses: [10.1.0.9/16]
      interfaces: []

ubuntu@molnix3:~$ cat /usr/lib/networkd-dispatcher/routable.d/tap0
#!/bin/sh
set -e
 if [ "$IFACE" = tap0 ]; then
  brctl addif br1 tap0
  ip link set tap0 promisc on
  ifmetric tap0 5
fi

ubuntu@molnix3:~$ journalctl -u systemd-networkd-wait-online.service -b
-- Logs begin at Thu 2018-06-28 10:07:29 UTC, end at Fri 2018-06-29 14:09:18 UTC. --
Jun 29 13:58:16 molnix3 systemd[1]: Starting Wait for Network to be Configured...
Jun 29 13:58:16 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:16 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:16 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:16 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:16 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:16 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:17 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:17 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:17 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:17 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:18 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:18 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:19 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:20 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:20 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 13:58:21 molnix3 systemd-networkd-wait-online[1468]: ignoring: lo
Jun 29 14:00:16 molnix3 systemd-networkd-wait-online[1468]: Event loop failed: Connection timed out
Jun 29 14:00:16 molnix3 systemd[1]: systemd-networkd-wait-online.service: Main process exited, code=exited, status=1/FAILURE
Jun 29 14:00:16 molnix3 systemd[1]: systemd-networkd-wait-online.service: Failed with result 'exit-code'.
Jun 29 14:00:16 molnix3 systemd[1]: Failed to start Wait for Network to be Configured.

ubuntu@molnix3:~$ /lib/systemd/systemd-networkd-wait-online
managing: br1
managing: enp4s0
ignoring: lo

ubuntu@molnix3:~$ networkctl
IDX LINK TYPE OPERATIONAL SETUP
  1 lo loopback carrier unmanaged
  2 enp4s0 ether routable configured
  3 br1 ether routable configured
  4 tap0 ether routable unmanaged

4 links listed.

description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in systemd (Ubuntu):
status: New → Confirmed
Revision history for this message
Kees Bakker (keestux) wrote :

My setup is a little bit different, but the problem is the same. I have a bridge device for LXD. This is an extra bridge for testing purpose.

root@rapper:~# cat /etc/netplan/91-test-bridges.yaml
network:
  version: 2
  renderer: networkd
  bridges:
    # the key name is the name for virtual (created) interfaces;
    # no ‘match’ or ‘set-name’ attributes are allowed.
    testbr0:
      addresses:
      - 10.82.0.1/24
      # gateway4: 192.168.178.1

At startup there are no containers using this bridge, and that causes the
2 minute timeout of systemd-networkd-wait-online

root@rapper:~# networkctl
IDX LINK TYPE OPERATIONAL SETUP
  1 lo loopback carrier unmanaged
  2 enp2s0 ether carrier configured
  3 testbr0 ether no-carrier configuring
  4 br0 ether routable configured

root@rapper:~# /lib/systemd/systemd-networkd-wait-online --timeout=20 --interface testbr0
ignoring: lo
Event loop failed: Connection timed out

I couldn't find a way to skip my test bridge for this online check, and
still keep it controlled by networkd.

Revision history for this message
Dan Streetman (ddstreet) wrote :

please reopen if this is still an issue

Changed in systemd (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.