deb to snap transition uses an ubuntu release channel for the core18 snap

Bug #1841225 reported by Brian Murray
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Łukasz Zemczak
Disco
Fix Released
Medium
Unassigned
Eoan
Fix Released
High
Łukasz Zemczak

Bug Description

[Impact]

During distro upgrades, additional logic exists that replaces existing debs with snaps and refreshes existing, installed snaps to the branch of the series we're upgrading to (e.g. from stable/ubuntu-18.04 to stable/ubuntu-19.04 etc.). However, the upgrader tries to apply the logic for all the snaps it 'supports' in migration, even though snaps like core18 do not have per-series branches (and will never have). This causes non-fatal failures during installation/refresh of the core18 snap on upgrades. Even though this does not cause a crash or error, and in theory should should not cause any trouble as core18 *should* be pulled in as a dependency of the other snaps, it is invalid behavior and might result in core18 not being present on the end system. Upgrades should not perform commands that fail, if possible.

[Test Case]

* Prepare a bionic machine
* Make sure ubuntu-desktop and snapd are installed on it
* Make sure core18 is *not* installed on the system - if there are any snaps installed, remove them
* Perform an upgrade to disco (with the --proposed option, to use disco-proposed)
* Reboot
* Make sure that the upgrade succeeded
* Check if core18 is installed, open /var/log/dist-upgrade/main.log and look for 'install of snap core18', make sure the command succeeded

[Regression Potential]

The changes have been constrained to the DistUpgradeQuirks place, only to the snap handling pieces. So any possible regressions should be visible in the snap replacement/refresh areas. Most probable ones would be for the snaps not being installed/refreshed properly, or using the wrong channels/branches.

[Original Description]

The release upgrader (DistUpgradeQuirks.py) tries to run the following command when upgrading a system without snaps installed to Ubuntu 19.10 (eoan):

snap install --channel stable/ubuntu-19.10 core18

This channel does not exist and the release upgrade will fail e.g.:

2019-08-23 03:24:45,533 DEBUG quirks: running eoanPostUpgrade
2019-08-23 03:24:45,533 DEBUG running Quirks.eoanPostUpgrade
2019-08-23 03:24:51,547 DEBUG install of snap core18 failed
2019-08-23 03:25:51,348 DEBUG install of snap gnome-3-28-1804 succeeded

The quirk should be updated so that an ubuntu release channel is not used when installing the core18 snap.

Related branches

tags: added: eoan
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Triaged
importance: Undecided → High
tags: added: id-5d601a1e1cecf13f82a7067a
Changed in ubuntu-release-upgrader (Ubuntu Eoan):
assignee: nobody → Łukasz Zemczak (sil2100)
Changed in ubuntu-release-upgrader (Ubuntu Eoan):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:19.10.11

---------------
ubuntu-release-upgrader (1:19.10.11) eoan; urgency=medium

  * DistUpgrade/DistUpgradeQuirks.py, DistUpgrade/DistUpgradeCache.py:
    Modify DistUpgradeQuirks to calculate extra space needed for snaps that
    need to be installed during upgrade (replacing old debs) and add that to
    estimates done in checkFreeSpace(). (LP: #1783597)
  * DistUpgrade/DistUpgradeQuirks.py: Make sure snaps like core18 are not
    refreshed/installed from the stable/ubuntu-VERSION branch but instead use
    stable on upgrades. (LP: #1841225)

 -- Łukasz 'sil2100' Zemczak <email address hidden> Tue, 03 Sep 2019 15:58:38 +0200

Changed in ubuntu-release-upgrader (Ubuntu Eoan):
status: In Progress → Fix Released
description: updated
Changed in ubuntu-release-upgrader (Ubuntu Disco):
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Brian, or anyone else affected,

Accepted ubuntu-release-upgrader into disco-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:19.04.16.7 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-disco to verification-done-disco. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-disco. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in ubuntu-release-upgrader (Ubuntu Disco):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-disco
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Verified ubuntu-release-upgrader 19.04.16.7 as per the test-case.

I set up a multipass bionic system, switched /etc/update-manager/release-upgrades to Prompt=normal, installed ubuntu-desktop and made sure there is no core18 snap installed. I then proceeded with running `do-release-upgrade --frontend DistUpgradeView --proposed`. The upgrade succeeded,confirmed that 19.04.16.7 was used [1] and checked that in the end all snaps got installed with the right channels selected (stable for core18 and stable/ubuntu-19.04 for others).

[1] 2019-10-09 14:14:11,811 INFO release-upgrader version '19.04.16.7' started

tags: added: verification-done verification-done-disco
removed: verification-needed verification-needed-disco
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:19.04.16.7

---------------
ubuntu-release-upgrader (1:19.04.16.7) disco; urgency=medium

  * DistUpgrade/DistUpgradeQuirks.py, DistUpgrade/DistUpgradeCache.py:
    Modify DistUpgradeQuirks to calculate extra space needed for snaps that
    need to be installed during upgrade (replacing old debs) and add that to
    estimates done in checkFreeSpace(). (LP: #1783597)
  * DistUpgrade/DistUpgradeCache.py: Make sure checkFreeSpace() still works for
    update-manager with its own implementation of MyCache.
  * DistUpgrade/DistUpgradeQuirks.py: Make sure snaps like core18 are not
    refreshed/installed from the stable/ubuntu-VERSION branch but instead use
    stable on upgrades. (LP: #1841225)

 -- Łukasz 'sil2100' Zemczak <email address hidden> Mon, 09 Sep 2019 15:41:12 +0200

Changed in ubuntu-release-upgrader (Ubuntu Disco):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for ubuntu-release-upgrader has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

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.