summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-05-04 14:55:02 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-05-04 19:06:47 +0000
commit9cb694e094f10fc9191dda707a92893c1fbd1761 (patch)
tree529d334cba0cdae22d9b8129d254cbef71dc3362
parent769f8f2d72dc74475bd9709aa6421ad8e1b14fc7 (diff)
downloadpodman-9cb694e094f10fc9191dda707a92893c1fbd1761.tar.gz
podman-9cb694e094f10fc9191dda707a92893c1fbd1761.tar.bz2
podman-9cb694e094f10fc9191dda707a92893c1fbd1761.zip
Make invalid state nonfatal when cleaning up in run
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #726 Approved by: baude
-rw-r--r--cmd/podman/run.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd/podman/run.go b/cmd/podman/run.go
index 06bc0e9df..5247f536c 100644
--- a/cmd/podman/run.go
+++ b/cmd/podman/run.go
@@ -227,7 +227,10 @@ func runCmd(c *cli.Context) error {
if err := ctr.Cleanup(); err != nil {
// If the container has been removed already, no need to error on cleanup
- if errors.Cause(err) == libpod.ErrNoSuchCtr || errors.Cause(err) == libpod.ErrCtrRemoved {
+ // Also, if it was restarted, don't error either
+ if errors.Cause(err) == libpod.ErrNoSuchCtr ||
+ errors.Cause(err) == libpod.ErrCtrRemoved ||
+ errors.Cause(err) == libpod.ErrCtrStateInvalid {
return nil
}