Commit 2d6ee874 authored by yanxuean's avatar yanxuean

should check all error

parent 330cf37e
...@@ -86,9 +86,9 @@ func NewResourceCollector(interval time.Duration) *ResourceCollector { ...@@ -86,9 +86,9 @@ func NewResourceCollector(interval time.Duration) *ResourceCollector {
// then repeatedly runs collectStats. // then repeatedly runs collectStats.
func (r *ResourceCollector) Start() { func (r *ResourceCollector) Start() {
// Get the cgroup container names for kubelet and runtime // Get the cgroup container names for kubelet and runtime
kubeletContainer, err := getContainerNameForProcess(kubeletProcessName, "") kubeletContainer, err1 := getContainerNameForProcess(kubeletProcessName, "")
runtimeContainer, err := getContainerNameForProcess(framework.TestContext.ContainerRuntimeProcessName, framework.TestContext.ContainerRuntimePidFile) runtimeContainer, err2 := getContainerNameForProcess(framework.TestContext.ContainerRuntimeProcessName, framework.TestContext.ContainerRuntimePidFile)
if err == nil { if err1 == nil && err2 == nil {
systemContainers = map[string]string{ systemContainers = map[string]string{
stats.SystemContainerKubelet: kubeletContainer, stats.SystemContainerKubelet: kubeletContainer,
stats.SystemContainerRuntime: runtimeContainer, stats.SystemContainerRuntime: runtimeContainer,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment