diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-03 22:04:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-03 22:04:18 +0200 |
commit | 986a277a962aef8d975996d494a4522299f6973b (patch) | |
tree | a85c39b8b9738d2495507fbd34b2c87d5e269a04 | |
parent | 377554d681db749547100d4cead47fb42fd9c414 (diff) | |
parent | 61ea85bddb0ad6c0b83dbeae441d0aacf2fb2588 (diff) | |
download | podman-986a277a962aef8d975996d494a4522299f6973b.tar.gz podman-986a277a962aef8d975996d494a4522299f6973b.tar.bz2 podman-986a277a962aef8d975996d494a4522299f6973b.zip |
Merge pull request #6483 from mheon/cleanup_on_stop
When stopping containers locally, ensure cleanup runs
-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 ad0e957e9..19232eff1 100644 --- a/pkg/domain/infra/abi/containers.go +++ b/pkg/domain/infra/abi/containers.go @@ -179,6 +179,12 @@ func (ic *ContainerEngine) ContainerStop(ctx context.Context, namesOrIds []strin report.Err = err reports = append(reports, &report) continue + } else if err := con.Cleanup(ctx); err != nil { + // Only if no error, proceed to cleanup to ensure all + // mounts are removed before we exit. + report.Err = err + reports = append(reports, &report) + continue } reports = append(reports, &report) } |