Skip to content

Commit c8e4a8e

Browse files
authored
Merge pull request #3 from pleimer/cgroup-path-fix
Ignore non-existant cgroups
2 parents 6f573e5 + 9a7dcdb commit c8e4a8e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/virt/virt.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ func ContainersStats(cgroupControls ...cgroups.ControlType) (MetricMatrix, error
6161
return nil, err
6262
}
6363

64-
retMatrix[cLabel][control] = stat
64+
if err != cgroups.ErrDoesNotExist {
65+
retMatrix[cLabel][control] = stat
66+
}
6567
}
6668
}
6769
return retMatrix, nil

0 commit comments

Comments
 (0)