diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-10-20 13:20:12 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-20 13:20:12 +0000 |
commit | eba281c3e0e69533427d3eb5c66c60b5ca038c1b (patch) | |
tree | 5a12ebc1a7c40f8967f1225b2ec730ea29d8f433 /libpod/container_internal.go | |
parent | 97f051f65769fed32b3c497b3f484667400c66a9 (diff) | |
parent | 4f7a431daf97f33a40609bd4823ed92ab8aa9ca4 (diff) | |
download | podman-eba281c3e0e69533427d3eb5c66c60b5ca038c1b.tar.gz podman-eba281c3e0e69533427d3eb5c66c60b5ca038c1b.tar.bz2 podman-eba281c3e0e69533427d3eb5c66c60b5ca038c1b.zip |
Merge pull request #11851 from cdoern/podRm
Pod Rm Infra Handling Improvements
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r-- | libpod/container_internal.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go index bfed94990..43f5398a2 100644 --- a/libpod/container_internal.go +++ b/libpod/container_internal.go @@ -2103,7 +2103,7 @@ func (c *Container) checkReadyForRemoval() error { return errors.Wrapf(define.ErrCtrStateInvalid, "container %s is in invalid state", c.ID()) } - if c.ensureState(define.ContainerStateRunning, define.ContainerStatePaused) { + if c.ensureState(define.ContainerStateRunning, define.ContainerStatePaused) && !c.IsInfra() { return errors.Wrapf(define.ErrCtrStateInvalid, "cannot remove container %s as it is %s - running or paused containers cannot be removed without force", c.ID(), c.state.State.String()) } |