c1 running on lxd on bare metal with security.nesting=true
nested1 running in c1, with a rather standard lxd server setup.
Trying to follow this guide in nested1 but I cannot get it working, lxd-dns-lxdbr0 doesn’t start
$ cat /etc/systemd/system/lxd-dns-lxdbr0.service
[Unit]
Description=LXD per-link DNS configuration for lxdbr0
BindsTo=sys-subsystem-net-devices-lxdbr0.device
After=sys-subsystem-net-devices-lxdbr0.device
[Service]
Type=oneshot
ExecStart=/usr/bin/resolvectl dns lxdbr0 10.239.107.6
ExecStart=/usr/bin/resolvectl domain lxdbr0 '~localenv.com'
[Install]
WantedBy=sys-subsystem-net-devices-lxdbr0.device
$ systemctl status sys-subsystem-net-devices-lxdbr0.device
● sys-subsystem-net-devices-lxdbr0.device - /sys/subsystem/net/devices/lxdbr0
Loaded: loaded
Active: inactive (dead)
May 25 11:18:43 ncenv systemd[1]: sys-subsystem-net-devices-lxdbr0.device: Job sys-subsystem-net-devices-lxdbr0.device/start timed out.
May 25 11:18:43 ncenv systemd[1]: Timed out waiting for device /sys/subsystem/net/devices/lxdbr0.
May 25 11:18:43 ncenv systemd[1]: sys-subsystem-net-devices-lxdbr0.device: Job sys-subsystem-net-devices-lxdbr0.device/start failed wit>
Is there some setting that I’m missing to make it work? Manually issuing the resolvectl commands is successful, but as pointed out in that guide, not reboot-persistent.
So I think the issue here is udev not updating the systemctl units list with the subsystem devices.
If you run systemctl daemon-reload after the lxdbr0 interface is created, you’ll see sys-subsystem-net-devices-lxdbr0 in the systemctl list.
@stgraber@brauner I’m using images:ubuntu/22.04 and ubuntu 22.04 on the host, is it expected that udev work OK for network devices?