Skip to content

Commit

Permalink
podman mount: ignore ErrLayerUnknown
Browse files Browse the repository at this point in the history
When we check for a storage container mount we normally expect a
ErrContainerUnknown when it does not exists. However during we check if
it is actually mounted we also can get ErrLayerUnknown when the
contianer was removed between the Container and Mount checks as they do
not happen under the same lock.

Fixes #23671

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Luap99 committed Sep 27, 2024
1 parent 87dcf9d commit 5c3019e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/domain/infra/abi/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1418,7 +1418,7 @@ func (ic *ContainerEngine) ContainerMount(ctx context.Context, nameOrIDs []strin
// This can only happen in a narrow race because we first create the storage
// container and then the libpod container so the StorageContainers() call
// above would need to happen in that interval.
if errors.Is(err, types.ErrContainerUnknown) || errors.Is(err, define.ErrCtrExists) {
if errors.Is(err, types.ErrContainerUnknown) || errors.Is(err, types.ErrLayerUnknown) || errors.Is(err, define.ErrCtrExists) {
continue
}
return nil, err
Expand Down

0 comments on commit 5c3019e

Please sign in to comment.