← Back to issue list

lxd: path cannot have extra forward slashes

View original Github issue

Metadata

Project
snapcraft
Number
#1483
Type
pull request
State
merged
Author
kalikiana
Labels
—
Created
Updated
Closed

Current evaluation

Merged in canonical/snapcraft#1483 (commit 1a3c02b43), removing extra leading slashes from LXD mount paths so containers could find snap/snapcraft.yaml.

Resolution: closed resolved

Reason: PR #1483 was merged as commit 1a3c02b43, preventing malformed device paths that could leave LXD claiming a device existed without mounting snap/snapcraft.yaml.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#1483 (commit 1a3c02b43), removing extra leading slashes from LXD mount paths so containers could find snap/snapcraft.yaml.
stealth/space-bunny-alpha — closed resolved Merged #1483 removed leading slashes from LXD mount paths, fixing repeated container builds that could not find snap/snapcraft.yaml and aborted during device removal.
stealth/space-bunny-alpha — closed resolved Merged fix in PR #1483 removed leading slashes from LXD mount paths, preventing unmounted-device errors and repeated missing snap/snapcraft.yaml build failures.
stealth/space-bunny-alpha — closed resolved Merged in canonical/snapcraft#1483 (commit 1a3c02b43), removing leading extra slashes from LXD device mount paths to prevent unmounted-device removal errors and missing snapcraft.yaml.
stealth/space-bunny-alpha — closed resolved Merged #1483 (commit 1a3c02b43) to remove extra leading slashes from LXD mount paths, preventing device-removal internal errors when project folders are not mounted.
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.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1585 lxd: pass SNAPCRAFT_PARTS_URI through into container snapcraft merged Merged in canonical/snapcraft#1585 (13ea598d5), forwarding SNAPCRAFT_PARTS_URI into LXD containers so cleanbuild can resolve remote parts; fixes Launchpad #1719951.
76%
#1408 lxd: Stop setting $HOME in containers snapcraft merged Merged canonical/snapcraft#1408, stopping LXD builds from overriding $HOME so .cache remains in the container rather than the mounted project directory.
74%
#1364 lxd: Inject snapcraft and core snaps into the container snapcraft merged Merged PR #1364 as 99f5598ac, injecting the host's Snapcraft and core snaps into LXD containers so builds no longer use a mismatched Xenial archive version.
72%
#1577 lxd: don't inject local snaps on a different arch snapcraft merged Merged in snapcraft#1577 via commit 5cef61310, preventing incompatible local snaps from being injected into cross-architecture LXD builds and using store snaps instead.
71%
#1739 lxd: refresh remote container snapcraft merged Merged #1739 as 2f9265f23, fixing snapcraft refresh to honor the LXD remote named by SNAPCRAFT_CONTAINER_BUILDS instead of using a local container.
70%