do-release-upgrade reinstalls netplan.io, breaking systemd-networkd configuration
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netplan.io (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
[impact]
Users who have chosen to remove the 'netplan.io' package and manually configure systemd-networkd, when upgrading, will have the 'netplan.io' package reinstalled, which will create a new dynamic networkd configuration after reboot, which breaks system networking.
[test case]
install an Ubuntu release, e.g. Bionic.
Make sure some 'desktop' metapackage is installed, e.g.:
$ sudo apt install xubuntu-desktop
Remove netplan:
$ sudo apt purge netplan.io
note that the above command removes not only 'netplan.io' but also 'ubuntu-minimal'
then, configure systemd-networkd manually, in some way that would conflict with netplan's default of just using dhcp on the main interface, e.g.:
$ grep . /etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
/etc/systemd/
(That is a trivial example of networkd config that would conflict with netplan's default, real examples can be much more complex, even as far as causing systemd-networkd to fail to start)
reboot the system to discard old netplan networkd configuration, and pick up new manual networkd configuration. If needed, edit /etc/update-
$ sudo do-release-upgrade
following the prompts to complete the upgrade, including the final prompt to reboot after the upgrade.
Boot into the upgraded system and check if netplan is installed and operating:
$ dpkg -l|grep netplan
ii netplan.io 0.97-0ubuntu1~
$ ls -l /run/systemd/
total 8
-rw-r--r-- 1 root root 69 Sep 24 15:36 10-netplan-
-rw-r--r-- 1 root root 129 Sep 24 15:36 10-netplan-
[regression potential]
TBD
[other info]
This appears to require one of the 'desktop' packages installed, e.g. 'ubuntu-desktop, 'xubuntu-desktop', etc.; I reproduced it with 'xubuntu-desktop' installed, but could not reproduce it with a stock cloud image that has no 'desktop' package installed.
I opened this against netplan, but it might be an issue that should be addressed in ubuntu- release- upgrader, not netplan, since netplan is just doing its job after being installed.