lxd: path cannot have extra forward slashes
Metadata
Current evaluation
Merged fix removing leading forward slashes from LXD device mount paths, resolving internal errors during device removal. The change prevents LXD from claiming unmounted devices exist, though existing containers require manual configuration updates.
Suggested action: —
No scores available.
Issue body
After double-checking that the logic for mounting the project folder on the Snapcraft side I ended up finding that LXD can end up claiming the device exists without actually mounting it. In that case `lxc device remove` aborts with internal errors.
Apparently the LXD issue can be avoided by getting rid of a leading / in the mounted path.
This fixes [Could not find snap/snapcraft.yaml](https://forum.snapcraft.io/t/repeated-container-builds-fail-to-find-snapcraft-yaml/1649).
Notes:
* I'm not especially happy with the test side of this, it's a virtually invisible change. Suggestions would be welcome.
* Maybe we should be moving to using `lxc edit` for configuration as it can be used to fix containers that would be stuck using dedicated commands.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged fix removing leading forward slashes from LXD device mount paths, resolving internal errors during device removal. The change prevents LXD from claiming unmounted devices exist, though existing containers require manual configuration updates. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix removing leading slashes from LXD mount paths to prevent device mounting errors and snapcraft.yaml lookup failures. New containers are resolved, while existing ones require manual lxc config edit. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Removed leading forward slashes from LXD device mount paths to prevent internal errors during device removal. Resolves Snapcraft container build failures. Existing containers require manual updates. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1488 lxd: always remove existing device for project folder | snapcraft | merged | Merged as a follow-up to #1483, ensuring existing devices are always removed for the LXD project folder. Approved by two reviewers with zero unresolved comments. The change modifies three files, adds 64 lines, removes one, and passed all CI checks. |