mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
kunsupported cgroup setup causes kubelet to emit a warning rather than exiting
This commit is contained in:
parent
c898ab2043
commit
883f33df6c
@ -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