lxd: ensure user is permitted to use lxd (CRAFT-374)
Metadata
Current evaluation
Merged PR #69 added LXD permission and readiness checks, resolving CRAFT-374 in commit 5478f63.
Resolution: closed resolved
Reason: PR #69 was approved and merged. Commit 5478f63 added is_user_permitted() and ensure_lxd_is_ready(), blocked installation without LXD access, and moved readiness checks out of the launcher.
Evaluated by: mr-cal-bot
No scores available.
Issue body
- Introduce is_user_permitted() to check if user has the necessary
permissions (that is, either root or in the lxd group).
- As the number of checks are increasing, add another interface
ensure_lxd_is_ready() which craft apps can use to verify the readiness
of LXD prior to use.
- Add permission check to LXD install to ensure user has necessary
permissions before continuing.
- Remove the initialization check from the launcher in favor of
using ensure_lxd_is_ready() to catch potential errors even earlier.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #69 added LXD permission and readiness checks, resolving CRAFT-374 in commit 5478f63. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Merged PR resolving CRAFT-374 by adding is_user_permitted and ensure_lxd_is_ready to verify LXD access permissions. |
Update history
| Date | Change |
|---|---|
| created |
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #474 charmcraft: perform LXD checks before use (CRAFT-420) | charmcraft | merged | Merged #474: added ensure_lxd_is_ready() before LXD use, including permission validation and clearer errors. Merge commit: 1dfb54b1. | |
| #105 lxd: in is_user_permitted() check if connecting to LXD works | craft-providers | merged | Merged #105 (commit 66797cb), replacing the hardcoded lxd-group check with a socket-writability check so custom LXD daemon groups work. | |
| #71 lxd: account for minimum required version in checks (CRAFT-437) | craft-providers | merged | Merged PR #71 updated LXD readiness checks to enforce the minimum required version and revised ensure_lxd_is_ready() error messages (implementation 9fcd49b). | |
| #63 lxd: check if LXD is initialized prior to launch (CRAFT-348) | craft-providers | merged | Merged LXD initialization preflight validation for CRAFT-348, adding is_initialized(), launch-time LXDError handling, and unit/integration tests in commit b00bea0. | |
| #54 lxd instance: drop sudo usage (CRAFT-289) | craft-providers | merged | Merged PR #54 via fa985d0, removing sudo from LXD instance operations so builds no longer require sudo in buildd images. | |
| #777 fix: check lxd availability for non-snap socket path | craft-providers | merged | Merged PR #777 via commit cf501cd, adding /var/lib/lxd/unix.socket as the first LXD permission check while retaining the Snap socket fallback. |