[Bug 2039268] Re: When upgrading to Mantic, it fails to install snap firmware-updater

Nick Rosbrook 2039268 at bugs.launchpad.net
Wed Nov 1 21:15:06 UTC 2023


Since snapd has been released to {lunar,mantic}-updates, I tested an
upgrade from lunar to mantic without any modifications, and all went
well:

nr at clean-lunar-amd64:~$ sudo apt update && sudo apt install snapd -y
[sudo] password for nr: 
Get:1 http://security.ubuntu.com/ubuntu lunar-security InRelease [109 kB]
Hit:2 http://archive.ubuntu.com/ubuntu lunar InRelease                         
Get:3 http://archive.ubuntu.com/ubuntu lunar-updates InRelease [109 kB]
Get:4 http://security.ubuntu.com/ubuntu lunar-security/main amd64 DEP-11 Metadata [7,412 B]
Get:5 http://security.ubuntu.com/ubuntu lunar-security/universe amd64 DEP-11 Metadata [32.0 kB]
Get:6 http://archive.ubuntu.com/ubuntu lunar-updates/main Sources [155 kB]  
Get:7 http://archive.ubuntu.com/ubuntu lunar-updates/main amd64 Packages [503 kB]
Get:8 http://archive.ubuntu.com/ubuntu lunar-updates/main amd64 DEP-11 Metadata [81.1 kB]
Get:9 http://archive.ubuntu.com/ubuntu lunar-updates/universe i386 Packages [674 kB]
Get:10 http://archive.ubuntu.com/ubuntu lunar-updates/universe amd64 Packages [814 kB]
Get:11 http://archive.ubuntu.com/ubuntu lunar-updates/universe amd64 DEP-11 Metadata [71.5 kB]
Fetched 2,555 kB in 2s (1,477 kB/s)                             
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-6.2.0-26 linux-headers-6.2.0-26-generic
  linux-image-5.19.0-46-generic linux-image-6.2.0-26-generic
  linux-modules-5.19.0-46-generic linux-modules-6.2.0-26-generic
  linux-modules-extra-5.19.0-46-generic linux-modules-extra-6.2.0-26-generic
Use 'sudo apt autoremove' to remove them.
The following packages will be upgraded:
  snapd
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.2 MB of archives.
After this operation, 4,096 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu lunar-updates/main amd64 snapd amd64 2.59.1+23.04ubuntu1.2 [26.2 MB]
Fetched 26.2 MB in 2s (14.5 MB/s) 
(Reading database ... 248469 files and directories currently installed.)
Preparing to unpack .../snapd_2.59.1+23.04ubuntu1.2_amd64.deb ...
Unpacking snapd (2.59.1+23.04ubuntu1.2) over (2.59.1+23.04ubuntu1.1) ...
Setting up snapd (2.59.1+23.04ubuntu1.2) ...
snapd.failure.service is a disabled or a static unit not running, not starting i
t.
snapd.snap-repair.service is a disabled or a static unit not running, not starti
ng it.
Failed to restart snapd.mounts-pre.target: Operation refused, unit snapd.mounts-
pre.target may be requested by dependency only (it is configured to refuse manua
l start/stop).
See system logs and 'systemctl status snapd.mounts-pre.target' for details.
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 145.
Processing triggers for gnome-menus (3.36.0-1.1ubuntu1) ...
Processing triggers for man-db (2.11.2-1) ...
Processing triggers for dbus (1.14.4-1ubuntu1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu5) ...

nr at clean-lunar-amd64:~$ do-release-upgrade -d
Checking for a new Ubuntu release

= Welcome to Ubuntu 23.10 'Mantic Minotaur' =

The Ubuntu team is proud to announce Ubuntu 23.10 'Mantic Minotaur'.

[...]

Processing snap replacements

refreshing snap core22

installing snap firmware-updater

refreshing snap gnome-42-2204

refreshing snap gtk-common-themes

refreshing snap snap-store

refreshing snap snapd-desktop-integration

refreshing snap firefox

Searching for obsolete software
Reading state information... Done

Remove obsolete packages?


90 packages are going to be removed. 

 Continue [yN]  Details [d]y
Fetched 0 B in 0s (0 B/s)                                                                                                                     

[...]

System upgrade is complete.

Restart required

To finish the upgrade, a restart is required. 
If you select 'y' the system will be restarted. 

Continue [yN] N
nr at clean-lunar-amd64:~$ snap list
Name                       Version           Rev    Tracking         Publisher   Notes
bare                       1.0               5      latest/stable    canonical\u2713  base
core20                     20230801          2015   latest/stable    canonical\u2713  base
core22                     20230801          864    latest/stable    canonical\u2713  base
firefox                    118.0-1           3166   latest/stable/\u2026  mozilla\u2713    -
firmware-updater           0+git.e8771be     109    latest/stable/\u2026  canonical\u2713  -
gnome-3-38-2004            0+git.efb213a     143    latest/stable    canonical\u2713  -
gnome-42-2204              0+git.ff35a85     141    latest/stable/\u2026  canonical\u2713  -
gtk-common-themes          0.1-81-g442e511   1535   latest/stable/\u2026  canonical\u2713  -
snap-store                 41.3-71-g709398e  959    latest/stable/\u2026  canonical\u2713  -
snapd                      2.60.4            20290  latest/stable    canonical\u2713  snapd
snapd-desktop-integration  0.9               83     latest/stable/\u2026  canonical\u2713  -

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2039268

Title:
  When upgrading to Mantic, it fails to install snap firmware-updater

Status in snapd package in Ubuntu:
  Fix Committed
Status in ubuntu-release-upgrader package in Ubuntu:
  Confirmed
Status in snapd source package in Lunar:
  Fix Released
Status in snapd source package in Mantic:
  Fix Released

Bug description:
  [Impact]

  While upgrading to Mantic the following message is reported:

  installing snap firmware-updater
  error: cannot perform the following tasks:
  - Automatically connect eligible plugs and slots of snap "firmware-updater" (internal error: auto-connect of &{"firmware-updater:desktop-legacy" "snapd:desktop-legacy"} failed: snap "snapd" has no slot named "desktop-legacy")

  
  [Test case]

  Confirming the failure:

  $ lxc launch ubuntu:lunar lp-2039268
  Creating lp-2039268
  Starting lp-2039268
  $ lxc exec lp-2039268 bash
  # sed -i -e's/lunar/mantic/' /etc/apt/sources.list && apt update && apt install -y systemd
  # ls -l /run/systemd/generator/snap.mount
  -rw-r--r-- 1 root root 274 Oct 18 05:49 /run/systemd/generator/snap.mount
  # ^D
  $ lxc delete --force lp-2039268

  Confirming the fix:

  $ lxc launch ubuntu:lunar lp-2039268
  Creating lp-2039268
  Starting lp-2039268
  $ lxc exec lp-2039268 bash
  # sed -i -e's/lunar/mantic/' /etc/apt/sources.list && apt update && apt install -y systemd
  # ls -l /run/systemd/generator/snap.mount
  ls: cannot access '/run/systemd/generator/snap.mount': No such file or directory
  # ^D
  $ lxc delete --force lp-2039268

  [Where problems could occur]
  This fix changes how snapd detects at boot time whether a bind remount of /snap with different mount options is necessary.  In unusual circumstances where the rootfs mount options are not what we expect by default in Ubuntu, AND the systemd generator is blocked by a custom security policy from reading /proc/1/mounts, it would get the wrong answer, fail to generate the mount unit under necessary circumstances, and regress the behavior of snapd.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/2039268/+subscriptions




More information about the foundations-bugs mailing list