systemd-networkd: Deconfigures bridge after last attached interface disconnects (ie: LXC)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Expired
|
Undecided
|
Unassigned | ||
Bionic |
Expired
|
Undecided
|
Unassigned | ||
Cosmic |
Expired
|
Undecided
|
Unassigned | ||
Disco |
Expired
|
Undecided
|
Unassigned | ||
Eoan |
Expired
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 18.04 Bionic Beaver
An issue was reported to systemd-networkd on GitHub - https:/
Using anonymous bridges (ie: not attached to physical NICs) is problematic with systemd-networkd as they get deconfigured as soon as the last attached device disconnects (ie: a LXC container). Static IP configuration must be done again manually.
The root cause is that systemd-networkd assumes that every network interface have a carrier signal. There's no notion of carrier signal on anonymous bridges, a case not properly handled by systemd-networkd.
The systemd dev team provided a patch to address the issue and it would be nice to be integrated on the Ubuntu package.
The PR is here : https:/
To get the proper fix, you'll need to combine 2 patches :
- The one from the PR above
- Another patch [1] which fixes a segfault introduced by the PR.
[1] https:/
On my test environment, I rebuild the Ubuntu package with the 2 patches above from "237-3ubuntu10.17" to "237-3ubuntu10.20" and made thorough tests without hiting a single issue so I think we can assume that these 2 patches are safe to use.
Changed in systemd (Ubuntu Eoan): | |
assignee: | nobody → Dan Streetman (ddstreet) |
status: | New → In Progress |
importance: | Undecided → Medium |
tags: | added: ddstreet-next |
Changed in systemd (Ubuntu Eoan): | |
assignee: | Dan Streetman (ddstreet) → nobody |
Changed in systemd (Ubuntu Disco): | |
status: | New → Incomplete |
Changed in systemd (Ubuntu Bionic): | |
status: | New → Incomplete |
Changed in systemd (Ubuntu Cosmic): | |
status: | New → Incomplete |
Changed in systemd (Ubuntu Eoan): | |
importance: | Medium → Undecided |
I tried to reproduce this, but my static ip isn't lost:
root@lp1825470-d:~# grep . /etc/systemd/ network/ *br0* network/ 20-br0. netdev: [NetDev] network/ 20-br0. netdev: Name=br0 network/ 20-br0. netdev: Kind=bridge network/ 30-br0. network: [Match] network/ 30-br0. network: Name=br0 network/ 30-br0. network: [Network] network/ 30-br0. network: Address= 1.2.3.4/ 24 network/ 30-br0. network: LinkLocalAddres sing=none
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
root@lp1825470-d:~# ip a show br0 BROADCAST, MULTICAST, UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000 57ff:fe58: 5fc4/64 scope link MULTICAST, UP,LOWER_ UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 57ff:fe58: 5fc4/64 scope link BROADCAST, MULTICAST, UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000 57ff:fe58: 5fc4/64 scope link MULTICAST, UP,LOWER_ UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 57ff:fe58: 5fc4/64 scope link
3: br0: <NO-CARRIER,
link/ether ca:9e:57:58:5f:c4 brd ff:ff:ff:ff:ff:ff
inet6 fe80::c89e:
valid_lft forever preferred_lft forever
root@lp1825470-d:~# ip l add test type dummy
root@lp1825470-d:~# ip l set up dev test
root@lp1825470-d:~# ip l set test master br0
root@lp1825470-d:~# ip a show br0
3: br0: <BROADCAST,
link/ether ca:9e:57:58:5f:c4 brd ff:ff:ff:ff:ff:ff
inet 1.2.3.4/24 brd 1.2.3.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::c89e:
valid_lft forever preferred_lft forever
root@lp1825470-d:~# ip l del test
root@lp1825470-d:~# ip a show br0
3: br0: <NO-CARRIER,
link/ether ca:9e:57:58:5f:c4 brd ff:ff:ff:ff:ff:ff
inet6 fe80::c89e:
valid_lft forever preferred_lft forever
root@lp1825470-d:~# ip l add test type dummy
root@lp1825470-d:~# ip l set up dev test
root@lp1825470-d:~# ip l set test master br0
root@lp1825470-d:~# ip a show br0
3: br0: <BROADCAST,
link/ether ca:9e:57:58:5f:c4 brd ff:ff:ff:ff:ff:ff
inet 1.2.3.4/24 brd 1.2.3.255 scope global br0
valid_lft forever preferred_lft forever
inet6 fe80::c89e:
valid_lft forever preferred_lft forever
Are you using systemd-networkd to manage your anonymous bridge ip address? Or are you setting the ip address manually? You mention lxc, do you have a test case involving lxc that reproduces the bug?