summaryrefslogtreecommitdiff
path: root/libpod/runtime_cstorage.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-09-29 10:03:46 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2021-09-29 10:12:49 -0400
commitc9ea2cae1e1d48931c0dc3399e1114a66635840f (patch)
treedb1730bb44c11b3760072e7a73976ff32f206dda /libpod/runtime_cstorage.go
parent453c49c488dd6518b33393e04c04ebc32ce61ee9 (diff)
downloadpodman-c9ea2cae1e1d48931c0dc3399e1114a66635840f.tar.gz
podman-c9ea2cae1e1d48931c0dc3399e1114a66635840f.tar.bz2
podman-c9ea2cae1e1d48931c0dc3399e1114a66635840f.zip
Storage can remove ErrNotAContainer as well
Fixes: https://github.com/containers/podman/issues/11775 [NO TESTS NEEDED] No easy way to cause this problem in CI. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'libpod/runtime_cstorage.go')
-rw-r--r--libpod/runtime_cstorage.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/runtime_cstorage.go b/libpod/runtime_cstorage.go
index 58bd67e6d..5694967aa 100644
--- a/libpod/runtime_cstorage.go
+++ b/libpod/runtime_cstorage.go
@@ -121,7 +121,7 @@ func (r *Runtime) removeStorageContainer(idOrName string, force bool) error {
}
if err := r.store.DeleteContainer(ctr.ID); err != nil {
- if errors.Cause(err) == storage.ErrContainerUnknown {
+ if errors.Cause(err) == storage.ErrNotAContainer || errors.Cause(err) == storage.ErrContainerUnknown {
// Container again gone, no error
logrus.Infof("Storage for container %s already removed", ctr.ID)
return nil