Change:
start kubelet with below config: with below config: check the cgroup, get the following output: then, start kubelet.service, run as follows: why? Environment: Kubernetes version (use ): v1.14.1 Cloud provider or hardware configuration: OS (e.g: ): Debian GNU/Linux 9 (stretch) Kernel (e.g. ): SMP Debian 4.9.30-2+deb9u2 (2017-06-26) x86_64 GNU/Linux Install tools: Network plugin and version (if this is a network-related bug): Others:
/area kubelet /sig node
From cgroupManagerImpl#Exists : Can you turn on log V4 so that we can see the above log ? thanks
It seems if we change return value type to error, the caller would be able to incorporate error message from Exists func.
Thanks for sharing :) Hope we can help you debug! Is the information here
thanks for your rely. when I turn on log V4, logs as followed: Cgroup path is not expected: , so when I modify , it‘s ok. so Is this normal?
Ah, it looks like its appending automatically to the cgroup name. At the very least, I think the documentation could be clearer to indicate this will happen. An additional option could be adding the suffix only if doesn't already exist.
thank you
no problem :) If this issue is resolved, would you mind closing it? Thanks!
It might be worth considering adding a little code somewhere that simply strips off the ".slice" from the cgroup name supplied in configuration option and just normalizing the input in the configuration package itself (possibly with a warning that prints out stating cgroup should not end in ".slice")
I think that's a great idea. I will work on that, unless you want to :) /assign
thank you

Discussion:
} } } <ins> func TestParseSystemdToCgroupName(t *testing.T) { testCases := []struct { input    string expected CgroupName }{ { input:    "/test", expected: []string{"test"}, }, { input:    "/test.slice", expected: []string{"test"}, }, } for _, testCase := range testCases { if actual := ParseSystemdToCgroupName(testCase.input); !reflect.DeepEqual(actual, testCase.expected) { t.Errorf("Unexpected result, input: %v, expected: %v, actual: %v", testCase.input, testCase.expected, actual) } } } </ins>

// Now apply kube reserved and system reserved limits if required. if nc.EnforceNodeAllocatable.Has(kubetypes.SystemReservedEnforcementKey) { klog.V(2).Infof("Enforcing System reserved on cgroup %q with limits: %+v", nc.SystemReservedCgroupName, nc.SystemReserved) <del> if err := enforceExistingCgroup(cm.cgroupManager, ParseCgroupfsToCgroupName(nc.SystemReservedCgroupName), nc.SystemReserved); err != nil { </del> <ins> if err := enforceExistingCgroup(cm.cgroupManager, cm.cgroupManager.CgroupName(nc.SystemReservedCgroupName), nc.SystemReserved); err != nil { </ins> message := fmt.Sprintf("Failed to enforce System Reserved Cgroup Limits on %q: %v", nc.SystemReservedCgroupName, err) cm.recorder.Event(nodeRef, v1.EventTypeWarning, events.FailedNodeAllocatableEnforcement, message) return fmt.Errorf(message)

} if nc.EnforceNodeAllocatable.Has(kubetypes.KubeReservedEnforcementKey) { klog.V(2).Infof("Enforcing kube reserved on cgroup %q with limits: %+v", nc.KubeReservedCgroupName, nc.KubeReserved) <del> if err := enforceExistingCgroup(cm.cgroupManager, ParseCgroupfsToCgroupName(nc.KubeReservedCgroupName), nc.KubeReserved); err != nil { </del> <ins> if err := enforceExistingCgroup(cm.cgroupManager, cm.cgroupManager.CgroupName(nc.KubeReservedCgroupName), nc.KubeReserved); err != nil { </ins> message := fmt.Sprintf("Failed to enforce Kube Reserved Cgroup Limits on %q: %v", nc.KubeReservedCgroupName, err) cm.recorder.Event(nodeRef, v1.EventTypeWarning, events.FailedNodeAllocatableEnforcement, message) return fmt.Errorf(message)