diff --git a/runtime/v2/runc/v2/service.go b/runtime/v2/runc/v2/service.go index 05f9347e7..fccede15b 100644 --- a/runtime/v2/runc/v2/service.go +++ b/runtime/v2/runc/v2/service.go @@ -336,7 +336,14 @@ func (s *service) Start(ctx context.Context, r *taskAPI.StartRequest) (*taskAPI. logrus.WithError(err).Error("add cg to OOM monitor") } case *cgroupsv2.Manager: - // TODO: enable controllers for statting + allControllers, err := cg.RootControllers() + if err != nil { + logrus.WithError(err).Error("failed to get root controllers") + } else { + if err := cg.ToggleControllers(allControllers, cgroupsv2.Enable); err != nil { + logrus.WithError(err).Errorf("failed to enable controllers (%v)", allControllers) + } + } // OOM monitor is not implemented yet logrus.WithError(errdefs.ErrNotImplemented).Warn("add cg to OOM monitor")