mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #88970 from mysunshine92/correct-NodeAllocatableRoot
fix function NodeAllocatableRoot
This commit is contained in:
commit
105c0c6951
@ -608,8 +608,8 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, featureGate f
|
||||
}
|
||||
|
||||
var cgroupRoots []string
|
||||
|
||||
cgroupRoots = append(cgroupRoots, cm.NodeAllocatableRoot(s.CgroupRoot, s.CgroupDriver))
|
||||
nodeAllocatableRoot := cm.NodeAllocatableRoot(s.CgroupRoot, s.CgroupsPerQOS, s.CgroupDriver)
|
||||
cgroupRoots = append(cgroupRoots, nodeAllocatableRoot)
|
||||
kubeletCgroup, err := cm.GetKubeletContainer(s.KubeletCgroups)
|
||||
if err != nil {
|
||||
klog.Warningf("failed to get the kubelet's cgroup: %v. Kubelet system container metrics may be missing.", err)
|
||||
|
@ -276,9 +276,11 @@ func GetPodCgroupNameSuffix(podUID types.UID) string {
|
||||
}
|
||||
|
||||
// NodeAllocatableRoot returns the literal cgroup path for the node allocatable cgroup
|
||||
func NodeAllocatableRoot(cgroupRoot, cgroupDriver string) string {
|
||||
root := ParseCgroupfsToCgroupName(cgroupRoot)
|
||||
nodeAllocatableRoot := NewCgroupName(root, defaultNodeAllocatableCgroupName)
|
||||
func NodeAllocatableRoot(cgroupRoot string, cgroupsPerQOS bool, cgroupDriver string) string {
|
||||
nodeAllocatableRoot := ParseCgroupfsToCgroupName(cgroupRoot)
|
||||
if cgroupsPerQOS {
|
||||
nodeAllocatableRoot = NewCgroupName(nodeAllocatableRoot, defaultNodeAllocatableCgroupName)
|
||||
}
|
||||
if libcontainerCgroupManagerType(cgroupDriver) == libcontainerSystemd {
|
||||
return nodeAllocatableRoot.ToSystemd()
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ func GetPodCgroupNameSuffix(podUID types.UID) string {
|
||||
}
|
||||
|
||||
// NodeAllocatableRoot returns the literal cgroup path for the node allocatable cgroup
|
||||
func NodeAllocatableRoot(cgroupRoot, cgroupDriver string) string {
|
||||
func NodeAllocatableRoot(cgroupRoot string, cgroupsPerQOS bool, cgroupDriver string) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user