package lxd 3.0.3-0ubuntu1~18.04.2 failed to install/upgrade: new lxd package pre-installation script subprocess returned error exit status 1
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
1. I'm upgrading from bionic to focal
2. I had an lxd/lxc configuration w/ a zfs pool -- the pool has been removed and lxc is not in use
Apparently as part of the upgrade, lxd tried to start and got quite upset that it could not find my pool.
Problems:
1. The upgrade effectively hung w/ no output at this point -- no indication of what to do or even what went wrong
2. `lxc list` doesn't work
3. there's no clear (or even muddy) explanation of how to get out of this state.
4. while there are some sqlite databases that represent the lxc state, they're inaccessible:
```
# lxc list
Error: Both native and snap packages are installed on this system
Run "lxd.migrate" to complete your migration to the snap package
```
And there's no sqlite.
Expected results:
1. Before trying to do a migration of lxc, confirm that things are healthy
2. if they aren't healthy, walk the user through resolving them *before* upgrading
3. if lxd gets upset that it can't find things, it should explain to users (via something) what went wrong
Information was available in the `journalctl -u lxd`, but I had no idea that this was what I should look to:
```
-- Logs begin at Mon 2021-01-04 13:07:14 UTC, end at Thu 2023-02-23 00:21:01 UTC. --
Feb 23 00:00:46 test-daemons systemd[1]: Starting LXD - main daemon...
Feb 23 00:00:47 test-daemons lxd[30609]: t=2023-
Feb 23 00:00:47 test-daemons lxd[30609]: t=2023-
Feb 23 00:00:47 test-daemons lxd[30609]: t=2023-
Feb 23 00:00:47 test-daemons lxd[30609]: t=2023-
Feb 23 00:00:47 test-daemons lxd[30609]: t=2023-
Feb 23 00:00:47 test-daemons lxd[30609]: t=2023-
Feb 23 00:00:48 test-daemons lxd[30609]: Error: containers/
Feb 23 00:00:48 test-daemons systemd[1]: lxd.service: Main process exited, code=exited, status=1/FAILURE
```
(I'm not actually sure that's from the right instantiation of lxd, but it was nearby.)
I tried deleting the symlink `/var/lib/
I could conceivably have a mix of happy and unhappy lxc instances in which case simply deleting the files would not be a good recovery technique, but in this case, I don't, so I probably could.
ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: lxd 3.0.3-0ubuntu1~
ProcVersionSign
Uname: Linux 4.15.0-204-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.28
Architecture: amd64
Date: Thu Feb 23 00:00:48 2023
ErrorMessage: new lxd package pre-installation script subprocess returned error exit status 1
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: /usr/bin/python2.7, Python 2.7.18, python-is-python2, 2.7.17-4
RelatedPackageV
dpkg 1.19.7ubuntu3.2
apt 2.0.9
SourcePackage: lxd
Title: package lxd 3.0.3-0ubuntu1~
UpgradeStatus: Upgraded to focal on 2023-02-23 (0 days ago)
tags: | removed: need-duplicate-check |