Skip to content

Commit 177c27e

Browse files
mheonrh-atomic-bot
authored andcommitted
Do not error trying to remove cgroups that don't exist
Signed-off-by: Matthew Heon <[email protected]> Closes: containers#507 Approved by: baude
1 parent c4c5c1a commit 177c27e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libpod/container_internal.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,12 @@ func (c *Container) cleanupCgroups() error {
736736

737737
cgroup, err := cgroups.Load(cgroups.V1, cgroups.StaticPath(path))
738738
if err != nil {
739+
// It's fine for the cgroup to not exist
740+
// We want it gone, it's gone
741+
if err == cgroups.ErrCgroupDeleted {
742+
return nil
743+
}
744+
739745
return err
740746
}
741747

0 commit comments

Comments
 (0)