Restarting `systemd-networkd` looses unmanaged bridged parents
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
My home network comprises many VLANs managed by `systemd-
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-
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,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: vlan1@eth0: <BROADCAST,
link/ether 00:16:3e:94:6e:47 brd ff:ff:ff:ff:ff:ff
3: br0: <BROADCAST,
link/ether 42:b6:31:01:47:9a brd ff:ff:ff:ff:ff:ff
164: eth0@if165: <BROADCAST,
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,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: vlan1@eth0: <BROADCAST,
link/ether 00:16:3e:94:6e:47 brd ff:ff:ff:ff:ff:ff
3: br0: <BROADCAST,
link/ether 42:b6:31:01:47:9a brd ff:ff:ff:ff:ff:ff
164: eth0@if165: <BROADCAST,
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://
100 /var/lib/
249.
500 http://
249.
500 http://
netplan.io:
Installed: 0.105-0ubuntu2~
Candidate: 0.105-0ubuntu2~
Version table:
*** 0.105-0ubuntu2~
500 http://
100 /var/lib/
0.104-0ubuntu2 500
500 http://
iproute2:
Installed: 5.15.0-1ubuntu2
Candidate: 5.15.0-1ubuntu2
Version table:
*** 5.15.0-1ubuntu2 500
500 http://
100 /var/lib/
# 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