Do not error trying to remove cgroups that don't exist

Signed-off-by: Matthew Heon <matthew.heon@gmail.com>

Closes: #507
Approved by: baude
This commit is contained in:
Matthew Heon 2018-05-09 17:37:31 -04:00 committed by Atomic Bot
parent c4c5c1a3e1
commit 177c27e75d

View file

@ -736,6 +736,12 @@ func (c *Container) cleanupCgroups() error {
cgroup, err := cgroups.Load(cgroups.V1, cgroups.StaticPath(path))
if err != nil {
// It's fine for the cgroup to not exist
// We want it gone, it's gone
if err == cgroups.ErrCgroupDeleted {
return nil
}
return err
}