← 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 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.

Suggested action:

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
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.
qwen3.6-35b-a3b-mtp-q6 Merged. Updates configure and remove hooks to verify LXD installation before execution, preventing slow automatic snap installs on Ubuntu. Resolves #1982. Proceeded despite macOS and Windows test failures.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#434 fix(i/lxd): make lxd download inspector more strict fetch-service merged Merged a fix making the LXD download inspector format verification stricter to prevent snap assertion download rejections. Approved by two reviewers, passed CI checks, and modified six files with 79 additions and 12 deletions.
75%
#3112 spread: remove dead code for lxd setup and add debug prints snapcraft merged Merged removal of redundant elif dead code in LXD setup logic and addition of debug prints for LXD snap install failures. Approved by one reviewer, passed CI checks, and integrated.
75%
#1577 lxd: don't inject local snaps on a different arch snapcraft merged Merged a fix preventing Snapcraft from injecting local snaps into LXD containers with mismatched architectures. Cross-arch remotes now install snaps from the store. Approved by reviewers and merged after CI checks.
74%
#3957 tests: retry installing lxd snap snapcraft merged Merged into main. Introduces retry logic for LXD snap installation in tests via snapd-testing-tools to workaround an intermittent snapd bug. Approved, passed CI, and caused no coverage changes.
74%
#1639641 Don't assume lxd from dpkg snapcraft (launchpad) closed Resolved via merged pull request #904, updating snapcraft cleanbuild to detect LXD installed via snap rather than only checking dpkg.
74%
#207 snap: add configure hook to delete outdated instances from lxd rockcraft merged Merged. Adds a snap configure hook to remove outdated LXD images and instances during Rockcraft installation or refresh. Approved by two reviewers and merged after addressing test failures from spread resources and runner deprecation.
73%
#1865 lxd: always (re-)injects snaps snapcraft merged Merged to fix LP: #1741752 by ensuring LXD containers always re-inject snaps. Changes refactor injection logic, reorganize files, and properly handle side-loaded snap assertions. Approved by reviewer and passed CI.
73%
#2098 lxd: wait for on-going refreshes to finish snapcraft merged Merged fix adding a snap watch call before injecting snaps into LXD containers to wait for ongoing refreshes. Resolves race conditions causing build failures in issues #2037 and LP: #1722049. Approved by reviewer and passed CI.
73%
#1568 lxd: don't re-inject the same snaps snapcraft merged Merged a fix for an LXD bug that repeatedly re-injected identical snaps due to mismatched revision filenames. The change resolves the issue by comparing snap hashes instead of relying on filename matching, preventing unnecessary reinstallations.
72%
#6 Issues installing LXD craft-actions closed Fixed by switching the LXD snap channel from 5.9/stable to a valid release track. Resolution merged in canonical/craft-actions#7.
71%