netplan sometimes does not switch properly the renderer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Invalid
|
Medium
|
Unassigned |
Bug Description
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_
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 \
/snap/bin/nmcli d
networkctl
´´´
And with a couple of tries I see:
+ rm /etc/netplan/
+ 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
```
# This is the network config written by 'console-conf'
network:
ethernets:
ens3:
dhcp4: true
version: 2
```
description: | updated |
I have not yet been able to fully reproduce this in a classic system, but I wonder if this might help: https:/ /github. com/canonical/ netplan/ pull/276