snapcraft should wait for cloud-init to complete when using containers or VMs
Metadata
Current evaluation
Fixed by snapcore/snapcraft#2227, merged as a0dac5a92: LXD container and VM launches now wait for cloud-init to finish.
Resolution: closed resolved
Reason: Merged PR snapcore/snapcraft#2227 added the cloud-init wait and resolved the Launchpad report. The change landed in commit a0dac5a92.
Evaluated by: mr-cal-bot
No scores available.
Issue body
A call to:
$ cloud-init status --wait
Will block until cloud-init completes, otherwise they may be stepping on each other's toes:
The following NEW packages will be installed:
squashfuse
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Fixed by snapcore/snapcraft#2227, merged as a0dac5a92: LXD container and VM launches now wait for cloud-init to finish. | |
| stealth/space-bunny-alpha | — | closed resolved | Fixed by snapcore/snapcraft#2227 in commit a0dac5a92, which made the LXD provider wait for cloud-init before continuing. | |
| stealth/space-bunny-alpha | — | closed resolved | Snapcraft now waits for cloud-init when launching LXD containers/VMs. The fix merged via snapcore/snapcraft#2227 in commit a0dac5a92. | |
| stealth/space-bunny-alpha | — | closed resolved | Snapcraft’s LXD provider now waits for cloud-init before proceeding, avoiding apt lock contention; merged in #2227 as a0dac5a92. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without implementation. The apt lock race condition between snapcraft and cloud-init was not addressed. No fix or PR was merged, indicating the report was abandoned or superseded by updated container provisioning methods. | |
| qwen/qwen3.6-35b-a3b | — | — | Reported apt lock conflicts between snapcraft and cloud-init were closed without resolution. The suggested wait mechanism was never implemented, leaving the race condition unaddressed. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Likely Fixed By:
snapcore/snapcraft#2227
(confidence 100%)
The linked merged PR added the cloud-init wait for LXD launches.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1779128 Wait for cloud init when starting a vm | snapcraft (launchpad) | closed | LXD now waits for cloud-init before running VM operations, implemented by snapcraft PR #2227 in commit a0dac5a92. | |
| #719 Snapcraft fails initialization of build container | craft-providers | closed | LXD startup race was fixed by waiting for instance readiness in craft-providers PR #720; the fix shipped via Snapcraft PR #5247 in Snapcraft 8.6.2. |