Installing core snap in container often fails
Metadata
Current evaluation
Fixed by merged PR #1568 (commit 1bd531772), which stopped LXD container builds from re-injecting identical snaps.
Resolution: closed resolved
Reason: Merged PR #1568 as commit 1bd531772 changed LXD snap injection to compare hashes and skip identical snaps, directly fixing LP #1716923.
Evaluated by: mr-cal-bot
No scores available.
Issue body
Very often, when trying to build a snap with SNAPCRAFT_CONTAINER_BUILDS=1, the build fails to install the core snap:
Looking up assertion ['account-key', 'public-key-sha3-384=BWDEoaqyr25nF5SNCvEv2v7QnM9QsfCc0PBMYD_i2NGSQ32EF2d4D0hqUel3m8ul']
Looking up assertion ['snap-declaration', 'snap-name=core']
Looking up assertion ['snap-revision', 'snap-revision=2844', 'snap-id=99T7MUlRhtI3U0QFgl5mXXESAiSwt776']
Adding assertion core_2844.assert
Installing /run/core_2844.snap
error: cannot perform the following tasks:
- Copy snap "core" data (cannot copy "/var/snap/core/2844" to "/var/snap/core/2844": failed to copy all: "cp: cannot stat '/var/snap/core/2844': No such file or directory" (1))
It seems to be trying to refresh to the same core revision that already exists?
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged PR #1568 (commit 1bd531772), which stopped LXD container builds from re-injecting identical snaps. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by merged snapcraft PR #1568 (commit 1bd531772), which stops LXD from re-injecting an already-installed core snap by comparing snap hashes. | |
| stealth/space-bunny-alpha | — | closed stale | Container builds failed while installing an existing core revision; the matching Launchpad report was closed as abandoned without a fix. | |
| qwen/qwen3.6-35b-a3b | — | — | Abandoned. The reported container build failure during core snap installation to an existing revision was closed without resolution. | |
| qwen/qwen3.6-35b-a3b | — | — | Container core snap installation failures caused by a same-revision copy error were closed without resolution. No comments or fixes were provided, indicating the issue was abandoned or remains unresolved. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
canonical/snapcraft#1568
(confidence 100%)
The merged PR prevents LXD from re-injecting identical snaps and fixes LP #1716923.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #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. | |
| #1568 lxd: don't re-inject the same snaps | snapcraft | merged | Merged PR #1568 as commit 1bd531772, preventing LXD from re-injecting identical snaps by comparing hashes instead of revision-based filenames; fixes LP #1716923. | |
| #1788667 changes in snapd break lxd snap injection for cleanbuild | snapcraft (launchpad) | closed | snapd's 0600 perms on injected snaps broke LXD cleanbuild injection. Fixed by merged PR snapcore/snapcraft#2222 (commit b2bd6b776), adding new-style LXD snap injection; bug closed. | |
| #1722049 core refresh in container build breaks build | snapcraft (launchpad) | closed | Fixed by merged PR canonical/snapcraft#2098 (commit 7666a74a7), which waits for active snap refreshes before injecting build snaps into reusable LXD containers. | |
| #1865 lxd: always (re-)injects snaps | snapcraft | merged | Merged PR #1865 as e99354492, fixing LP #1741752 by ensuring LXD re-injects required snaps when needed. |