Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Debian 11 container netplan not working

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
charlie101
Posts: 11
Joined: 2014-11-18 03:59

Debian 11 container netplan not working

#1 Post by charlie101 »

closed:
Reference from Linuxcontainer.org:

https://bugs.debian.org/cgi-bin/bugrepo ... bug=997006



I have a couple of containers running Debian 10 with netplan installed and working.
I’ve recently created a debian 11 container and installed netplan.
I enabled systemd.networkd and copied in a working netplan.yaml file from one of my debian 10 containers. I did not create any files under /etc/systemd/network as I assume netplan should take care of the necessary files under /run. Unfortunately something is wrong because my virtual nics have no ip addresses.

when I cd to /run and do a find I get:

find ./|grep -i network

./network
./network/ifstate
./network/.ifstate.lock
./network/ifstate.lo
./NetworkManager
./NetworkManager/conf.d
./NetworkManager/conf.d/netplan.conf
./systemd/network
./systemd/network/10-netplan-eth1.network
./systemd/network/10-netplan-eth0.network
./systemd/generator/network-online.target.wants
./systemd/generator/network-online.target.wants/systemd-networkd-wait-online.service
./systemd/generator/multi-user.target.wants/systemd-networkd.service
./systemd/units/invocation:networking.service
./systemd/units/invocation:systemd-networkd.service
./systemd/system/systemd-networkd.service.wants
./systemd/system/systemd-networkd.service.wants/netplan-ovs-cleanup.service

Looking inside /run/systemd/network/10-netplan-eth0.network I have:

[Network]
LinkLocalAddressing=ipv6
Address=10.0.1.3/16
Gateway=10.0.0.1
DNS=10.0.0.1
Domains=xxx.com

10-netplan-eth1.network contains similar but with external ip addresses

When I check journalctl I find:

Jan 16 23:36:26 debian11 systemd-journald[68]: Journal started
Jan 16 23:36:26 debian11 systemd-journald[68]: Runtime Journal (/run/log/journal/c97bb26dc5714b94a537c8ef54a37b96) is 8.0M, max 643.0M, 635.0M free.
Jan 16 23:36:26 debian11 systemd[64]: modprobe@configfs.service: Executable /sbin/modprobe missing, skipping: No such file or directory
Jan 16 23:36:26 debian11 systemd[65]: modprobe@drm.service: Executable /sbin/modprobe missing, skipping: No such file or directory
Jan 16 23:36:26 debian11 sh[66]: ifquery: couldn't open interfaces file "/etc/network/interfaces": No such file or directory
Jan 16 23:36:26 debian11 systemd[67]: modprobe@fuse.service: Executable /sbin/modprobe missing, skipping: No such file or directory
Jan 16 23:36:26 debian11 systemd[1]: Starting Flush Journal to Persistent Storage...
Jan 16 23:36:26 debian11 systemd[1]: Finished Create Static Device Nodes in /dev.
Jan 16 23:36:26 debian11 systemd[1]: Reached target Local File Systems (Pre).
Jan 16 23:36:26 debian11 systemd[1]: Reached target Local File Systems.
Jan 16 23:36:26 debian11 systemd[1]: Starting Raise network interfaces...
Jan 16 23:36:26 debian11 systemd[1]: Condition check resulted in Store a System Token in an EFI Variable being skipped.
Jan 16 23:36:26 debian11 systemd[1]: Condition check resulted in Commit a transient machine-id on disk being skipped.
Jan 16 23:36:26 debian11 systemd-journald[68]: Time spent on flushing to /var/log/journal/c97bb26dc5714b94a537c8ef54a37b96 is 8.862ms for 13 entries.
Jan 16 23:36:26 debian11 systemd-journald[68]: System Journal (/var/log/journal/c97bb26dc5714b94a537c8ef54a37b96) is 126.0K, max 4.0G, 3.9G free.
Jan 16 23:36:27 debian11 ifup[76]: ifup: couldn't open interfaces file "/etc/network/interfaces": No such file or directory
Jan 16 23:36:26 debian11 systemd[1]: Finished Raise network interfaces.
Jan 16 23:36:26 debian11 systemd-networkd[72]: Failed to increase receive buffer size for general netlink socket, ignoring: Operation not permitted
Jan 16 23:36:26 debian11 systemd-networkd[72]: Failed to increase buffer size for device monitor, ignoring: Operation not permitted
Jan 16 23:36:26 debian11 systemd-networkd[72]: Enumeration completed
Jan 16 23:36:26 debian11 systemd[1]: Started Network Service.
Jan 16 23:36:26 debian11 systemd[1]: Reached target Network.
Jan 16 23:36:27 debian11 systemd-networkd[72]: eth1: Gained IPv6LL

ifconfig gives:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::216:3eff:fe52:76dc prefixlen 64 scopeid 0x20<link>
ether 00:16:3e:52:76:dc txqueuelen 1000 (Ethernet)
RX packets 22 bytes 1376 (1.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 14 bytes 1076 (1.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::216:3eff:fe0f:cf6c prefixlen 64 scopeid 0x20<link>
ether 00:16:3e:0f:cf:6c txqueuelen 1000 (Ethernet)
RX packets 325 bytes 51541 (50.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 9 bytes 750 (750.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

Any help greatly appreciated. Thanks in advance.


Update:

I went through the systemd components in debug mode and nothing suspicious jumped out.
I ran netplan in debug mode: netplan --debug apply. The thing that jumps out here is that netplan/python cannot find udevadm.


DEBUG:Link changes: {}
DEBUG:netplan triggering .link rules for lo
Traceback (most recent call last):
File "/usr/sbin/netplan", line 23, in <module>
netplan.main()
File "/usr/share/netplan/netplan/cli/core.py", line 50, in main
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 257, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 55, in run
self.run_command()
File "/usr/share/netplan/netplan/cli/utils.py", line 257, in run_command
self.func()
File "/usr/share/netplan/netplan/cli/commands/apply.py", line 198, in command_apply
subprocess.check_call(['udevadm', 'test-builtin',
File "/usr/lib/python3.9/subprocess.py", line 368, in check_call
retcode = call(*popenargs, **kwargs)
File "/usr/lib/python3.9/subprocess.py", line 349, in call
with Popen(*popenargs, **kwargs) as p:
File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.9/subprocess.py", line 1823, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'udevadm'.

So this looks like a bug to me but I'm not sure where the bug is eg systemd, netplan, python, container, LXD, permissions - appamor etc. I've run out of time so I'm going to work round netplan by just using networkd.

Post Reply