Merge ~danilogondolfo/network-manager/+git/network-manager:lp2040153 into network-manager:ubuntu-mantic
Proposed by
Danilo Egea Gondolfo
Status: | Merged |
---|---|
Merged at revision: | ad4c5c166b19d084ddd5738db3bb30eb8e4e0a19 |
Proposed branch: | ~danilogondolfo/network-manager/+git/network-manager:lp2040153 |
Merge into: | network-manager:ubuntu-mantic |
Diff against target: |
154 lines (+69/-13) 5 files modified
debian/changelog (+14/-0) debian/patches/netplan/0003-Allow-the-NetworkManager-daemon-to-write-to-lib-netp.patch (+33/-0) debian/patches/series (+1/-0) debian/tests/control (+1/-1) debian/tests/nm_netplan.py (+20/-12) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sebastien Bacher | Approve | ||
Lukas Märdian | Approve | ||
Network-manager | Pending | ||
Review via email: mp+454296@code.launchpad.net |
To post a comment you must log in.
Changes:
nm_netplan.py: start NetworkManager with systemd instead of calling /usr/sbin/ NetworkManager directly. This ensures that NetworkManager will behave like it would in a non-testing environment. Also, add a few more connection deletes to some tests.
new patch d/p/netplan/ 0003-Allow- the-NetworkMana ger-daemon- to-write- to-lib- netp.patch: Because of ProtectSystem=true, systemd is mounting /usr as read-only for Network Manager. When the file /usr/lib/ netplan/ 00-network- manager- all.yaml is present, libnetplan will try to open it for writing. This is leading to a failure when libnetplan tries to delete a connection. This change adds ReadWritePaths= /usr/lib/ netplan so this path will not be read-only.
debian/ tests/control: add all the dependencies required to run the test script plus ubuntu-settings to install /usr/lib/ netplan/ 00-network- manager- all.yaml. This test script was being skipped for some time now due to missing dependencies.
How to test and verify it works:
Launch a new Mantic VM:
lxc launch ubuntu:mantic --vm
Add the PPA with the fix:
sudo add-apt-repository ppa:danilogondo lfo/network- manager
sudo apt update
Install network-manager and ubuntu-settings:
sudo apt install network-manager ubuntu-settings
Run Netplan
netplan apply
Create a dummy connection:
nmcli con add type dummy connection. interface- name dummy0
Check a new YAML will be created in /etc/netplan
Delete the connection
nmcli con del dummy-dummy0
Check the YAML was removed from /etc/netplan
Run the same test in a new VM WITHOUT the PPA and check the YAML will not be delete when you delete the connection.
You will see the error below in the NetworkManager's journal
netplan_ delete_ connection: Cannot write output state: Read-only file system
Autopkgtests
amd64 - https:/ /autopkgtest. ubuntu. com/results/ autopkgtest- mantic- danilogondolfo- network- manager/ mantic/ amd64/n/ network- manager/ 20231023_ 175203_ b2798@/ log.gz
ppc64 - https:/ /autopkgtest. ubuntu. com/results/ autopkgtest- mantic- danilogondolfo- network- manager/ mantic/ ppc64el/ n/network- manager/ 20231023_ 182332_ f0497@/ log.gz
s390x - https:/ /autopkgtest. ubuntu. com/results/ autopkgtest- mantic- danilogondolfo- network- manager/ mantic/ s390x/n/ network- manager/ 20231023_ 190810_ ced8d@/ log.gz
arm64 - https:/ /autopkgtest. ubuntu. com/results/ autopkgtest- mantic- danilogondolfo- network- manager/ mantic/ arm64/n/ network- manager/ 20231024_ 084542_ ac017@/ log.gz
armhf - https:/ /autopkgtest. ubuntu. com/results/ autopkgtest- mantic- danilogondolfo- network- manager/ mantic/ armhf/n/ network- manager/ 20231024_ 083545_ ac017@/ log.gz