mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-03 09:54:33 +00:00
Merge pull request #985 from bergwolf/sandbox-cgroups-only
runtime: improve sandbox cleanup logic
This commit is contained in:
@@ -686,13 +686,13 @@ func (s *Sandbox) Delete(ctx context.Context) error {
|
|||||||
|
|
||||||
for _, c := range s.containers {
|
for _, c := range s.containers {
|
||||||
if err := c.delete(ctx); err != nil {
|
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 !rootless.IsRootless() {
|
||||||
if err := s.cgroupsDelete(); err != nil {
|
if err := s.cgroupsDelete(); err != nil {
|
||||||
return err
|
s.Logger().WithError(err).Error("failed to cleanup cgroups")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user