← Back to issue list

Parallel installation of snapcraft not passed to LXD instance

View original Github issue

Metadata

Project
snapcraft
Number
#4927
Type
issue
State
closed
Author
farshidtz
Labels
—
Created
Updated
Closed

Current evaluation

Parallel-installed (signed) snapcraft was not passed to the LXD build instance. Fixed by merged PR #5085 and backported via #5087 to hotfix/7.5, shipped in 7.5.7; also tracks upstream craft-application#411.

Resolution: closed resolved

Reason: Maintainer @mr-cal closed the issue on 2024-10-04 stating "Fixed via #5085 and #5087"; PR #5085 ("fix: allow parallel installations of signed snapcraft snaps") was merged and #5087 backported it to hotfix/7.5, resolving both #4927 and the related #4683.

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description It may be useful to install two versions of snapcraft for testing changes to snapcraft itself. In this case, I am working on a new extension and the parallel installation of snapcraft isn't passed to LXD. Unrelated issue: #4683 ### To Reproduce After building snapcraft, install it in parallel to the existing stable snapcraft: ``` $ sudo snap install --classic --dangerous --name=snapcraft_env ./snapcraft_8.3.0.post10+git8442928db_amd64.snap snapcraft_env 8.3.0.post10+git8442928db installed ``` Then try to build a snap that uses this the newly developed extension: ``` $ SNAPCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS=1 snapcraft_env -v Starting snapcraft, version 8.3.0.post10+git8442928db Logging execution to '/home/farshid/.local/state/snapcraft/log/snapcraft-20240718-095346.533496.log' *EXPERIMENTAL* extension 'env-injector' enabled Launching managed ubuntu 24.04 instance... Starting instance Starting snapcraft, version 8.3.1 Logging execution to '/tmp/snapcraft.log' Starting snapcraft, version 8.3.1 Logging execution to '/tmp/snapcraft.log' Extension 'env-injector' does not exist Failed to execute snapcraft in instance. ``` ### Environment Ubuntu 23.10 ### snapcraft.yaml ```shell # Refer to https://github.com/canonical/snapcraft/pull/4925 for the extension name: envtester base: core24 version: 'demo' summary: Demonstration of env-exporter program description: | envtester is a demo snap to show the env-exporter program use cases grade: stable confinement: strict apps: myapp: daemon: simple environment: env_alias: myapp extensions: - env-injector command: run.sh parts: myapp: source: . plugin: dump # also need to create run.sh ``` ### Relevant log output ```shell - ``` ### Additional context I could not try with multipass as the provider, as I get some strange error, unrelated to the parallel installation: ``` SNAPCRAFT_BUILD_ENVIRONMENT=multipass SNAPCRAFT_ENABLE_EXPERIMENTAL_EXTENSIONS=1 snapcraft_env -v Starting snapcraft, version 8.3.0.post10+git8442928db Logging execution to '/home/farshid/.local/state/snapcraft/log/snapcraft-20240718-105347.585930.log' *EXPERIMENTAL* extension 'env-injector' enabled Launching managed ubuntu 24.04 instance... Incompatible base detected: Expected OS version '24.04', found '24.10'. Recommended resolution: Clean incompatible instance and retry the requested operation. ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Parallel-installed (signed) snapcraft was not passed to the LXD build instance. Fixed by merged PR #5085 and backported via #5087 to hotfix/7.5, shipped in 7.5.7; also tracks upstream craft-application#411.
stealth/space-bunny-alpha — closed resolved Fixed by PR #5085 and its 7.5 backport #5087, allowing parallel Snapcraft installs to be passed into managed LXD instances instead of using stable Snapcraft.
qwen/qwen3.6-35b-a3b — — Parallel snapcraft installations were not passed to LXD instances, causing version mismatches. Resolved via pull requests #5085 and #5087, addressing upstream craft-application bug #411.
qwen/qwen3.6-35b-a3b — — Fixed via PRs #5085 and #5087. Parallel snapcraft installations are now correctly passed to LXD managed instances, resolving the extension loading failure.
qwen/qwen3.6-35b-a3b — — Fixed via PRs #5085 and #5087. Parallel snapcraft installations are now correctly passed to LXD instances, resolving the reported build failure.
qwen3.6-35b-a3b-mtp-q6 — — Fixed via PRs #5085 and #5087. Parallel snapcraft installations are now correctly passed to LXD managed instances, resolving the version mismatch during builds.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#5085 (confidence 95%)

    Merged PR that fixes parallel installation of signed snapcraft snaps; cited by the closing comment.

  • Likely Fixed By: canonical/snapcraft#5087 (confidence 90%)

    Backport of the same fix to hotfix/7.5, released in 7.5.7.

  • Duplicate Of: canonical/snapcraft#4683 (confidence 80%)

    Issue #4927 was described as related to #4683, which was closed by the same PRs.

  • Blocked By: canonical/craft-application#411 (confidence 60%)

    Upstream bug reported by the maintainer where the LXD instance launch used the wrong snapcraft channel/version.

Related issues

Issue Project State Summary Similarity
#1985409 snapcraft-managed lxd containers do not respect parallel installs snapcraft (launchpad) closed Reported 2022 that parallel-installed snapcraft instances (e.g. snapcraft_7) launch the unsuffixed host snapcraft inside their managed LXD build container, causing '--build-for' build failures. Closed in 2026 after PR #5085 and 7.5 backport #5087.
84%
#4683 Cannot use parallel installations of snapcraft if a non-aliased version is not installed snapcraft closed Fixed by merged PR #5085 (main) and backported via #5087 to hotfix/7.5 (7.5.7); craft-providers now inject the aliased snapcraft snap correctly. Upstream bug tracked in craft-application#411.
81%
#1997874 SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT doesn't seem to be passed through to lxd container snapcraft (launchpad) closed SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT was not forwarded into the LXD/Multipass build instance. Fixed by merged PR snapcore/snapcraft#3997 (commit 31a3990c8, 'providers: pass SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT to instance'), released in snapcraft 7.3.
79%
#5085 fix: allow parallel installations of signed snapcraft snaps snapcraft merged Merged PR #5085 fixed parallel installation of signed Snapcraft snaps, resolving #4683 and #4927; #5087 backported the fix to hotfix/7.5.
77%
#5087 fix: allow parallel installations of signed snapcraft snaps (7.5) snapcraft merged Merged into hotfix/7.5 and released in 7.5.7, fixing parallel installs of signed or store-installed Snapcraft; resolves #4683 and #4927.
74%
#411 Support snap parallel installs craft-application closed Parallel-installed snap injection was fixed by PR #467 (commit 77a3582b); #411 was closed as fixed, with a separate craft-providers gap noted.
73%
#5420 Snapcraft 7 fails to launch a LXD container based on host apt sources entries snapcraft closed Closed as a duplicate of canonical/snapcraft#4408; no separate fix was made for this report.
71%