← Back to issue list

fix(snap): check if LXD is actually installed

View original Github issue

Metadata

Project
charmcraft
Number
#1984
Type
pull request
State
merged
Author
tigarmo
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR canonical/charmcraft#1984 (commit 02539ab0) adds early LXD detection to the snap configure/remove hooks so they bail out instead of triggering the lxd-installer snap; fixes #1982.

Resolution: closed resolved

Reason: PR was merged into main as commit 02539ab0, titled 'fix(snap): check if LXD is actually installed (#1984)', approved with 0 unresolved review comments, and the body states it fixes #1982.

Evaluated by: mr-cal-bot

No scores available.

Issue body

On recent Ubuntu systems, "lxc" might be "/usr/sbin/lxc", which is provided by the "lxd-installer" package and will install the LXD snap if it's not installed. This installation can then take a long time if the store is having issues. For the purposes of the configure and remove hooks we *don't* want to install LXD just to check that it has no stale images, so update the hooks to do some early detection and bail out if LXD is not installed. Fixes #1982

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR canonical/charmcraft#1984 (commit 02539ab0) adds early LXD detection to the snap configure/remove hooks so they bail out instead of triggering the lxd-installer snap; fixes #1982.
stealth/space-bunny-alpha — closed resolved Merged #1984, adding an early LXD installation check to the snap configure/remove hooks to prevent unwanted LXD installations; fixes #1982.
qwen/qwen3.6-35b-a3b — — Merged fix updating configure and remove hooks to verify LXD installation before proceeding. Prevents unwanted LXD snap installations on Ubuntu that cause delays. Approved by two reviewers, passed CI, and resolves #1982.
qwen3.6-35b-a3b-mtp-q6 — — Merged a fix updating configure and remove hooks to detect and bail out if LXD is not installed, preventing unwanted snap installations on Ubuntu. Resolves #1982 and noted for CRAFT-1483.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/charmcraft#1982 (confidence 95%)

    Upstream issue 'Snap configure hook timing out in CI' that the PR declares as fixed; the hook invoked /usr/sbin/lxc from lxd-installer, which hung on store issues.

Related issues

Issue Project State Summary Similarity
#585 fix: check if lxd snap is installed craft-providers merged Merged #585 via c62b1e2, replacing LXD PATH executable detection with a snapd socket query so auto-installer stubs are handled correctly.
76%
#1987 Charmcraft snap fails to install due to a timeout on the configure hook charmcraft closed Resolved by merged PR #1984 (commit 02539ab0), which checks that LXD is installed before snap hooks call lxc, avoiding implicit LXD installation and configure-hook timeouts.
76%
#1199 cleanbuild: packaging independent detection. snapcraft merged Merged in canonical/snapcraft#1199 (commit 417989880), replacing repo-based LXD checks with packaging-independent detection and moving the logic into the LXD module.
71%