mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #79245 from dashpole/fix_startup
Kubelet emits warning rather than exiting on invalid cgroup setup
This commit is contained in:
commit
f8d5ff2907
@ -625,17 +625,15 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.Dependencies, stopCh <-chan
|
||||
cgroupRoots = append(cgroupRoots, cm.NodeAllocatableRoot(s.CgroupRoot, s.CgroupDriver))
|
||||
kubeletCgroup, err := cm.GetKubeletContainer(s.KubeletCgroups)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get the kubelet's cgroup: %v", err)
|
||||
}
|
||||
if kubeletCgroup != "" {
|
||||
klog.Warningf("failed to get the kubelet's cgroup: %v. Kubelet system container metrics may be missing.", err)
|
||||
} else if kubeletCgroup != "" {
|
||||
cgroupRoots = append(cgroupRoots, kubeletCgroup)
|
||||
}
|
||||
|
||||
runtimeCgroup, err := cm.GetRuntimeContainer(s.ContainerRuntime, s.RuntimeCgroups)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to get the container runtime's cgroup: %v", err)
|
||||
}
|
||||
if runtimeCgroup != "" {
|
||||
klog.Warningf("failed to get the container runtime's cgroup: %v. Runtime system container metrics may be missing.", err)
|
||||
} else if runtimeCgroup != "" {
|
||||
// RuntimeCgroups is optional, so ignore if it isn't specified
|
||||
cgroupRoots = append(cgroupRoots, runtimeCgroup)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user