mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
should check all error
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
This commit is contained in:
parent
330cf37e0a
commit
2d6ee874a5
@ -86,9 +86,9 @@ func NewResourceCollector(interval time.Duration) *ResourceCollector {
|
||||
// then repeatedly runs collectStats.
|
||||
func (r *ResourceCollector) Start() {
|
||||
// Get the cgroup container names for kubelet and runtime
|
||||
kubeletContainer, err := getContainerNameForProcess(kubeletProcessName, "")
|
||||
runtimeContainer, err := getContainerNameForProcess(framework.TestContext.ContainerRuntimeProcessName, framework.TestContext.ContainerRuntimePidFile)
|
||||
if err == nil {
|
||||
kubeletContainer, err1 := getContainerNameForProcess(kubeletProcessName, "")
|
||||
runtimeContainer, err2 := getContainerNameForProcess(framework.TestContext.ContainerRuntimeProcessName, framework.TestContext.ContainerRuntimePidFile)
|
||||
if err1 == nil && err2 == nil {
|
||||
systemContainers = map[string]string{
|
||||
stats.SystemContainerKubelet: kubeletContainer,
|
||||
stats.SystemContainerRuntime: runtimeContainer,
|
||||
|
Loading…
Reference in New Issue
Block a user