mirror of
https://github.com/containers/podman.git
synced 2025-12-01 18:49:18 +08:00
podman mount: ignore ErrLayerUnknown
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 <pholzing@redhat.com>
This commit is contained in:
@@ -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
|
// This can only happen in a narrow race because we first create the storage
|
||||||
// container and then the libpod container so the StorageContainers() call
|
// container and then the libpod container so the StorageContainers() call
|
||||||
// above would need to happen in that interval.
|
// 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
|
continue
|
||||||
}
|
}
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|||||||
Reference in New Issue
Block a user