Bug#1009351: systemd: Static IP addressing (from config) in LXC containers not working anymore
Michael Biebl
biebl at debian.org
Tue Apr 12 10:26:32 BST 2022
Control: severity -1 important
Am 12.04.22 um 09:15 schrieb Claudio Kuenzler:
> Package: systemd
> Version: 247.3-7
> Severity: critical
> Justification: breaks the whole system
>
> Dear Maintainer,
>
> After having created a new LXC container (using lxc-create) using the
> lxc-download template and using Debian Bullseye, the static IP
> addressing using the container's config file
> (/var/lib/lxc/container/config) is not working anymore.
>
> This was the first Bullseye LXC I created since the 11.3 release. Older
> Bullseye releases worked without a problem.
>
> This _could_ be caused by the following mentioned change in the systemd
> package:
>
> "fix a regression when using systemd-networkd in an unprivileged LXD
> container"
Can you verify if reverting the patch helps?
> A workaround is to start the containenr in foreground (-F), disable the
> systemd-networkd service and then reboot the container. The static IP
> from the container's config is now working again.
>
> To reproduce:
>
> 1. Create the container
>
> lxc-create -n bullseye -t download -- -d debian -r bullseye -a amd64
>
> 2. Adjust config, add static IP in networking
>
> root at host:~# cat /var/lib/lxc/bullseye/config | grep net
> lxc.net.0.type = veth
> lxc.net.0.flags = up
> lxc.net.0.link = virbr1
> lxc.net.0.veth.pair = bullseye
> lxc.net.0.ipv4.address = 192.168.1.111/24
> lxc.net.0.ipv4.gateway = 192.168.1.1
>
> 3. Start container
>
> lxc-start -n bullseye
>
> For a very short time (1-2 seconds), the bullseye container is reachable
> on the configured IP but then loses the IP as soon as systemd-networkd
> is started.
>
> 4. Attach to container, disable systemd-networkd, reboot -> works again
>
If you are using a static IP it's probably a good idea to disable
networkd anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20220412/3ca483ff/attachment.sig>
More information about the Pkg-systemd-maintainers
mailing list