Did a "do-release-upgrade" from 18.04 to 20.04 and got an error message

Bug #1874878 reported by Peter Klaesson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Release Upgrader
New
Undecided
Unassigned
snapd (Ubuntu)
New
Undecided
Unassigned

Bug Description

I ran do-release-upgrade -d on a Ubuntu 18.04 server system.

I got an error message after being prompted that LXD from now on is managed using snap.

Was running 3.0 using apt in 18.04, chose to track LXD 4.0 in do-release-upgrade.

Got an error message.

Expected to not be prompt to file a bug report.

When do-release-upgrade was finished it said "The upgrade has completed but there were errors during the upgrade process."

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: lxd 3.0.3-0ubuntu1~18.04.1
ProcVersionSignature: Ubuntu 5.3.0-40.32~18.04.1-generic 5.3.18
Uname: Linux 5.3.0-40-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.9-0ubuntu7.14
Architecture: amd64
Date: Fri Apr 24 20:09:09 2020
ErrorMessage: new lxd package pre-installation script subprocess returned error exit status 126
InstallationDate: Installed on 2016-04-28 (1456 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.3)
Python3Details: /usr/bin/python3.8, Python 3.8.2, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18rc1, python-is-python2, 2.7.17-4
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.2
SourcePackage: lxd
Title: package lxd 3.0.3-0ubuntu1~18.04.1 failed to install/upgrade: new lxd package pre-installation script subprocess returned error exit status 126
UpgradeStatus: Upgraded to focal on 2020-04-24 (0 days ago)

Revision history for this message
Peter Klaesson (alphapeter) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Peter Klaesson (alphapeter) wrote :

I manage to figure out what was wrong.

I found out that snapd had stuck on auto-refresh "core", (ran sudo snap changes). It was stuck since yesterday. Thus the lxd snap broke when installed.

What I did to fix it.
* Aborted the autorefresh (sudo snap abort <id>)
* stopped the snapd service (had to kill all the snapd processes)
* started snapd again
The first time when snapd restarted, it got stuck again.

Once again...
* Aborted the autorefresh (sudo snap abort <id>)
* stopped the snapd service (had to kill all the snapd processes)
* started snapd again
* Ran sudo snap connect lxd:lxd-support core:lxd-support (to fix the broken lxd snap)

Then I ran apt-get install lxd again... and it got stuck, could not terminate the previous lxd service.

* Had to force reboot the computer.

After a restart.

Ran apt-get install lxd again and everything worked as expected.

To continue continue the upgrade, I ran sudo apt upgrade.

Now everything is OK

So, summary. If the snap auto-refresh of "core" is stuck. The upgrade will fail.
Maybe a pre-check that the "core" snap is enabled before starting the release-upgrade (at least if lxd is installed)?

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

Thanks for your analysis, I've re-targeted to snapd as that's not expected behavior from it.

affects: lxd (Ubuntu) → snapd (Ubuntu)
Revision history for this message
Rabi C (rabic) wrote :

I had the same issue:
When the Package Configuration dialog came up on Configuring lxd
LXD snap track latest/3.0/4.0
When I chose 4.0 and proceed, the installation hung indefinitely at
==> Installing the LXD snap from the 4.0 track for ubuntu-20.04

My workaround was to do the following at the point the Configuration dialog showed up in seperate shell:
sudo snap install hello-world
sudo snap list

Then proceed with Configuring lxd. The installation proceeded and did not hang at the Installing LXD snap point
$ sudo snap list
[sudo] password for pos:
Name Version Rev Tracking Publisher Notes
core 16-2.44.3 9066 latest/stable canonical* core
core18 20200427 1754 latest/stable canonical* base
hello-world 6.4 29 latest/stable canonical* -
lxd 4.0.1 14890 4.0/stable/… canonical* -

Revision history for this message
Samuele Pedroni (pedronis) wrote :

seems the release upgrade needs to check whether snapd is ready to help through an upgrade, there might be a need for snap to help in that

affects: subiquity → ubuntu-release-upgrader
Revision history for this message
Al Hazred (therealhazzard) wrote :

I have the same issue as well.

> When the Package Configuration dialog came up on Configuring lxd
> LXD snap track latest/3.0/4.0
> When I chose 4.0 and proceed, the installation hung indefinitely at
> ==> Installing the LXD snap from the 4.0 track for ubuntu-20.04

Revision history for this message
Al Hazred (therealhazzard) wrote :

Sorry, actually after I let it run longer it finished. But it didn't show any progress or any indication something was happening.

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.