mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Skip system container cgroup stats if undefined
This commit is contained in:
parent
36910232ab
commit
ef9b398f4c
@ -83,6 +83,10 @@ func (sp *summaryProviderImpl) Get() (*statsapi.Summary, error) {
|
||||
statsapi.SystemContainerMisc: nodeConfig.SystemCgroupsName,
|
||||
}
|
||||
for sys, name := range systemContainers {
|
||||
// skip if cgroup name is undefined (not all system containers are required)
|
||||
if name == "" {
|
||||
continue
|
||||
}
|
||||
s, _, err := sp.provider.GetCgroupStats(name)
|
||||
if err != nil {
|
||||
glog.Errorf("Failed to get system container stats for %q: %v", name, err)
|
||||
|
Loading…
Reference in New Issue
Block a user