mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
Merge pull request #93012 from giuseppe/no-hugetlb-cgroupv2
kubelet, cgroupv2: make hugetlb optional
This commit is contained in:
commit
209dbdfcc3
@ -497,6 +497,14 @@ func setResourcesV2(cgroupConfig *libcontainerconfigs.Cgroup) error {
|
||||
}
|
||||
cgroupConfig.Resources.SkipDevices = true
|
||||
|
||||
// if the hugetlb controller is missing
|
||||
supportedControllers := getSupportedUnifiedControllers()
|
||||
if !supportedControllers.Has("hugetlb") {
|
||||
cgroupConfig.Resources.HugetlbLimit = nil
|
||||
// the cgroup is not present, but its not required so skip it
|
||||
klog.V(6).Infof("Optional subsystem not supported: hugetlb")
|
||||
}
|
||||
|
||||
manager, err := cgroupfs2.NewManager(cgroupConfig, cgroupConfig.Path, false)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create cgroup v2 manager: %v", err)
|
||||
|
Loading…
Reference in New Issue
Block a user