diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-05-04 14:55:02 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-05-04 19:06:47 +0000 |
commit | 9cb694e094f10fc9191dda707a92893c1fbd1761 (patch) | |
tree | 529d334cba0cdae22d9b8129d254cbef71dc3362 | |
parent | 769f8f2d72dc74475bd9709aa6421ad8e1b14fc7 (diff) | |
download | podman-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.go | 5 |
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 } |