Skip to content

Commit 47642a0

Browse files
committed
fix kubelet failed to start on setting hugetlb limits in non-exist cgroup dir
cause by kubelet startup be interrupted on setting list of cgroups In the 'cgroupManagerImpl.Exists' not check&recreate the hugetlb cgroup dir. Then setting the limits in non-exist cgroup dir will cause kubelet start failed. Signed-off-by: bingshen.wbs <[email protected]>
1 parent 0c0408c commit 47642a0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pkg/kubelet/cm/cgroup_manager_linux.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ func (m *cgroupManagerImpl) Exists(name CgroupName) bool {
257257
if utilfeature.DefaultFeatureGate.Enabled(kubefeatures.SupportPodPidsLimit) || utilfeature.DefaultFeatureGate.Enabled(kubefeatures.SupportNodePidsLimit) {
258258
whitelistControllers.Insert("pids")
259259
}
260+
if _, ok := m.subsystems.MountPoints["hugetlb"]; ok {
261+
whitelistControllers.Insert("hugetlb")
262+
}
260263
var missingPaths []string
261264
// If even one cgroup path doesn't exist, then the cgroup doesn't exist.
262265
for controller, path := range cgroupPaths {

0 commit comments

Comments
 (0)