summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-12-03 00:33:27 -0800
committerGitHub <noreply@github.com>2019-12-03 00:33:27 -0800
commit588156a9ef36c657e2b161a881d726aafa024ebb (patch)
treea50e8c7180810b0d5bcdd72213efb62b8ffc40d3
parent309452dcfc4bea9cbeff03c8b7c9a0811521e524 (diff)
parent2eda555ebef190072cc38e85168e38f1f846f139 (diff)
downloadpodman-588156a9ef36c657e2b161a881d726aafa024ebb.tar.gz
podman-588156a9ef36c657e2b161a881d726aafa024ebb.tar.bz2
podman-588156a9ef36c657e2b161a881d726aafa024ebb.zip
Merge pull request #4623 from rhatdan/errors
Ignore ErrCtrRemoved when removing a container
-rw-r--r--pkg/adapter/containers.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/adapter/containers.go b/pkg/adapter/containers.go
index 2b838452c..0c73977c7 100644
--- a/pkg/adapter/containers.go
+++ b/pkg/adapter/containers.go
@@ -461,7 +461,8 @@ func (r *LocalRuntime) Run(ctx context.Context, c *cliconfig.RunValues, exitCode
if c.IsSet("rm") {
if err := r.Runtime.RemoveContainer(ctx, ctr, false, true); err != nil {
- if errors.Cause(err) == define.ErrNoSuchCtr {
+ if errors.Cause(err) == define.ErrNoSuchCtr ||
+ errors.Cause(err) == define.ErrCtrRemoved {
logrus.Warnf("Container %s does not exist: %v", ctr.ID(), err)
} else {
logrus.Errorf("Error removing container %s: %v", ctr.ID(), err)