snaps not refreshed when upgrading from bionic or cosmic to disco

Bug #1827951 reported by Brian Murray
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Brian Murray
Disco
Fix Released
High
Brian Murray

Bug Description

[Impact]
People have outdated snaps!
The function _replaceDebsWithSnaps() has the version number of Ubuntu hardcoded in it and was not updated in Ubuntu 19.04. Subsequently, the snaps are not refreshed when upgrading from Ubuntu 18.10 to Ubuntu 19.04. This was fixed in Eoan by utilizing python distro_info's ability to get the release version for a codename but unfortunately that's not available in Ubuntu 19.04 so we'll just update the hardcoded version.

[Test Case]
1) on a cosmic or bionic system run do-release-upgrade and upgrade to disco
2) observe the following in /var/log/dist-upgrade/main.log
2019-05-07 11:38:20,921 DEBUG Snap gnome-calculator is installed
2019-05-07 11:38:20,921 DEBUG Snap gnome-calculator is not tracking the release channel
3) also check the output of "snap info gnome-calculator" for tracking "stable/18.10" (or 18.04)

With the version of the release-upgrader in -proposed (do-release-upgrade -p) gnome-calculator will end up tracking 19.04 and you'll see the following in main.log:
"2019-05-07 12:41:25,611 DEBUG refresh of snap gnome-calculator succeeded"

[Regression Potential]
I've set fromVersion to a default value of '' so I think there is little chance of there being a regression.

Revision history for this message
Brian Murray (brian-murray) wrote :
Changed in ubuntu-release-upgrader (Ubuntu Disco):
status: New → In Progress
importance: Undecided → High
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Fix Released
importance: Undecided → High
assignee: nobody → Brian Murray (brian-murray)
Changed in ubuntu-release-upgrader (Ubuntu Disco):
assignee: nobody → Brian Murray (brian-murray)
description: updated
summary: - snaps not refreshed when upgrading from cosmic to disco
+ snaps not refreshed when upgrading from bionic or cosmic to disco
description: updated
description: updated
description: updated
tags: added: id-5cd1c553aa795783cf92dbfd
Revision history for this message
Łukasz Zemczak (sil2100) 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.4 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
Brian Murray (brian-murray) wrote :

I tested an upgrade from bionic to disco and confirmed that this is fixed.

root@clean-bionic-amd64:/tmp/ubuntu-release-upgrader-bctl6u37# head -n10 /var/log/dist-upgrade/main.log
2019-05-09 16:02:07,695 INFO Using config files '['./DistUpgrade.cfg.bionic']'
2019-05-09 16:02:07,695 INFO uname information: 'Linux clean-bionic-amd64 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64'
2019-05-09 16:02:08,038 INFO apt version: '1.6.10'
2019-05-09 16:02:08,038 INFO python version: '3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0]'
2019-05-09 16:02:08,040 INFO release-upgrader version '19.04.16.4' started
2019-05-09 16:02:08,047 INFO locale: 'en_US' 'UTF-8'
2019-05-09 16:02:08,116 DEBUG setting up environ for non-interactive use
2019-05-09 16:02:08,158 DEBUG Using 'DistUpgradeViewNonInteractive' view
2019-05-09 16:02:08,194 DEBUG enable dpkg --force-overwrite

root@clean-bionic-amd64:/tmp/ubuntu-release-upgrader-bctl6u37# grep -A1 "Snap gnome-calculator" /var/log/dist-upgrade/main.log
2019-05-09 16:18:21,301 DEBUG Snap gnome-calculator is installed
2019-05-09 16:18:23,282 DEBUG refresh of snap gnome-calculator succeeded
root@clean-bionic-amd64:/tmp/ubuntu-release-upgrader-bctl6u37# snap info gnome-calculator
name: gnome-calculator
summary: GNOME Calculator
publisher: Canonical✓
license: unset
description: |
  GNOME Calculator is an application that solves mathematical equations.
  Though it at first appears to be a simple calculator with only basic
  arithmetic operations, you can switch into Advanced, Financial, or
  Programming mode to find a surprising set of capabilities.

  The Advanced calculator supports many operations, including:
  logarithms, factorials, trigonometric and hyperbolic functions,
  modulus division, complex numbers, random number generation, prime
  factorization and unit conversions.

  Financial mode supports several computations, including periodic interest
  rate, present and future value, double declining and straight line
  depreciation, and many others.

  Programming mode supports conversion between common bases (binary, octal,
  decimal, and hexadecimal), boolean algebra, one’s and two’s complementation,
  character to character code conversion, and more.
commands:
  - gnome-calculator
snap-id: J8OcDPQ0JM8dbvk29HRqpWVI9kBw0atG
tracking: stable/ubuntu-19.04
refresh-date: 29 days ago, at 17:20 PDT
channels:
  stable: 3.32.1 2019-04-10 (406) 4MB -
  candidate: 3.32.1 2019-04-09 (406) 4MB -
  beta: ↑
  edge: 3.32.0+git23.3b31d463 2019-04-20 (408) 4MB -
installed: 3.32.1 (406) 4MB -

Revision history for this message
Brian Murray (brian-murray) wrote :

I've also verified this during an upgrade from Cosmic to Disco.

root@clean-cosmic-amd64:/tmp/ubuntu-release-upgrader-6oxuqq_8# head -n10 /var/log/dist-upgrade/main.log
2019-05-10 07:51:27,051 INFO Using config files '['./DistUpgrade.cfg']'
2019-05-10 07:51:27,051 INFO uname information: 'Linux clean-cosmic-amd64 4.18.0-18-generic #19-Ubuntu SMP Tue Apr 2 18:13:16 UTC 2019 x86_64'
2019-05-10 07:51:27,405 INFO apt version: '1.7.4'
2019-05-10 07:51:27,405 INFO python version: '3.6.8 (default, Apr 9 2019, 04:59:38)
[GCC 8.3.0]'
2019-05-10 07:51:27,407 INFO release-upgrader version '19.04.16.4' started
2019-05-10 07:51:27,415 INFO locale: 'en_US' 'UTF-8'
2019-05-10 07:51:27,482 DEBUG setting up environ for non-interactive use
2019-05-10 07:51:27,523 DEBUG Using 'DistUpgradeViewNonInteractive' view
2019-05-10 07:51:27,557 DEBUG enable dpkg --force-overwrite
root@clean-cosmic-amd64:/tmp/ubuntu-release-upgrader-6oxuqq_8# grep -A1 "Snap gnome-calculator" /var/log/dist-upgrade/main.log
2019-05-10 08:07:20,617 DEBUG Snap gnome-calculator is installed
2019-05-10 08:07:22,755 DEBUG refresh of snap gnome-calculator succeeded
root@clean-cosmic-amd64:/tmp/ubuntu-release-upgrader-6oxuqq_8# snap info gnome-calculator
name: gnome-calculator
summary: GNOME Calculator
publisher: Canonical✓
contact: https://bugs.launchpad.net/ubuntu/+source/gnome-calculator/+bugs?field.tag=snap
license: unset
description: |
  GNOME Calculator is an application that solves mathematical equations.
  Though it at first appears to be a simple calculator with only basic
  arithmetic operations, you can switch into Advanced, Financial, or
  Programming mode to find a surprising set of capabilities.

  The Advanced calculator supports many operations, including:
  logarithms, factorials, trigonometric and hyperbolic functions,
  modulus division, complex numbers, random number generation, prime
  factorization and unit conversions.

  Financial mode supports several computations, including periodic interest
  rate, present and future value, double declining and straight line
  depreciation, and many others.

  Programming mode supports conversion between common bases (binary, octal,
  decimal, and hexadecimal), boolean algebra, one’s and two’s complementation,
  character to character code conversion, and more.
commands:
  - gnome-calculator
snap-id: J8OcDPQ0JM8dbvk29HRqpWVI9kBw0atG
tracking: stable/ubuntu-19.04
refresh-date: today at 07:47 PDT
channels:
  stable: 3.32.1 2019-04-10 (406) 4MB -
  candidate: 3.32.1 2019-04-09 (406) 4MB -
  beta: ↑
  edge: 3.32.0+git23.3b31d463 2019-04-20 (408) 4MB -
installed: 3.32.1 (406) 4MB -

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.4

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

  * DistUpgrade/DistUpgradeQuirks.py: modify function which updates snaps so
    that it determines the release from which a system is being upgraded.
    Additionally, update the channel for the snap to reflect the release to
    which we are upgrading. (LP: #1827951)
  * data/DistUpgrade.cfg.bionic, data/DistUpgrade.cfg:
    - update KernelRemoval sections to kernel packages that appear in
      Ubuntu 18.04 and Ubuntu 18.10. (LP: #1828072)

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

  * data/DistUpgrade.cfg.bionic,
    data/demoted.cfg.bionic,
    pre-build.sh:
    - support upgrades from bionic (LP: #1827635)

 -- Brian Murray <email address hidden> Mon, 06 May 2019 16:20:45 -0700

Changed in ubuntu-release-upgrader (Ubuntu Disco):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for ubuntu-release-upgrader has completed successfully and the package has now been 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.