summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-03 22:04:18 +0200
committerGitHub <noreply@github.com>2020-06-03 22:04:18 +0200
commit986a277a962aef8d975996d494a4522299f6973b (patch)
treea85c39b8b9738d2495507fbd34b2c87d5e269a04 /pkg/domain/infra/abi
parent377554d681db749547100d4cead47fb42fd9c414 (diff)
parent61ea85bddb0ad6c0b83dbeae441d0aacf2fb2588 (diff)
downloadpodman-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
Diffstat (limited to 'pkg/domain/infra/abi')
-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 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)
}