diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-08 10:18:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-08 10:18:01 -0400 |
commit | f763962024bff7ac46dbb872c1f099d3c49ddc67 (patch) | |
tree | 5520752a95cdf06f0f59b592a91ed2175710e539 | |
parent | be7778df6c70227dab760ea92637ed97dad29641 (diff) | |
parent | d3e05de1563436fdcfa656bb499be02e0f40282b (diff) | |
download | podman-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
-rw-r--r-- | pkg/domain/infra/abi/containers.go | 6 |
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 { |