diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-05-09 16:33:31 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-05-11 14:43:57 +0000 |
commit | c4c5c1a3e191348491299aa2d53397879da0854d (patch) | |
tree | 5370f50ecc5239d2a4279cc5b133107671c4b1c9 /libpod/runtime_ctr.go | |
parent | b70f6cc04a831478b2c81094b6bfe80bfed6a687 (diff) | |
download | podman-c4c5c1a3e191348491299aa2d53397879da0854d.tar.gz podman-c4c5c1a3e191348491299aa2d53397879da0854d.tar.bz2 podman-c4c5c1a3e191348491299aa2d53397879da0854d.zip |
Remove parent cgroup we create with cgroupfs
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Closes: #507
Approved by: baude
Diffstat (limited to 'libpod/runtime_ctr.go')
-rw-r--r-- | libpod/runtime_ctr.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index f5d8e5704..981f745b4 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -219,6 +219,11 @@ func (r *Runtime) removeContainer(c *Container, force bool) error { return errors.Wrapf(ErrCtrExists, "container %s has dependent containers which must be removed before it: %s", c.ID(), depsStr) } + // Tear down the container's cgroups (if they exist) + if err := c.cleanupCgroups(); err != nil { + return err + } + // Stop the container's network namespace (if it has one) if err := r.teardownNetNS(c); err != nil { return err |