Ubuntu 22.04, LXD 5.0.2 - "Required tool 'zpool' is missing" after apt upgrade

I was just bitten by the opposite problem:

  • Ubuntu 20.04 VM, kernel 5.4.0, zfs 0.8.3
  • running lxd snap, following “stable”
  • lxd updated itself to 5.21
  • Canonical muppets have removed zfs-0.8 tools from the snap
root@db:/home/brian# ls /snap/lxd/27049
bin  commands  criu  etc  lib  lxc  lxcfs  meta  share  snap  usr  wrappers  zfs-0.8  zfs-2.0  zfs-2.1  zfs-2.2
root@db:/home/brian# ls /snap/lxd/28155
bin  commands  criu  etc  lib  lxc  lxcfs  meta  share  snap  wrappers  zfs-2.1  zfs-2.2

All hell has broken lose. Roll back the snap then?

snap refresh lxd --channel=5.20/stable

No: the muppets have also ensured that a rollback is impossible.

# systemctl stop snap.lxd.daemon.unix.socket
# lxd --debug --group lxd
...
time="2024-04-13T08:38:42Z" level=info msg="Daemon stopped"
Error: Failed to initialize global database: failed to ensure schema: schema version '73' is more recent than expected '69'

It seems going back to 5.21 plus HWE kernel upgrade is the only option - followed by migration to incus.

And I’m never touching a system with snapd again, except to remove it.

EDIT: It looks like they realised their mistake and released 5.21.1 with zfs-0.8 support: LXD 5.21.1 LTS has been released - News - Ubuntu Community Hub
(and turned 5.21 into an LTS release)

2 Likes