[Bug 2036127] Re: Restarting `systemd-networkd` looses unmanaged bridged parents

Nick Rosbrook 2036127 at bugs.launchpad.net
Mon Feb 26 15:47:21 UTC 2024


This path is wrong: /etc/systemd/network/99-netplan-
vlan1.network.d/keep_master.conf. It should in fact be
etc/systemd/network/10-netplan-vlan1.network.d/keep_master.conf.

Did you restart systemd-networkd afterward?

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2036127

Title:
  Restarting `systemd-networkd` looses unmanaged bridged parents

Status in systemd package in Ubuntu:
  Invalid

Bug description:
  My home network comprises many VLANs managed by `systemd-
  networkd`/`netplan`. Those VLANs are then used as parent interfaces
  for LXD networks. Whenever `systemd-networkd` is restarted (i.e: post-
  update), my whole network breaks because all the unmanaged bridges
  lose their parent devices. Another way to see it is that `systemd-
  networkd` undoes the `master` setting of those VLAN devices.

  
  Here is a simplified reproducer:

  1. Create a `vlan1` device

  $ lxc launch ubuntu:22.04 networkd-bug
  Creating networkd-bug
  Starting networkd-bug

  $ lxc file push - networkd-bug/etc/netplan/99-vlan1.yaml << EOF
  network:
    version: 2
    vlans:
      vlan1:
        id: 1
        link: eth0
  EOF

  $ lxc exec networkd-bug -- netplan apply

  2. Manually create a bridge and join `vlan1` to it

  $ lxc exec networkd-bug -- ip link add br0 type bridge
  $ lxc exec networkd-bug -- ip link set vlan1 master br0
  $ lxc exec networkd-bug -- ip link
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  2: vlan1 at eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br0 state UP mode DEFAULT group default qlen 1000
      link/ether 00:16:3e:94:6e:47 brd ff:ff:ff:ff:ff:ff
  3: br0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
      link/ether 42:b6:31:01:47:9a brd ff:ff:ff:ff:ff:ff
  164: eth0 at if165: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
      link/ether 00:16:3e:94:6e:47 brd ff:ff:ff:ff:ff:ff link-netnsid 0

  3. Restart `systemd-networkd`

  $ lxc exec networkd-bug -- systemctl restart systemd-networkd

  4. Notice `vlan1` lost it's master config

  $ lxc exec networkd-bug -- ip link
  1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  2: vlan1 at eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
      link/ether 00:16:3e:94:6e:47 brd ff:ff:ff:ff:ff:ff
  3: br0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
      link/ether 42:b6:31:01:47:9a brd ff:ff:ff:ff:ff:ff
  164: eth0 at if165: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
      link/ether 00:16:3e:94:6e:47 brd ff:ff:ff:ff:ff:ff link-netnsid 0

  
  Ideally, `vlan1` should retain it's `master` setting and I wouldn't loose connectivity :)


  Additional information:

  # apt-cache policy systemd netplan.io iproute2
  systemd:
    Installed: 249.11-0ubuntu3.9
    Candidate: 249.11-0ubuntu3.9
    Version table:
   *** 249.11-0ubuntu3.9 500
          500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
          100 /var/lib/dpkg/status
       249.11-0ubuntu3.7 500
          500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
       249.11-0ubuntu3 500
          500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
  netplan.io:
    Installed: 0.105-0ubuntu2~22.04.3
    Candidate: 0.105-0ubuntu2~22.04.3
    Version table:
   *** 0.105-0ubuntu2~22.04.3 500
          500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
          100 /var/lib/dpkg/status
       0.104-0ubuntu2 500
          500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
  iproute2:
    Installed: 5.15.0-1ubuntu2
    Candidate: 5.15.0-1ubuntu2
    Version table:
   *** 5.15.0-1ubuntu2 500
          500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
          100 /var/lib/dpkg/status

  # lsb_release -rd
  Description:	Ubuntu 22.04.3 LTS
  Release:	22.04
  # uname -a
  Linux networkd-bug 6.2.0-32-generic #32~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 18 10:40:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2036127/+subscriptions




More information about the foundations-bugs mailing list