fix: check lxd availability for non-snap socket path
Metadata
Current evaluation
Merged PR #777 via commit cf501cd, adding /var/lib/lxd/unix.socket as the first LXD permission check while retaining the Snap socket fallback.
Resolution: closed resolved
Reason: The approved PR was merged as commit cf501cd. Its change allows non-Snap LXD installations to be detected before checking the Snap socket.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Currently, the lxd crafting provider assumes lxd is installed as snap, by only checking the socket path in `/var/snap`.
With this patch, the non-snap default socket path is tried first.
Maybe, as a follow-up, one should just check if `lxc` or `lxd` work properly, instead of hardcoding path names.
---
- [x] Have you followed the guidelines for contributing?
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
- [x] Have you successfully run `make lint && make test`?
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #777 via commit cf501cd, adding /var/lib/lxd/unix.socket as the first LXD permission check while retaining the Snap socket fallback. | |
| qwen/qwen3.6-35b-a3b | — | closed resolved | Merged fix to check LXD availability for non-snap socket paths, trying non-snap default path first instead of only checking /var/snap. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Related To:
craft-providers#585
(confidence 82%)
Earlier merged PR cf501cd's change builds on LXD installation and permission checks, including commit c62b1e2's Snap-specific logic.
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. | |
| #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. | |
| #69 lxd: ensure user is permitted to use lxd (CRAFT-374) | craft-providers | merged | Merged PR #69 added LXD permission and readiness checks, resolving CRAFT-374 in commit 5478f63. |