ubuntu-release-upgrader will need to know how to switch snaps between Ubuntu release channels during an upgrade

Bug #1748581 reported by Steve Langasek
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Brian Murray
Cosmic
Fix Released
High
Brian Murray

Bug Description

As part of the plan for including snaps in Ubuntu images by default (https://wiki.ubuntu.com/UbuntuSeededSnaps), we intend for the snap installs to be pinned to (possibly empty) per-Ubuntu-release channels in the Snap Store.

This means that as part of a dist upgrade, ubuntu-release-upgrader will need to switch the channels of any relevant installed snaps from the channel for one release, to the channel for the next release, with snap refresh.

(In many cases both channels will be empty and this will involve downloading no new snaps, just changing the pin on the client.)

Since 18.04 is the first release with snaps by default, this doesn't need to be implemented in 18.04; but will need to be supported by the release upgrader in 18.10 at latest.

Related branches

Steve Langasek (vorlon)
Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → High
tags: added: rls-cc-incoming
tags: added: id-5b43f66dd91ed8d4283b86fa
Revision history for this message
Brian Murray (brian-murray) wrote :

To switch snaps ubuntu-release-upgrader can call snap refresh with the --channel= switch.

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-release-upgrader (1:18.10.8) cosmic; urgency=medium

  * DistUpgradeController.py: Remove an unnecessary debugging entry when
    calculating the debs to remove.
  * DistUpgradeQuirks.py: Either refresh installed snaps so they use the
    ubuntu-18.10 channel or install snaps that weren'd installed when
    upgrading to Ubuntu 18.04. (LP: #1748581)

 -- Brian Murray <email address hidden> Tue, 14 Aug 2018 16:00:44 -0700

Changed in ubuntu-release-upgrader (Ubuntu Cosmic):
status: In Progress → Fix Released
Revision history for this message
Stéphane Graber (stgraber) wrote :

Hi,

The logic that was added for 18.10 seems to assume that:
 - The user only ever cares about the "latest" track
 - The user only ever cares about the "stable" channel

In the even where the user has chosen a different track or channel, the upgrader resets the user to latest track, stable channel and ubuntu-18.10 branch.

This may very much surprise users of other channels/tracks and may cause breakages as moving from a newer release of a snap to an older one, as the current logic is doing, is likely to result in an older version of a snap trying to read newer data.

In the case where a snap is already installed, the upgrader should check what track and channel is in use for the snap, then attempt to switch to an "ubuntu-XX.XX" branch of that track/channel combination if it exists, if it doesn't, assume the user knows what they're doing and leave them alone.

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 1748581] Re: ubuntu-release-upgrader will need to know how to switch snaps between Ubuntu release channels during an upgrade

On Tue, Aug 21, 2018 at 07:33:56PM -0000, Stéphane Graber wrote:
> In the case where a snap is already installed, the upgrader should check
> what track and channel is in use for the snap, then attempt to switch to
> an "ubuntu-XX.XX" branch of that track/channel combination if it exists,
> if it doesn't, assume the user knows what they're doing and leave them
> alone.

Indeed, I'd go a step further and say that the channel should only be
switched if the user is already currently on a /ubuntu-XX.YY branch where
XX.YY is the Ubuntu release installed prior to the upgrade.

Revision history for this message
Stéphane Graber (stgraber) wrote :

Re-opening bug.

Changed in ubuntu-release-upgrader (Ubuntu Cosmic):
status: Fix Released → Triaged
tags: removed: rls-cc-incoming
Changed in ubuntu-release-upgrader (Ubuntu Cosmic):
status: Triaged → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-release-upgrader (1:18.10.9) cosmic; urgency=medium

  * data/release-upgrades: set Prompt to normal not lts
  * DistUpgradeQuirks.py: if ubuntu-desktop or snapd isn't in the package
    cache don't try and run the quirk for installing or upgrading snaps.
    (LP: #1787668)
  * DistUpgradeQuirks.py: Only refresh installed snaps to the ubuntu-18.10
    channel if they are tracking the ubuntu-18.04 channel. (LP: #1748581)

 -- Brian Murray <email address hidden> Tue, 28 Aug 2018 13:09:55 -0700

Changed in ubuntu-release-upgrader (Ubuntu Cosmic):
status: In Progress → Fix Released
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.