summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-09-27 11:58:59 -0400
committerGitHub <noreply@github.com>2021-09-27 11:58:59 -0400
commitb60cff8cf8fced448c7e78b5b4d72bd7ce949957 (patch)
treec34961ab43b0cf259b32b10f132157f6f6ba0b73 /pkg
parent899d5d7d7c526c44e3273b31703f518863800aa0 (diff)
parent8fca626e33670d49b4e8f06e09f0a87df3dca1fe (diff)
downloadpodman-b60cff8cf8fced448c7e78b5b4d72bd7ce949957.tar.gz
podman-b60cff8cf8fced448c7e78b5b4d72bd7ce949957.tar.bz2
podman-b60cff8cf8fced448c7e78b5b4d72bd7ce949957.zip
Merge pull request #11754 from flouthoc/podman-stop-report-non-running
stop: Do nothing if container was never created in runtime or in a invalid state.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/domain/infra/abi/containers.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index 02af214a6..8e7e2d411 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -169,6 +169,10 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
logrus.Debugf("Container %s is already stopped", c.ID())
case options.All && errors.Cause(err) == define.ErrCtrStateInvalid:
logrus.Debugf("Container %s is not running, could not stop", c.ID())
+ // container never created in OCI runtime
+ // docker parity: do nothing just return container id
+ case errors.Cause(err) == define.ErrCtrStateInvalid:
+ logrus.Debugf("Container %s is either not created on runtime or is in a invalid state", c.ID())
default:
return err
}