summaryrefslogtreecommitdiff
path: root/pkg/domain/infra
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-08 10:18:01 -0400
committerGitHub <noreply@github.com>2020-09-08 10:18:01 -0400
commitf763962024bff7ac46dbb872c1f099d3c49ddc67 (patch)
tree5520752a95cdf06f0f59b592a91ed2175710e539 /pkg/domain/infra
parentbe7778df6c70227dab760ea92637ed97dad29641 (diff)
parentd3e05de1563436fdcfa656bb499be02e0f40282b (diff)
downloadpodman-f763962024bff7ac46dbb872c1f099d3c49ddc67.tar.gz
podman-f763962024bff7ac46dbb872c1f099d3c49ddc67.tar.bz2
podman-f763962024bff7ac46dbb872c1f099d3c49ddc67.zip
Merge pull request #7557 from vrothberg/fix-7384
podman stop: do not cleanup for auto-removal
Diffstat (limited to 'pkg/domain/infra')
-rw-r--r--pkg/domain/infra/abi/containers.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go
index 3fee5d394..0537942e6 100644
--- a/pkg/domain/infra/abi/containers.go
+++ b/pkg/domain/infra/abi/containers.go
@@ -174,6 +174,12 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin
return err
}
}
+ if c.AutoRemove() {
+ // Issue #7384: if the container is configured for
+ // auto-removal, it might already have been removed at
+ // this point.
+ return nil
+ }
return c.Cleanup(ctx)
})
if err != nil {