lxd deb to snap preinst fails: "rm: skipping '/var/lib/lxd/storage-pools/lxd/containers/…', since it's on a different device"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I've had this for a while, but only just got around to reporting the bug - sorry.
lxd's preinst fails for me:
[…]
==> Cleaning up leftovers
Failed to stop lxd.socket: Unit lxd.socket not loaded.
Failed to stop lxd.service: Unit lxd.service not loaded.
Failed to stop lxd-containers.
Failed to disable unit: Unit file lxd.socket does not exist.
rm: skipping '/var/lib/
rm: skipping '/var/lib/
rm: skipping '/var/lib/
dpkg: error processing archive /var/cache/
new lxd package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/
E: Sub-process /usr/bin/dpkg returned an error code (1)
laney@nightingale> apt policy lxd
lxd:
Installed: 1:0.3
Candidate: 1:0.4
Version table:
1:0.4 500
500 http://
500 http://
*** 1:0.3 100
100 /var/lib/
I added `set -x' to it, and ran it manually:
laney@nightingale> sudo /var/lib/
+ . /usr/share/
+ [ ! ]
+ PERL_DL_NONLAZY=1
+ export PERL_DL_NONLAZY
+ [ ]
+ exec /usr/share/
+ . /usr/share/
+ [ ! 1 ]
+ [ -z ]
+ exec
+ [ ]
+ exec
+ DEBCONF_REDIR=1
+ export DEBCONF_REDIR
+ echo => Installing the LXD snap
=> Installing the LXD snap
+ [ -e /var/lib/
+ echo ==> Checking connectivity with the snap store
==> Checking connectivity with the snap store
+ COUNT=0
+ :
+ snap info lxd
+ break
+ db_get lxd/snap-track
+ _db_cmd GET lxd/snap-track
+ _db_internal_IFS=
+ IFS=
+ printf %s\n GET lxd/snap-track
+ IFS=
+ read -r _db_internal_line
+ IFS=
+ RET=latest
+ return 0
+ [ -z latest ]
+ db_input high lxd/snap-track
+ _db_cmd INPUT high lxd/snap-track
+ _db_internal_IFS=
+ IFS=
+ printf %s\n INPUT high lxd/snap-track
+ IFS=
+ read -r _db_internal_line
+ IFS=
+ RET=30 question skipped
+ return 30
+ true
+ db_go
+ _db_cmd GO
+ _db_internal_IFS=
+ IFS=
+ printf %s\n GO
+ IFS=
+ read -r _db_internal_line
+ IFS=
+ RET=ok
+ return 0
+ db_get lxd/snap-track
+ _db_cmd GET lxd/snap-track
+ _db_internal_IFS=
+ IFS=
+ printf %s\n GET lxd/snap-track
+ IFS=
+ read -r _db_internal_line
+ IFS=
+ RET=latest
+ return 0
+ track=latest
+ mkdir -p /lib/modules
+ RELEASE=18.10
+ [ -e /etc/os-release ]
+ . /etc/os-release
+ NAME=Ubuntu
+ VERSION=18.10 (Cosmic Cuttlefish)
+ ID=ubuntu
+ ID_LIKE=debian
+ PRETTY_NAME=Ubuntu 18.10
+ VERSION_ID=18.10
+ HOME_URL=https:/
+ SUPPORT_URL=https:/
+ BUG_REPORT_URL=https:/
+ PRIVACY_POLICY_URL=https:/
+ VERSION_
+ UBUNTU_
+ echo 18.10
+ RELEASE=18.10
+ echo ==> Installing the LXD snap from the latest track for ubuntu-18.10
==> Installing the LXD snap from the latest track for ubuntu-18.10
+ [ latest = latest ]
+ snap install lxd --channel=
snap "lxd" is already installed, see 'snap help refresh'
+ [ -e /var/lib/
+ echo ==> Cleaning up leftovers
==> Cleaning up leftovers
+ deb-systemd-invoke stop lxd.socket lxd.service lxd-containers.
Failed to stop lxd.socket: Unit lxd.socket not loaded.
Failed to stop lxd.service: Unit lxd.service not loaded.
Failed to stop lxd-containers.
+ true
+ deb-systemd-invoke disable lxd.socket lxd.service lxd-containers.
Failed to disable unit: Unit file lxd.socket does not exist.
+ true
+ rm -rf --one-file-system /etc/dnsmasq.
+ rm -rf --one-file-system /etc/init.d/lxd
+ rm -rf --one-file-system /etc/logrotate.
+ rm -rf --one-file-system /etc/sysctl.
+ rm -rf --one-file-system /var/lib/lxd
rm: skipping '/var/lib/
rm: skipping '/var/lib/
rm: skipping '/var/lib/
It's true that they are on a different device:
laney@nightingale> mount -l | grep lxd/containers
lxd/containers/
lxd/containers/
lxd/containers/
laney@nightingale> zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
lxd 91.5G 6.73G 84.8G - 13% 7% 1.00x ONLINE -
I think it was even lxd that set this up for me.
Changed in lxd (Ubuntu): | |
status: | New → Incomplete |
Changed in lxd (Ubuntu): | |
status: | Expired → New |
Hmm, unfortunately the initial run would have been different I suspect.
It looks like the cleanup partly run once and now it's just getting stuck on some leftover mounts.
I suspect we won't be getting to the bottom of what happened here anymore, but we should at least be able to clean things up, move the containers over and get you back online.
Can you show (probably all as root):
- snap info lxd
- find /var/lib/lxd -mount
- find /var/snap/lxd -mount
- /usr/bin/lxc list
- /snap/bin/lxc list
- zfs list -t all
- zpool status -v
That should give me a good idea of the state of things and how to move forward from there.