summaryrefslogtreecommitdiff
path: root/libpod/runtime_ctr.go
diff options
context:
space:
mode:
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r--libpod/runtime_ctr.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go
index 0fdcc8255..fc1a688fb 100644
--- a/libpod/runtime_ctr.go
+++ b/libpod/runtime_ctr.go
@@ -762,6 +762,14 @@ func (r *Runtime) removeContainer(ctx context.Context, c *Container, force, remo
continue
}
if err := runtime.removeVolume(ctx, volume, false, timeout); err != nil && errors.Cause(err) != define.ErrNoSuchVolume {
+ if errors.Cause(err) == define.ErrVolumeBeingUsed {
+ // Ignore error, since podman will report original error
+ volumesFrom, _ := c.volumesFrom()
+ if len(volumesFrom) > 0 {
+ logrus.Debugf("Cleanup volume not possible since volume is in use (%s)", v)
+ continue
+ }
+ }
logrus.Errorf("Cleanup volume (%s): %v", v, err)
}
}