Running several instances of snapcraft in parallel for a given snap name results in failures to acquire an apt lock file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
Confirmed
|
Undecided
|
Chris Patterson |
Bug Description
Use case: I'm working on upstreaming the snap packaging of chromium, and the chromium CI jobs try to build 3 snaps in parallel (for stable, beta and unstable). Those are initiated from three separate directories but different instances of snapcraft compete for the same apt lock file, because the three snaps have the same name, and thus use the same shared multipass VM.
This is the error:
Sorry, an error occurred in Snapcraft:
Traceback (most recent call last):
File "/usr/lib/
return self._lock.
SystemError: E:Could not get lock /home/chrome-
Should snapcraft allow specifying a unique VM/container name, to avoid clashes?
Changed in snapcraft: | |
status: | New → Confirmed |
assignee: | nobody → Chris Patterson (cjp256) |
We will likely take the current project path into account like remote-build does, so a project can be built simultaneously when using multiple copies (with different paths).
It may also be useful to add a `--transient` option for snapping that spins up a VM/container for the run and immediately dispose of it upon completion.