[systemd-devel] network config breaks when starting a nspawn container
Francis Moreau
francis.moro at gmail.com
Thu Jan 27 06:26:53 UTC 2022
Hi,
systemd-networkd creates a bridge 'br0':
$ cat /etc/systemd/network/30-br0.network
[Match]
Name=br0
[Network]
DHCP=ipv4
Domains=~.
The bridge has one slave 'bond0' by default. The bond device is used
to
aggregate my ethernet card and my wifi card (configured by NM).
systemd-resolved is also used.
Every thing works until I start a container 'c1' which should connect
to br0:
$ cat /etc/systemd/nspawn/c1.nspawn
[Exec]
PrivateUsers=off
[Network]
Bridge=br0
A few seconds later, the bridge lost its IP, no more route.
I can see this in the journal:
Jan 27 06:44:40 h200 systemd[1]: Starting Container c1...
Jan 27 06:44:40 h200 systemd-udevd[8148]: ethtool: autonegotiation is
unset or enabled, the speed and duplex are not writable.
Jan 27 06:44:40 h200 systemd-networkd[568]: vb-c1: Link UP
Jan 27 06:44:40 h200 kernel: br0: port 2(vb-c1) entered blocking state
Jan 27 06:44:40 h200 kernel: br0: port 2(vb-c1) entered disabled state
Jan 27 06:44:40 h200 kernel: device vb-c1 entered promiscuous mode
Jan 27 06:44:40 h200 kernel: br0: port 2(vb-c1) entered blocking state
Jan 27 06:44:40 h200 kernel: br0: port 2(vb-c1) entered forwarding
state
Jan 27 06:44:40 h200 kernel: br0: port 2(vb-c1) entered disabled state
Jan 27 06:44:40 h200 systemd-udevd[8148]: Using default interface
naming scheme 'v238'.
Jan 27 06:44:40 h200 systemd-networkd[568]: br0: DHCP lease lost
Jan 27 06:44:40 h200 NetworkManager[8437]: <info> [1643262280.6795]
manager: (vb-c1): new Veth device
(/org/freedesktop/NetworkManager/Devices/11)
Jan 27 06:44:40 h200 systemd-machined[28861]: New machine c1.
Jan 27 06:44:40 h200 systemd[1]: Started Container c1.
[...]
Jan 27 06:44:42 h200 systemd-networkd[568]: vb-c1: Gained IPv6LL
Jan 27 06:44:44 h200 systemd-resolved[913]: Using degraded feature set
UDP instead of UDP+EDNS0 for DNS server fd0f:ee:b0::1.
Jan 27 06:44:47 h200 systemd-resolved[913]: Using degraded feature set
TCP instead of UDP for DNS server fd0f:ee:b0::1.
Jan 27 06:44:57 h200 systemd-resolved[913]: Using degraded feature set
UDP instead of TCP for DNS server fd0f:ee:b0::1.
Jan 27 06:45:00 h200 systemd-resolved[913]: Using degraded feature set
TCP instead of UDP for DNS server fd0f:ee:b0::1.
If I stop the container then network is back.
This happens with systemd v246.
Could anyody help me fixing this issue ?
Thank you.
--
Francis
More information about the systemd-devel
mailing list