In some cases netplan is not switching the renderer as expected on Ubuntu Core 22. In a system with network-manager snap from track 22 installed, I run this script to switch between renderers:
´´´
#!/bin/bash -ex
netplan_cfg_p=/etc/netplan/00-default-nm-renderer.yaml
if [ -f $netplan_cfg_p ]; then
rm $netplan_cfg_p
else
cat > $netplan_cfg_p<<EOF
network:
renderer: NetworkManager
EOF
fi
+ rm /etc/netplan/00-default-nm-renderer.yaml
+ dbus-send --system --type=method_call --print-reply --dest=io.netplan.Netplan /io/netplan/Netplan io.netplan.Netplan.Apply
method return time=1655796091.488185 sender=:1.29 -> destination=:1.95 serial=20 reply_serial=2
boolean true
+ /snap/bin/nmcli d
DEVICE TYPE STATE CONNECTION
ens3 ethernet connected netplan-ens3
lo loopback unmanaged --
+ networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 ens3 ether routable configured
2 links listed.
NM is still handling the device even though it is not the default renderer anymore. I see a file in /run/NetworkManager/system-connections/netplan-ens3.nmconnection, and no files in /run/systemd/network/ (although networkd seems to take care of the interface, not sure how that happens).
In some cases netplan is not switching the renderer as expected on Ubuntu Core 22. In a system with network-manager snap from track 22 installed, I run this script to switch between renderers:
´´´
#!/bin/bash -ex
netplan_ cfg_p=/ etc/netplan/ 00-default- nm-renderer. yaml
if [ -f $netplan_cfg_p ]; then
rm $netplan_cfg_p
else
cat > $netplan_cfg_p<<EOF
network:
renderer: NetworkManager
EOF
fi
dbus-send --system --type=method_call --print-reply \
--dest= io.netplan. Netplan /io/netplan/Netplan \
io.netplan. Netplan. Apply
/snap/bin/nmcli d
networkctl
´´´
And with a couple of tries I see:
+ rm /etc/netplan/ 00-default- nm-renderer. yaml io.netplan. Netplan /io/netplan/Netplan io.netplan. Netplan. Apply .488185 sender=:1.29 -> destination=:1.95 serial=20 reply_serial=2
+ dbus-send --system --type=method_call --print-reply --dest=
method return time=1655796091
boolean true
+ /snap/bin/nmcli d
DEVICE TYPE STATE CONNECTION
ens3 ethernet connected netplan-ens3
lo loopback unmanaged --
+ networkctl
IDX LINK TYPE OPERATIONAL SETUP
1 lo loopback carrier unmanaged
2 ens3 ether routable configured
2 links listed.
NM is still handling the device even though it is not the default renderer anymore. I see a file in /run/NetworkMan ager/system- connections/ netplan- ens3.nmconnecti on, and no files in /run/systemd/ network/ (although networkd seems to take care of the interface, not sure how that happens).