debsums: changed file /lib/netplan/00-network-manager-all.yaml (from ubuntu-settings package)

Bug #2078759 reported by Kai-Chuan Hsieh
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OEM Priority Project
Confirmed
Medium
Bin Li
netplan.io (Ubuntu)
Triaged
Medium
Unassigned
ubuntu-settings (Ubuntu)
Invalid
Low
Unassigned

Bug Description

On ubuntu desktop 24.04 image, run the operations below

1. $ nmcli d wifi connect <SSID> password <password>
2. $ nmcli c delete <SSID>
3. $ sudo debsums -s

Then the error is happened debsums: changed file /lib/netplan/00-network-manager-all.yaml (from ubuntu-settings package)

it seems the netplan update the file belonged to ubuntu-settings that cause the debsums failed.
---
ProblemType: Bug
ApportVersion: 2.28.1-0ubuntu3.1
Architecture: amd64
CasperMD5CheckMismatches: ./casper/initrd ./casper/vmlinuz ./casper/minimal.standard.live.hotfix.squashfs ./casper/minimal.standard.hotfix.squashfs ./casper/minimal.hotfix.squashfs ./boot/grub/grub.cfg
CasperMD5CheckResult: fail
DistributionChannelDescriptor:
 # This is the distribution channel descriptor for Ubuntu 24.04 for Dell
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-noble-oem-24.04a-next-20240902-67
DistroRelease: Ubuntu 24.04
InstallationDate: Installed on 2024-09-02 (1 days ago)
InstallationMedia: Ubuntu OEM 24.04.1 LTS "Noble Numbat" - Release amd64 (20240829)
Package: netplan.io 1.0.1-1ubuntu2~24.04.1
PackageArchitecture: amd64
ProcVersionSignature: User Name 6.8.0-1012.12-oem 6.8.12
Tags: noble
Uname: Linux 6.8.0-1012-oem x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lxd sudo
_MarkForUpload: True

Related branches

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : Dependencies.txt

apport information

tags: added: apport-collected noble
description: updated
Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote : ProcEnviron.txt

apport information

tags: added: jira-somerville-805 oem-priority
Bin Li (binli)
tags: added: jira-sutton-68
Revision history for this message
Danilo Egea Gondolfo (danilogondolfo) wrote :

There is a comment in the first line of /lib/netplan/00-network-manager-all.yaml.

We seem to be dropping it when we call update_yaml_hierarchy() (I guess) and the file is updated.

I think we have an LP bug about preserving comments...

A workaround would consist in shipping the file without the comment.

Here is a simpler reproducer:

root@noble-desktop:~# nmcli con add type dummy ifname dummy0
Connection 'dummy-dummy0' (7ba86ef2-0b18-447e-ae63-eebb08aec9c1) successfully added.

root@noble-desktop:~# cat /lib/netplan/00-network-manager-all.yaml
# there is a comment here
network:
  version: 2
  renderer: NetworkManager

root@noble-desktop:~# nmcli con del dummy-dummy0
Connection 'dummy-dummy0' (7ba86ef2-0b18-447e-ae63-eebb08aec9c1) successfully deleted.

root@noble-desktop:~# cat /lib/netplan/00-network-manager-all.yaml
network:
  version: 2
  renderer: NetworkManager

Changed in netplan.io (Ubuntu):
status: New → Triaged
Revision history for this message
Lukas Märdian (slyon) wrote :

I wonder if Netplan should modify files in /usr/lib/netplan/ at all? Yes, it needs to read those files, to get a full view of the configuration. But writing should probably be limited to /run/ and /etc/netplan/ ...

tags: added: foundations-todo
Changed in netplan.io (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Sebastien Bacher (seb128) wrote :

I'm going to close the ubuntu-settings part, it's just a settings package shipping a configuration, we are not responsible to edits made to that file from other components

Changed in ubuntu-settings (Ubuntu):
importance: Undecided → Low
Changed in ubuntu-settings (Ubuntu):
status: New → Invalid
Revision history for this message
Bin Li (binli) wrote :

With Danilo comment #4, it works fine if we could remove the comment.

u@oak2-10:~$ nmcli connection add type dummy ifname d0
Connection 'dummy-d0' (2364f50d-72d5-4849-804d-f6d28467bf93) successfully added.
u@oak2-10:~$ sudo cat /lib/netplan/00-network-manager-all.yaml·
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
u@oak2-10:~$ sudo md5sum /lib/netplan/00-network-manager-all.yaml
81c200b0e29eeb56c518a23eb78777ab /lib/netplan/00-network-manager-all.yaml

u@oak2-10:~$ nmcli connection delete dummy-d0·
Connection 'dummy-d0' (2364f50d-72d5-4849-804d-f6d28467bf93) successfully deleted.
u@oak2-10:~$ sudo md5sum /lib/netplan/00-network-manager-all.yaml
9b5681f7d3fc877b018790626772c504 /lib/netplan/00-network-manager-all.yaml

u@oak2-10:~$ sudo cat /lib/netplan/00-network-manager-all.yaml
network:
  version: 2
  renderer: NetworkManager

u@oak2-10:~$ nmcli connection add type dummy ifname d1
Connection 'dummy-d1' (f9e7f8f7-d685-4123-88e6-118f70342320) successfully added.
u@oak2-10:~$ sudo md5sum /lib/netplan/00-network-manager-all.yaml
9b5681f7d3fc877b018790626772c504 /lib/netplan/00-network-manager-all.yaml

u@oak2-10:~$ nmcli connection delete dummy-d1·
Connection 'dummy-d1' (f9e7f8f7-d685-4123-88e6-118f70342320) successfully deleted.
u@oak2-10:~$ sudo md5sum /lib/netplan/00-network-manager-all.yaml
9b5681f7d3fc877b018790626772c504 /lib/netplan/00-network-manager-all.yaml

Revision history for this message
Bin Li (binli) wrote :

@seb128,

 I checked the history, and the comment line has been there since the first commit. I'm not sure if there's a reason to keep it. Could we remove the comment line in the YAML file? I just made a MR with the suggestion from 'Danilo Egea Gondolfo'. Feel free to reject it if it's not acceptable. Thanks!

commit 38a5c5b213120a2a8d96b3238e4e3f4566a13c4b
Author: Dave Jones <email address hidden>
Date: Thu May 18 15:33:43 2023 +0100

    Move 01-use-network-manager.yaml

    To /lib/netplan/ and remove (or move, if modified) the original in
    /etc/netplan. Use 00- prefix as agreed at the sprint to ensure it's
    first in the configuration order. Finally, use 0600 mode to stop the
    newer netplan complaining about the file mode.

diff --git a/data/ubuntu/00-network-manager-all.yaml b/data/ubuntu/00-network-manager-all.yaml
new file mode 100644
index 0000000..4a8fd08
--- /dev/null
+++ b/data/ubuntu/00-network-manager-all.yaml
@@ -0,0 +1,4 @@
+# Let NetworkManager manage all devices on this system
+network:
+ version: 2
+ renderer: NetworkManager

Changed in oem-priority:
assignee: nobody → Bin Li (binli)
importance: Undecided → Medium
status: New → Confirmed
tags: added: jira-somerville-956
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.