Merge pull request #985 from bergwolf/sandbox-cgroups-only

runtime: improve sandbox cleanup logic
This commit is contained in:
Eric Ernst
2021-05-13 16:31:26 -07:00
committed by GitHub

View File

@@ -686,13 +686,13 @@ func (s *Sandbox) Delete(ctx context.Context) error {
for _, c := range s.containers {
if err := c.delete(ctx); err != nil {
return err
s.Logger().WithError(err).WithField("cid", c.id).Debug("failed to delete container")
}
}
if !rootless.IsRootless() {
if err := s.cgroupsDelete(); err != nil {
return err
s.Logger().WithError(err).Error("failed to cleanup cgroups")
}
}