** Description changed: + [ Impact ] + + * On Ubuntu 20.04 (focal) and 22.04 (jammy), lxd-installer runs a bare + `snap install lxd`. This installs from the default track of the LXD snap + which is now 6/stable, instead of the LTS track matching the release. + On focal that track requires a newer snapd than what the image ships + (focal ESM has snapd 2.67 whereas LXD 6 needs 2.75), so the install fails: + + error: cannot install "lxd": snap "lxd" assumes unsupported features: snapd2.75 + (try to refresh snapd) + + As a result `lxd`/`lxc` stay unusable on images that ship lxd-installer + (e.g. Azure pro-minimal images). + + * The upload pins the LXD LTS channel matching the release, as already done + in newer releases of lxd-installer: + - focal: `snap install lxd --channel 4.0/stable/ubuntu-20.04` + - jammy: `snap install lxd --channel 5.0/stable/ubuntu-22.04` + No OS detection is needed as each release gets its own package. + + [ Test Plan ] + + * On a fresh focal (or jammy) VM/container with snapd and lxd- + installer: + + $ lxd --version + # fails with "exec: /snap/bin/lxd: not found" + $ sudo journalctl -u 'lxd-installer@*' --no-pager + # focal: shows the "assumes unsupported features" error + # jammy: LXD gets installed from the default track (6/stable), check + # with `snap list lxd` + + * Install lxd-installer from -proposed (jammy: 1ubuntu0.22.04.1, focal: + 1ubuntu0.20.04.1~esm1), then: + + $ lxd --version + # focal: 4.0.x, jammy: 5.0.x + $ snap list lxd + # focal: Tracking 4.0/stable/ubuntu-20.04 + # jammy: Tracking 5.0/stable/ubuntu-22.04 + $ lxc --version + + * Check that the upgrade from `1` works (the postinst does not recreate the + `lxd` group on upgrade) and that a system that already has the LXD snap + installed is left alone (`/snap/bin/lxc` present, no installer socket + activation). + + [ Where problems could occur ] + + * The channel is hardcoded. If `4.0/stable/ubuntu-20.04` or + `5.0/stable/ubuntu-22.04` were closed or empty on an architecture, the + on-demand install would fail with "no snap revision available" and the + `lxd`/`lxc` stubs would stay non-functional. This would show up in the + journal of the lxd-installer@*.service units. + + * Systems relying on the old behavior (default track) now get the LTS track + matching their release instead of the latest LXD. Anyone wanting a newer + LXD must switch channels manually (`snap refresh lxd --channel=...`). Only + new on-demand installs are affected, already installed LXD snaps are not + touched. This aligns with what's done in Noble and later and avoid exposing + those older releases to changes in the LXD default track. + + * Unlike in newer releases, there is no retry of the snap install and no wait + for snapd seeding: a transient snap store failure still fails the + install, as before. + + [ Other Info ] + + * Noble and newer already select the LXD track based on /etc/os-release + (see lxd-installer 4 and later). This change aligns Jammy and Focal with + them without backporting the OS detection logic, which is not needed when + a package targets a single release. + + * Version numbers: Jammy 1ubuntu0.22.04.1 and Focal 1ubuntu0.20.04.1~esm1 + sort below Noble's 4ubuntu0.1 and above the current `1`. + + * Git branches: ubuntu/jammy-lp2173961 and ubuntu/focal-lp2173961 + (https://git.launchpad.net/~sdeziel/ubuntu/+source/lxd-installer). + + [ Original bug description ] + kernel: 5.15.0-1126-azure build_name: pro-minimal lxd-installer: - Installed: 1 - Candidate: 1 - Version table: - *** 1 100 - 100 /var/lib/dpkg/status + Installed: 1 + Candidate: 1 + Version table: + *** 1 100 + 100 /var/lib/dpkg/status I expected lxd to be available on boot since this package is installed on the image. Lxd is unavailable.
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2173961 Title: lxd-installer does not work on focal minimal azure images To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/lxd-installer/+bug/2173961/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
