containerd-integration: "failed to export layer: snapshot already exists" for concurrent docker commit
#44450
Labels
containerd-integration
Issues and PRs related to containerd integration
kind/bug
Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed.
status/0-triage
Description
With beta feature
Use containerd for pulling and storing images
enabled in docker-desktop, when twodocker commit
are executed at the same time and the two container images are of the same origin, error will occur:Which is OK if
Use containerd for pulling and storing images
is disabled. So I would say it's a bug.Reproduce
docker commit nginx-image-2-tmp nginx-image-2 &
Expected behavior
When
Use containerd for pulling and storing images
is enabled, even twodocker commit
are executed at the same time and the two container images are of the same origin, it should still work.docker version
docker info
Additional Info
Maybe it's a containerd issue. Two containers can have images of the exact same origin, so it shoud be OK if same layer of snapshot exists. So maybe I guess the following line and something alike should change into a warning instead of an error:
moby/vendor/github.com/containerd/containerd/metadata/snapshot.go
Line 435 in 18f8ab6
If that fix would cause issues, then maybe you should implement transaction lock, and waiting for a lock to get released and try again when snapshot already exists.
The text was updated successfully, but these errors were encountered: