summaryrefslogtreecommitdiff
path: root/libpod/runtime_pod_linux.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-10-20 13:20:12 +0000
committerGitHub <noreply@github.com>2021-10-20 13:20:12 +0000
commiteba281c3e0e69533427d3eb5c66c60b5ca038c1b (patch)
tree5a12ebc1a7c40f8967f1225b2ec730ea29d8f433 /libpod/runtime_pod_linux.go
parent97f051f65769fed32b3c497b3f484667400c66a9 (diff)
parent4f7a431daf97f33a40609bd4823ed92ab8aa9ca4 (diff)
downloadpodman-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/runtime_pod_linux.go')
-rw-r--r--libpod/runtime_pod_linux.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/libpod/runtime_pod_linux.go b/libpod/runtime_pod_linux.go
index 9c6f1539f..9bd6d5e78 100644
--- a/libpod/runtime_pod_linux.go
+++ b/libpod/runtime_pod_linux.go
@@ -177,10 +177,9 @@ func (r *Runtime) removePod(ctx context.Context, p *Pod, removeCtrs, force bool,
if err != nil {
return err
}
-
numCtrs := len(ctrs)
- // If the only container in the pod is the pause container, remove the pod and container unconditionally.
+ // If the only running container in the pod is the pause container, remove the pod and container unconditionally.
pauseCtrID := p.state.InfraContainerID
if numCtrs == 1 && ctrs[0].ID() == pauseCtrID {
removeCtrs = true