package lxd 3.0.3-0ubuntu1~18.04.1 failed to install/upgrade: new lxd package pre-installation script subprocess returned error exit status 143

Bug #1908460 reported by Luke Faraone
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxd (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Attempting to upgrade from 18.04 to 20.04, migrating a LXD installation to the 4.0 channel on a host with a ZFS pool.

The migration process hung at "Waiting for LXD to come online" and had to be killed to continue the upgrade.

```
                                          ^MESC[?1049l==> Installing the LXD snap from the 4.0 track for ubuntu-20.04
lxd (4.0/stable) 4.0.4 from CanonicalESC[32m✓ESC[0m installed
==> Waiting for LXD to be online (10min timeout)
==> Running migration from Deb to Snap
=> Connecting to source server
=> Connecting to destination server
=> Running sanity checks

=== Source server
LXD version: 3.0.3
LXD PID: 27120
Resources:
  Containers: 37
  Images: 9
  Networks: 1
  Storage pools: 2

=== Destination server
LXD version: 4.0.4
LXD PID: 26842
Resources:
  Containers: 0
  Images: 0
  Networks: 0
  Storage pools: 0

The migration process will shut down all your containers then move your data to the destination LXD.
Once the data is moved, the destination LXD will start and apply any needed updates.
And finally your containers will be brought back to their previous state, completing the migration.

=> Shutting down the source LXD
=> Stopping the source LXD units
=> Stopping the destination LXD unit
=> Unmounting source LXD paths
=> Unmounting destination LXD paths
=> Wiping destination LXD clean
=> Backing up the database
=> Moving the data
=> Updating the storage backends
=> Starting the destination LXD
=> Waiting for LXD to come online

Terminated
```

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: lxd 3.0.3-0ubuntu1~18.04.1
ProcVersionSignature: Ubuntu 4.15.0-126.129-generic 4.15.18
Uname: Linux 4.15.0-126-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.9-0ubuntu7.21
Architecture: amd64
Date: Wed Dec 16 23:57:56 2020
ErrorMessage: new lxd package pre-installation script subprocess returned error exit status 143
InstallationDate: Installed on 2016-08-28 (1571 days ago)
InstallationMedia: Ubuntu-Server 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.3)
Python3Details: /usr/bin/python3.8, Python 3.8.5, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18, python-is-python2, 2.7.17-4
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.2ubuntu0.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 143
UpgradeStatus: Upgraded to focal on 2020-12-16 (0 days ago)

Revision history for this message
Luke Faraone (lfaraone) wrote :
Revision history for this message
Luke Faraone (lfaraone) wrote :

As a result of the botched migration, attempts to start the snap service failed with:

```
Dec 17 00:08:09 lithium lxd.daemon[9711]: => Re-using existing LXCFS
Dec 17 00:08:09 lithium lxd.daemon[9711]: => Starting LXD
Dec 17 00:08:09 lithium lxd.daemon[9828]: t=2020-12-17T00:08:09+0000 lvl=warn msg=" - Couldn't find the CGroup memory swap accounting, swap limits will be ignored"
Dec 17 00:08:09 lithium lxd.daemon[9828]: t=2020-12-17T00:08:09+0000 lvl=eror msg="Failed to start the daemon: Failed applying patch \"storage_api_rename_container_snapshots_links\": readlink /var/snap/lxd/common/lxd/snapshots/matrix: invalid argument"
Dec 17 00:08:10 lithium lxd.daemon[9828]: Error: Failed applying patch "storage_api_rename_container_snapshots_links": readlink /var/snap/lxd/common/lxd/snapshots/matrix: invalid argument
Dec 17 00:08:10 lithium lxd.daemon[9711]: => LXD failed to start
```

tags: removed: need-duplicate-check
Luke Faraone (lfaraone)
description: updated
Revision history for this message
Stéphane Graber (stgraber) wrote :

I suspect you probably found a way out of this by now but if not or if you're hitting this on another system, let me know and I'll sort something out.

It would have been interesting to see what those symlinks are pointing to, they may not have been rewritten properly due to the failure partway through the migration.

Changed in lxd (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for lxd (Ubuntu) because there has been no activity for 60 days.]

Changed in lxd (Ubuntu):
status: Incomplete → Expired
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.