mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
The same err should not judge whether it is empty twice, and the err of "GetKubeletContainer" function should not affect the value of "RuntimeCgroups"
This commit is contained in:
parent
21184400a4
commit
fc0d38f02f
@ -620,9 +620,7 @@ func run(ctx context.Context, s *options.KubeletServer, kubeDeps *kubelet.Depend
|
||||
cgroupRoots = append(cgroupRoots, kubeletCgroup)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
klog.InfoS("Failed to get the container runtime's cgroup. Runtime system container metrics may be missing.", "err", err)
|
||||
} else if s.RuntimeCgroups != "" {
|
||||
if s.RuntimeCgroups != "" {
|
||||
// RuntimeCgroups is optional, so ignore if it isn't specified
|
||||
cgroupRoots = append(cgroupRoots, s.RuntimeCgroups)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user