mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +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,
|
statsapi.SystemContainerMisc: nodeConfig.SystemCgroupsName,
|
||||||
}
|
}
|
||||||
for sys, name := range systemContainers {
|
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)
|
s, _, err := sp.provider.GetCgroupStats(name)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Failed to get system container stats for %q: %v", name, err)
|
glog.Errorf("Failed to get system container stats for %q: %v", name, err)
|
||||||
|
Loading…
Reference in New Issue
Block a user