Systemd-networkd: not working in Debian Sid or Bullseye images

I did a bit more testing. What works for me:

  • Debian Bullseye + systemd v246, v248 or v249 build from the source

What does not work for me:

  • Debian Bullseye + systemd v247 build from the source (couldn’t build v241 or v244)
  • Debian Sid with systemd v249 provided by the LXD Debian Sid systemd package

I was a bit surprised that systemd v249 works on Debian Bullseye and not on Sid for me.

Protocol of the commands I used for building and testing:

root$ lxc launch images:debian/sid debian-sid-systemd-test
root$ lxc exec debian-sid-systemd-test -- /bin/bash

$ systemctl unmask systemd-networkd
$ systemctl unmask systemd-networkd.socket
$ systemctl unmask systemd-networkd-wait-online.service
$ systemctl enable systemd-networkd
$ systemctl enable systemd-networkd.socket
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl daemon-reload
$ mv /etc/network/interfaces /etc/network/interfaces.save

$ cat > /etc/systemd/network/eth0.network << EOF
[Match]
Name=eth0
[Network]
DHCP=true
EOF
$ networkctl reload
($ systemctl restart systemd-networkd)
$ reboot

root$ lxc exec debian-sid-systemd-test -- /bin/bash

root@debian-sid-systemd-test:~# networkctl -l status eth0
● 49: eth0                                                           
                     Link File: n/a
                  Network File: n/a
                          Type: ether
                         State: routable (pending)
                  Online state: unknown
                    HW Address: 00:16:3e:2c:96:cb
                           MTU: 1394 (min: 68, max: 65535)
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
          Queue Length (Tx/Rx): 1/1
              Auto negotiation: no
                         Speed: 10Gbps
                        Duplex: full
                          Port: tp
                       Address: 2a03:2260:200f:101:216:3eff:fe2c:96cb
                                fd01:fd59:0:1800:216:3eff:fe2c:96cb
                                fe80::216:3eff:fe2c:96cb
                       Gateway: fe80::ba:7aff:fedf:101
             Activation Policy: up
           Required For Online: yes

Oct 19 21:42:35 debian-sid-systemd-test systemd-networkd[74]: eth0: Link UP
Oct 19 21:42:35 debian-sid-systemd-test systemd-networkd[74]: eth0: Gained carrier
Oct 19 21:42:35 debian-sid-systemd-test systemd-networkd[74]: eth0: Gained IPv6LL
root@debian-sid-systemd-test:~#

=> NOT OK!

$ exit 
root$ lxc stop debian-sid-systemd-test

=====

root$ lxc launch images:debian/bullseye debian-bullseye-systemd-test
root$ lxc exec debian-bullseye-systemd-test -- /bin/bash

$ echo "deb-src http://deb.debian.org/debian bullseye main" > /etc/apt/sources.list.d/deb-src.list
$ apt-get update
$ apt-get install git python3-jinja2
$ apt-get build-dep systemd

$ git clone https://github.com/systemd/systemd.git
$ cd systemd
$ git checkout v241

$ meson build/ && ninja -C build

$ git checkout v249
$ meson setup --wipe build/
$ meson build/ && ninja -C build
$ exit

=====

root$ lxc copy debian-bullseye-systemd-test debian-bullseye-systemd-test-v249
root$ lxc start debian-bullseye-systemd-test-v249
root$ lxc exec debian-bullseye-systemd-test-v249 -- /bin/bash

$ cd systemd
$ meson install -C build/
$ reboot

root$ lxc exec debian-bullseye-systemd-test-v249 -- /bin/bash

$ systemctl unmask systemd-networkd
$ systemctl unmask systemd-networkd.socket
$ systemctl unmask systemd-networkd-wait-online.service
$ systemctl enable systemd-networkd
$ systemctl enable systemd-networkd.socket
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl daemon-reload
$ mv /etc/network/interfaces /etc/network/interfaces.save

$ cat > /etc/systemd/network/eth0.network << EOF
[Match]
Name=eth0
[Network]
DHCP=true
EOF
$ networkctl reload
($ systemctl restart systemd-networkd)
$ reboot

root$ lxc exec debian-bullseye-systemd-test-v249 -- /bin/bash

root@debian-bullseye-systemd-test-v249:~# networkctl -l status eth0
● 29: eth0                                                                     
                     Link File: /usr/lib/systemd/network/99-default.link
                  Network File: /etc/systemd/network/eth0.network
                          Type: ether
                         State: routable (configured)
                  Online state: online                                         
                        Driver: veth
                    HW Address: 00:16:3e:e1:7e:b4 (Xensource, Inc.)
                           MTU: 1394 (min: 68, max: 65535)
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
          Queue Length (Tx/Rx): 1/1
              Auto negotiation: no
                         Speed: 10Gbps
                        Duplex: full
                          Port: tp
                       Address: 10.204.32.155 (DHCP4 via 10.204.32.2)
                                2a03:2260:200f:101:216:3eff:fee1:7eb4
                                fd01:fd59:0:1800:216:3eff:fee1:7eb4
                                fe80::216:3eff:fee1:7eb4
                       Gateway: 10.204.32.2
                                fe80::ba:7aff:fedf:101
                           DNS: 10.204.32.1
                                fd01:fd59:0:1800::1:1
             Activation Policy: up
           Required For Online: yes
               DHCP4 Client ID: IAID:0x4dda998c/DUID
             DHCP6 Client IAID: 0x4dda998c
             DHCP6 Client DUID: DUID-EN/Vendor:0000ab11499382881370f8d70000

Oct 19 20:29:56 debian-bullseye-systemd-test-v249 systemd-networkd[85]: eth0: Link UP
Oct 19 20:29:56 debian-bullseye-systemd-test-v249 systemd-networkd[85]: eth0: Gained carrier
Oct 19 20:29:56 debian-bullseye-systemd-test-v249 systemd-networkd[85]: eth0: Gained IPv6LL
Oct 19 20:29:56 debian-bullseye-systemd-test-v249 systemd-networkd[85]: eth0: DHCPv4 address 10.204.32.155/20 via 10.204.32.2

=> OK!

$ exit 
root$ lxc stop debian-bullseye-systemd-test-v249

=====

root$ lxc copy debian-bullseye-systemd-test debian-bullseye-systemd-test-v247
root$ lxc start debian-bullseye-systemd-test-v247
root$ lxc exec debian-bullseye-systemd-test-v247 -- /bin/bash

$ cd systemd
$ git checkout v247
$ meson setup --wipe build/
$ meson build/ && ninja -C build
$ meson install -C build/
$ reboot

root$ lxc exec debian-bullseye-systemd-test-v247 -- /bin/bash

$ systemctl unmask systemd-networkd
$ systemctl unmask systemd-networkd.socket
$ systemctl unmask systemd-networkd-wait-online.service
$ systemctl enable systemd-networkd
$ systemctl enable systemd-networkd.socket
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl daemon-reload
$ mv /etc/network/interfaces /etc/network/interfaces.save

$ cat > /etc/systemd/network/eth0.network << EOF
[Match]
Name=eth0
[Network]
DHCP=true
EOF
$ systemctl start systemd-networkd
$ networkctl reload
$ reboot

root$ lxc exec debian-bullseye-systemd-test-v247 -- /bin/bash

root@debian-bullseye-systemd-test-v247:~# networkctl -l status eth0
● 35: eth0                                                           
                     Link File: n/a                                  
                  Network File: n/a                                  
                          Type: ether                                
                         State: routable (pending)      
                    HW Address: 00:16:3e:c7:e7:6a (Xensource, Inc.)  
                           MTU: 1394 (min: 68, max: 65535)           
                         QDisc: noqueue                              
  IPv6 Address Generation Mode: eui64                                
          Queue Length (Tx/Rx): 1/1                                  
              Auto negotiation: no                                   
                         Speed: 10Gbps                               
                        Duplex: full                                 
                          Port: tp                                   
                       Address: 2a03:2260:200f:101:216:3eff:fec7:e76a
                                fd01:fd59:0:1800:216:3eff:fec7:e76a  
                                fe80::216:3eff:fec7:e76a             
                       Gateway: fe80::ba:7aff:fedf:101               

Oct 19 20:56:22 debian-bullseye-systemd-test-v247 systemd-networkd[79]: eth0: Gained IPv6LL
root@debian-bullseye-systemd-test-v247:~#

=> NOT OK!

$ exit 
root$ lxc stop debian-bullseye-systemd-test-v247

=====

root$ lxc copy debian-bullseye-systemd-test debian-bullseye-systemd-test-v241
root$ lxc start debian-bullseye-systemd-test-v241
root$ lxc exec debian-bullseye-systemd-test-v241 -- /bin/bash

$ cd systemd
$ git checkout v241
$ meson setup --wipe build/
$ meson build/ && ninja -C build
[...]
ninja: Entering directory `build'
[479/1743] Compiling C object src/network/libnetworkd-core.a.p/netdev_tunnel.c.o
../src/network/netdev/tunnel.c: In function ‘ipip_init’:
../src/network/netdev/tunnel.c:765:27: warning: implicit conversion from ‘enum <anonymous>’ to ‘FooOverUDPEncapType’ [-Wenum-conversion]
  765 |         t->fou_encap_type = FOU_ENCAP_DIRECT;
      |                           ^
[550/1743] Generating linux.c.o with a custom command
../src/boot/efi/linux.c:63:72: warning: ‘regparm’ attribute directive ignored [-Wattributes]
   63 | typedef VOID(*handover_f)(VOID *image, EFI_SYSTEM_TABLE *table, struct SetupHeader *setup) __attribute__((regparm(0)));
      |                                                                        ^~~~~~~~~~~
[552/1743] Generating shim.c.o with a custom command
../src/boot/efi/shim.c:21:9: warning: ‘sysv_abi’ attribute directive ignored [-Wattributes]
   21 |         EFI_STATUS __attribute__((sysv_abi)) (*shim_verify) (VOID *buffer, UINT32 size);
      |         ^~~~~~~~~~
../src/boot/efi/shim.c:25:9: warning: ‘sysv_abi’ attribute directive ignored [-Wattributes]
   25 |         EFI_STATUS __attribute__((sysv_abi)) (*generate_hash) (VOID *data, UINT32 datasize, VOID *context, UINT8 *sha256hash, UINT8 *sha1hash);
      |         ^~~~~~~~~~
../src/boot/efi/shim.c:27:9: warning: ‘sysv_abi’ attribute directive ignored [-Wattributes]
   27 |         EFI_STATUS __attribute__((sysv_abi)) (*read_header) (VOID *data, UINT32 datasize, VOID *context);
      |         ^~~~~~~~~~
[556/1743] Generating stub.so with a custom command
FAILED: src/boot/efi/stub.so 
/usr/bin/ld -o src/boot/efi/stub.so -T /usr/lib/elf_aarch64_efi.lds -shared -Bsymbolic -nostdlib -znocombreloc -L /usr/lib /usr/lib/crt0-efi-aarch64.o --defsym=EFI_SUBSYSTEM=0xa src/boot/efi/disk.c.o src/boot/efi/graphics.c.o src/boot/efi/measure.c.o src/boot/efi/pe.c.o src/boot/efi/util.c.o src/boot/efi/linux.c.o src/boot/efi/splash.c.o src/boot/efi/stub.c.o -lefi -lgnuefi /usr/lib/gcc/aarch64-linux-gnu/10/libgcc.a
/usr/bin/ld: src/boot/efi/graphics.c.o:/root/systemd/build/../src/boot/efi/util.h:54: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:54: first defined here
/usr/bin/ld: src/boot/efi/pe.c.o:/root/systemd/build/../src/boot/efi/util.h:54: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:54: first defined here
/usr/bin/ld: src/boot/efi/util.c.o:/root/systemd/build/../src/boot/efi/util.h:54: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:54: first defined here
/usr/bin/ld: src/boot/efi/linux.c.o:/root/systemd/build/../src/boot/efi/util.h:54: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:54: first defined here
/usr/bin/ld: src/boot/efi/splash.c.o:/root/systemd/build/../src/boot/efi/util.h:54: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:54: first defined here
/usr/bin/ld: src/boot/efi/stub.c.o:/root/systemd/build/../src/boot/efi/util.h:54: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:54: first defined here
[557/1743] Generating systemd_boot.so with a custom command
FAILED: src/boot/efi/systemd_boot.so 
/usr/bin/ld -o src/boot/efi/systemd_boot.so -T /usr/lib/elf_aarch64_efi.lds -shared -Bsymbolic -nostdlib -znocombreloc -L /usr/lib /usr/lib/crt0-efi-aarch64.o --defsym=EFI_SUBSYSTEM=0xa src/boot/efi/disk.c.o src/boot/efi/graphics.c.o src/boot/efi/measure.c.o src/boot/efi/pe.c.o src/boot/efi/util.c.o src/boot/efi/boot.c.o src/boot/efi/console.c.o src/boot/efi/shim.c.o -lefi -lgnuefi /usr/lib/gcc/aarch64-linux-gnu/10/libgcc.a
/usr/bin/ld: src/boot/efi/graphics.c.o:/root/systemd/build/../src/boot/efi/util.h:54: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:54: first defined here
/usr/bin/ld: src/boot/efi/pe.c.o:/root/systemd/build/../src/boot/efi/util.h:54: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:54: first defined here
/usr/bin/ld: src/boot/efi/util.c.o:/root/systemd/build/../src/boot/efi/util.h:54: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:54: first defined here
/usr/bin/ld: src/boot/efi/boot.c.o:/root/systemd/build/../src/boot/efi/util.h:54: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:54: first defined here
/usr/bin/ld: src/boot/efi/console.c.o:/root/systemd/build/../src/boot/efi/util.h:54: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:54: first defined here
/usr/bin/ld: src/boot/efi/shim.c.o:/root/systemd/build/../src/boot/efi/util.h:54: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:54: first defined here
[561/1743] Generating test-libsystemd-sym.c with a custom command (wrapped by meson to capture output)
ninja: build stopped: subcommand failed.
root@debian-bullseye-systemd-test-v241:~/systemd# echo $?
1
root@debian-bullseye-systemd-test-v241:~/systemd# 

=> build FAILS

$ exit 
root$ lxc stop debian-bullseye-systemd-test-v241

====

root$ lxc copy debian-bullseye-systemd-test debian-bullseye-systemd-test-v248
root$ lxc start debian-bullseye-systemd-test-v248
root$ lxc exec debian-bullseye-systemd-test-v248 -- /bin/bash

$ cd systemd
$ git checkout v248
$ meson setup --wipe build/
$ meson build/ && ninja -C build
$ meson install -C build/
$ reboot

root$ lxc exec debian-bullseye-systemd-test-v248 -- /bin/bash

$ systemctl unmask systemd-networkd
$ systemctl unmask systemd-networkd.socket
$ systemctl unmask systemd-networkd-wait-online.service
$ systemctl enable systemd-networkd
$ systemctl enable systemd-networkd.socket
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl daemon-reload
$ mv /etc/network/interfaces /etc/network/interfaces.save

$ cat > /etc/systemd/network/eth0.network << EOF
[Match]
Name=eth0
[Network]
DHCP=true
EOF
$ systemctl start systemd-networkd
$ networkctl reload
$ reboot

root$ lxc exec debian-bullseye-systemd-test-v248 -- /bin/bash

root@debian-bullseye-systemd-test-v248:~# networkctl -l status eth0
● 45: eth0                                                                     
                     Link File: /usr/lib/systemd/network/99-default.link
                  Network File: /etc/systemd/network/eth0.network
                          Type: ether
                         State: routable (configured)
                        Driver: veth
                    HW Address: 00:16:3e:c9:2d:1d (Xensource, Inc.)
                           MTU: 1394 (min: 68, max: 65535)
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
          Queue Length (Tx/Rx): 1/1
              Auto negotiation: no
                         Speed: 10Gbps
                        Duplex: full
                          Port: tp
                       Address: 10.204.33.69 (DHCP4 via 10.204.32.2)
                                2a03:2260:200f:101:216:3eff:fec9:2d1d
                                fd01:fd59:0:1800:216:3eff:fec9:2d1d
                                fe80::216:3eff:fec9:2d1d
                       Gateway: 10.204.32.2
                                fe80::ba:7aff:fedf:101
                           DNS: 10.204.32.1
                                fd01:fd59:0:1800::1:1
             Activation Policy: up
               DHCP4 Client ID: IAID:0x511822df/DUID
             DHCP6 Client IAID: 0x511822df
             DHCP6 Client DUID: DUID-EN/Vendor:0000ab11499382881370f8d70000

Oct 19 21:28:45 debian-bullseye-systemd-test-v248 systemd-networkd[94]: eth0: Gained IPv6LL
Oct 19 21:28:45 debian-bullseye-systemd-test-v248 systemd-networkd[94]: eth0: DHCPv4 address 10.204.33.69/20 via 10.204.32.2
root@debian-bullseye-systemd-test-v248:~#

=> OK!

$ exit 
root$ lxc stop debian-bullseye-systemd-test-v248

=====

root$ lxc copy debian-bullseye-systemd-test debian-bullseye-systemd-test-v244
root$ lxc start debian-bullseye-systemd-test-v244
root$ lxc exec debian-bullseye-systemd-test-v244 -- /bin/bash

$ cd systemd
$ git checkout v244
$ meson setup --wipe build/
$ meson build/ && ninja -C build
[...]
ninja: Entering directory `build'
[504/1549] Compiling C object src/network/libnetworkd-core.a.p/netdev_tunnel.c.o
../src/network/netdev/tunnel.c: In function ‘ipip_sit_init’:
../src/network/netdev/tunnel.c:732:27: warning: implicit conversion from ‘enum <anonymous>’ to ‘FooOverUDPEncapType’ [-Wenum-conversion]
  732 |         t->fou_encap_type = FOU_ENCAP_DIRECT;
      |                           ^
../src/network/netdev/tunnel.c: In function ‘gre_erspan_init’:
../src/network/netdev/tunnel.c:774:27: warning: implicit conversion from ‘enum <anonymous>’ to ‘FooOverUDPEncapType’ [-Wenum-conversion]
  774 |         t->fou_encap_type = FOU_ENCAP_DIRECT;
      |                           ^
[593/1549] Generating stub.so with a custom command
FAILED: src/boot/efi/stub.so 
/usr/bin/ld -o src/boot/efi/stub.so -T /usr/lib/elf_aarch64_efi.lds -shared -Bsymbolic -nostdlib -znocombreloc -L /usr/lib /usr/lib/crt0-efi-aarch64.o --defsym=EFI_SUBSYSTEM=0xa src/boot/efi/disk.c.o src/boot/efi/graphics.c.o src/boot/efi/measure.c.o src/boot/efi/pe.c.o src/boot/efi/util.c.o src/boot/efi/linux.c.o src/boot/efi/splash.c.o src/boot/efi/stub.c.o -lefi -lgnuefi /usr/lib/gcc/aarch64-linux-gnu/10/libgcc.a
/usr/bin/ld: src/boot/efi/graphics.c.o:/root/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/pe.c.o:/root/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/util.c.o:/root/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/linux.c.o:/root/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/splash.c.o:/root/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:58: first defined here
/usr/bin/ld: src/boot/efi/stub.c.o:/root/systemd/build/../src/boot/efi/util.h:58: multiple definition of `loader_guid'; src/boot/efi/disk.c.o:/root/systemd/build/../src/boot/efi/util.h:58: first defined here
[598/1549] Generating test-libudev-sym.c with a custom command (wrapped by meson to capture output)
ninja: build stopped: subcommand failed.
root@debian-bullseye-systemd-test-v244:~/systemd# echo $?
1
root@debian-bullseye-systemd-test-v244:~/systemd# 

=> build FAILS

$ exit 
root$ lxc stop debian-bullseye-systemd-test-v244

=====

root$ lxc copy debian-bullseye-systemd-test debian-bullseye-systemd-test-v246
root$ lxc start debian-bullseye-systemd-test-v246
root$ lxc exec debian-bullseye-systemd-test-v246 -- /bin/bash

$ cd systemd
$ git checkout v246
$ meson setup --wipe build/
$ meson build/ && ninja -C build
$ meson install -C build/
$ reboot

root$ lxc exec debian-bullseye-systemd-test-v246 -- /bin/bash

$ systemctl unmask systemd-networkd
$ systemctl unmask systemd-networkd.socket
$ systemctl unmask systemd-networkd-wait-online.service
$ systemctl enable systemd-networkd
$ systemctl enable systemd-networkd.socket
$ systemctl enable systemd-networkd-wait-online.service
$ systemctl daemon-reload
$ mv /etc/network/interfaces /etc/network/interfaces.save

$ cat > /etc/systemd/network/eth0.network << EOF
[Match]
Name=eth0
[Network]
DHCP=true
EOF
$ systemctl start systemd-networkd
$ networkctl reload
$ reboot

root$ lxc exec debian-bullseye-systemd-test-v246 -- /bin/bash

root@debian-bullseye-systemd-test-v246:~# networkctl -l status eth0
● 57: eth0                                                                     
                     Link File: /usr/lib/systemd/network/99-default.link       
                  Network File: /etc/systemd/network/eth0.network              
                          Type: ether                                          
                         State: routable (configured)
                        Driver: veth                                           
                    HW Address: 00:16:3e:a6:e3:35 (Xensource, Inc.)            
                           MTU: 1394 (min: 68, max: 65535)                     
                         QDisc: noqueue                                        
  IPv6 Address Generation Mode: eui64                                          
          Queue Length (Tx/Rx): 1/1                                            
              Auto negotiation: no                                             
                         Speed: 10Gbps                                         
                        Duplex: full                                           
                          Port: tp                                             
                       Address: 10.204.32.252 (DHCP4 via 10.204.32.2)          
                                2a03:2260:200f:101:216:3eff:fea6:e335          
                                fe80::216:3eff:fea6:e335                       
                       Gateway: 10.204.32.2                                    
                                fe80::ba:7aff:fedf:101                         
                           DNS: 10.204.32.1                                    
                                fd01:fd59:0:1800::1:1                          
               DHCP4 Client ID: IAID:0x5c902b8f/DUID                           
             DHCP6 Client IAID: 0x5c902b8f                                     
             DHCP6 Client DUID: DUID-EN/Vendor:0000ab11499382881370f8d70000    

Oct 19 22:31:13 debian-bullseye-systemd-test-v246 systemd-networkd[73]: eth0: Gained IPv6LL
Oct 19 22:31:13 debian-bullseye-systemd-test-v246 systemd-networkd[73]: eth0: IPv6 successfully enabled
Oct 19 22:31:13 debian-bullseye-systemd-test-v246 systemd-networkd[73]: eth0: DHCPv4 address 10.204.32.252/20 via 10.204.32.2
root@debian-bullseye-systemd-test-v246:~#

=> OK!

$ exit 
root$ lxc stop debian-bullseye-systemd-test-v246

=====

Edit:

With further bisect’ing I found:

So it seems to be related to the return code of some udevadm trigger call. More details here: https://github.com/systemd/systemd/pull/18559

Edit2:

Could solve the Debian Sid vs. Debian Bullseye + systemd v249 mystery:

The Debian Sid container works for me after installing the udev package (which is build from the systemd v249 source). Otherwise udevadm is missing.

Edit3:

Backporting/cherry-picking just 0e789e6d4 and ensuring that udev/udevadm is installed is sufficient on Debian Bullseye, tested this. Cherry-picking 0e789e6d4 onto v247 does not work cleanly, but fixing it up is straight forward.

1 Like