I tried to reproduce this, but my static ip isn't lost:
root@lp1825470-d:~# grep . /etc/systemd/network/*br0*
/etc/systemd/network/20-br0.netdev:[NetDev]
/etc/systemd/network/20-br0.netdev:Name=br0
/etc/systemd/network/20-br0.netdev:Kind=bridge
/etc/systemd/network/30-br0.network:[Match]
/etc/systemd/network/30-br0.network:Name=br0
/etc/systemd/network/30-br0.network:[Network]
/etc/systemd/network/30-br0.network:Address=1.2.3.4/24
/etc/systemd/network/30-br0.network:LinkLocalAddressing=none
root@lp1825470-d:~# ip a show br0
3: br0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
group default qlen 1000
link/ether ca:9e:57:58:5f:c4 brd ff:ff:ff:ff:ff:ff
inet6 fe80::c89e:57ff:fe58:5fc4/64 scope link
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,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group
default qlen 1000
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:57ff:fe58:5fc4/64 scope link
valid_lft forever preferred_lft forever
root@lp1825470-d:~# ip l del test
root@lp1825470-d:~# ip a show br0
3: br0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN
group default qlen 1000
link/ether ca:9e:57:58:5f:c4 brd ff:ff:ff:ff:ff:ff
inet6 fe80::c89e:57ff:fe58:5fc4/64 scope link
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,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group
default qlen 1000
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:57ff:fe58:5fc4/64 scope link
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?
** Changed in: systemd (Ubuntu Eoan)
Status: In Progress => Incomplete
** Tags removed: ddstreet-next
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/1825470
Title:
systemd-networkd: Deconfigures bridge after last attached interface
disconnects (ie: LXC)
Status in systemd package in Ubuntu:
Incomplete
Status in systemd source package in Bionic:
New
Status in systemd source package in Cosmic:
New
Status in systemd source package in Disco:
New
Status in systemd source package in Eoan:
Incomplete
Bug description:
Ubuntu 18.04 Bionic Beaver
An issue was reported to systemd-networkd on GitHub -
https://github.com/systemd/systemd/issues/11650 - and all the thorough
details are there.
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://github.com/systemd/systemd/commit/93b4dab57e2e13bd804cbee999241be65a443e2e
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://github.com/systemd/systemd/pull/11741/commits/a294af6810df3c18909a96b556deadba0e2ab0a9
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1825470/+subscriptions
--
Mailing list: https://launchpad.net/~touch-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help : https://help.launchpad.net/ListHelp