Merge pull request #4340 from AkihiroSuda/fix-4312
decrease log level of cgroup2 ToggleController error when running in UserNS
This commit is contained in:
commit
492c014136
@ -46,6 +46,7 @@ import (
|
||||
"github.com/containerd/containerd/runtime/v2/runc/options"
|
||||
"github.com/containerd/containerd/runtime/v2/shim"
|
||||
taskAPI "github.com/containerd/containerd/runtime/v2/task"
|
||||
"github.com/containerd/containerd/sys"
|
||||
"github.com/containerd/containerd/sys/reaper"
|
||||
runcC "github.com/containerd/go-runc"
|
||||
"github.com/containerd/typeurl"
|
||||
@ -360,7 +361,11 @@ func (s *service) Start(ctx context.Context, r *taskAPI.StartRequest) (*taskAPI.
|
||||
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)
|
||||
if sys.RunningInUserNS() {
|
||||
logrus.WithError(err).Debugf("failed to enable controllers (%v)", allControllers)
|
||||
} else {
|
||||
logrus.WithError(err).Errorf("failed to enable controllers (%v)", allControllers)
|
||||
}
|
||||
}
|
||||
}
|
||||
if err := s.ep.Add(container.ID, cg); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user