ubuntu-release-upgrader crashes if snapd is not installed

Bug #1783589 reported by Jean-Baptiste Lallement on 2018-07-25
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
High
Brian Murray
Bionic
High
Brian Murray

Bug Description

Test Case:
1. On Xenial with ubuntu-desktop installed and snapd uninstalled run update-manager -cd and proceed with the upgrade

Result
The upgrader crashes with:

Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-tmpdir/bionic", line 8, in <module>
sys.exit(main())
File "/tmp/ubuntu-release-upgrader-tmpdir/DistUpgrade/DistUpgradeMain.py", line 238, in main
if app.run():
File "/tmp/ubuntu-release-upgrader-tmpdir/DistUpgrade/DistUpgradeController.py", line 1949, in run
return self.fullUpgrade()
File "/tmp/ubuntu-release-upgrader-tmpdir/DistUpgrade/DistUpgradeController.py", line 1826, in fullUpgrade
if not self.doPostInitialUpdate():
File "/tmp/ubuntu-release-upgrader-tmpdir/DistUpgrade/DistUpgradeController.py", line 893, in doPostInitialUpdate
self.quirks.run("PostInitialUpdate")
File "/tmp/ubuntu-release-upgrader-tmpdir/DistUpgrade/DistUpgradeQuirks.py", line 113, in run
func()
File "/tmp/ubuntu-release-upgrader-tmpdir/DistUpgrade/DistUpgradeQuirks.py", line 133, in bionicPostInitialUpdate
self._checkStoreConnectivity()
File "/tmp/ubuntu-release-upgrader-tmpdir/DistUpgrade/DistUpgradeQuirks.py", line 492, in _checkStoreConnectivity
stderr=PIPE, universal_newlines=True).communicate()
File "/usr/lib/python3.5/subprocess.py", line 947, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.5/subprocess.py", line 1551, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] Aucun fichier ou dossier de ce type: 'snap'

ProblemType: Bug
DistroRelease: Ubuntu 18.10
Package: ubuntu-release-upgrader-core 1:18.10.5
ProcVersionSignature: Ubuntu 4.15.0-23.25-generic 4.15.18
Uname: Linux 4.15.0-23-generic x86_64
ApportVersion: 2.20.10-0ubuntu7
Architecture: amd64
CrashDB: ubuntu
CurrentDesktop: ubuntu:GNOME
Date: Wed Jul 25 17:08:36 2018
InstallationDate: Installed on 2014-07-15 (1471 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Alpha amd64 (20140520)
PackageArchitecture: all
SourcePackage: ubuntu-release-upgrader
Symptom: ubuntu-release-upgrader
UpgradeStatus: Upgraded to cosmic on 2018-03-24 (123 days ago)

Related branches

Jean-Baptiste Lallement (jibel) wrote :
Changed in ubuntu-release-upgrader (Ubuntu):
assignee: nobody → Brian Murray (brian-murray)
importance: Undecided → High
status: New → Triaged
Changed in ubuntu-release-upgrader (Ubuntu Bionic):
status: New → Triaged
importance: Undecided → High
assignee: nobody → Brian Murray (brian-murray)
tags: added: artful2bionic
Changed in ubuntu-release-upgrader (Ubuntu):
status: Triaged → In Progress
tags: added: third-party-packages
tags: added: id-5b5b80eb89d784de8e6deacd
Launchpad Janitor (janitor) wrote :

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

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

  * DistUpgradeQuirks.py:
    - make sure that snapd is installed before trying to use it.
      (LP: #1783589)
    - update the view with information regarding the progress of snaps being
      installed. (LP: #1783593)
    - when checking for connectivity to the snap store use C.UTF-8 for the
      language so error message matching works. (LP: #1783738)
  * DistUpgradeController.py:
    - Remove debs from apt's "Dir::Cache::archives" folder after the upgrade
      has completed successfully.
    - Add a telemetry marker to report the time to process migration from deb
      to snaps.
  * DistUpgrade/DistUpgradeViewGtk3.py: call vte's terminal.feed_child() with
    the correct parameters thereby fixing a crash. (LP: #1780501)

 -- Brian Murray <email address hidden> Wed, 01 Aug 2018 15:06:53 -0700

Changed in ubuntu-release-upgrader (Ubuntu):
status: In Progress → Fix Released
Changed in ubuntu-release-upgrader (Ubuntu Bionic):
status: Triaged → In Progress
Łukasz Zemczak (sil2100) wrote :

The uploaded bionic SRU package mentions fixing this bug in the changelog but the actual change for it is not present - or at least the debdiff generated in the queue is missing the relevant "self.controller.cache['snapd'].is_installed" additions.

Is this how it's supposed to be? I don't see any other pieced of code in the changes that could have been a fix for this instead.

Hello Jean-Baptiste, or anyone else affected,

Accepted ubuntu-release-upgrader into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:18.04.22 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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!

Changed in ubuntu-release-upgrader (Ubuntu Bionic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-bionic
Brian Murray (brian-murray) wrote :

I downloaded the new version of the dist-upgrader tarball from http://archive.ubuntu.com/ubuntu/dists/bionic-proposed/main/dist-upgrader-all/current/ (because you cannot use do-release-upgrade with the -d and -p switches) and unpacked it. After uninstalling snapd I then ran 'sudo ./bionic --frontend DistUpgradeViewGtk3' and confirmed that it did not crash as I was presented with the proceed to upgrade dialog.

When using the version of the dist-upgrader obtained by running 'do-release-upgrade -d' if snapd is not installed the upgrader will crash immediately.

tags: added: verification-done verification-done-bionic
removed: verification-needed verification-needed-bionic
Launchpad Janitor (janitor) wrote :

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

---------------
ubuntu-release-upgrader (1:18.04.22) bionic; urgency=medium

  * DistUpgradeQuirks.py:
    - make sure that snapd is installed before trying to use it.
      (LP: #1783589)
    - update the view with information regarding the progress of snaps being
      installed. (LP: #1783593)
    - when checking for connectivity to the snap store use C.UTF-8 for the
      language so error message matching works. (LP: #1783738)
  * DistUpgradeController.py:
    - Remove debs from apt's "Dir::Cache::archives" folder after the upgrade
      has completed successfully. (LP: #1785096)
    - Add a telemetry marker to report the time to process the migration from
      deb to snaps.

 -- Brian Murray <email address hidden> Thu, 02 Aug 2018 11:20:06 -0700

Changed in ubuntu-release-upgrader (Ubuntu Bionic):
status: Fix Committed → Fix 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  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers