diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-05-17 09:37:53 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-05-17 18:55:59 +0000 |
commit | 20bceb787da96741cb61e04b176fe7827c8b7070 (patch) | |
tree | 2d6e46262bf0b6b6f9c7da4dd45caa4c4a080f13 /libpod/runtime_pod.go | |
parent | 92a9f3a21262ec29b4ad17e97bb0e8c54a355cb2 (diff) | |
download | podman-20bceb787da96741cb61e04b176fe7827c8b7070.tar.gz podman-20bceb787da96741cb61e04b176fe7827c8b7070.tar.bz2 podman-20bceb787da96741cb61e04b176fe7827c8b7070.zip |
Use container cleanup() functions when removing
Instead of manually calling the individual functions that cleanup
uses to tear down a container's resources, just call the cleanup
function to make sure that cleanup only needs to happen in one
place.
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes: #790
Approved by: rhatdan
Diffstat (limited to 'libpod/runtime_pod.go')
-rw-r--r-- | libpod/runtime_pod.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libpod/runtime_pod.go b/libpod/runtime_pod.go index 44910b180..257b980a2 100644 --- a/libpod/runtime_pod.go +++ b/libpod/runtime_pod.go @@ -160,8 +160,8 @@ func (r *Runtime) RemovePod(p *Pod, removeCtrs, force bool) error { // We can remove containers even if they have dependencies now // As we have guaranteed their dependencies are in the pod for _, ctr := range ctrs { - // Stop network NS - if err := r.teardownNetNS(ctr); err != nil { + // Clean up network namespace, cgroups, mounts + if err := ctr.cleanup(); err != nil { return err } |