mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #32820 from coufon/change_collector_log
Automatic merge from submit-queue change the error log for empty resource usage This PR changes the error log for empty resource usage buffer for a container to be more clear. It happens when the container name is wrong, or cAdvisor somehow does not response.
This commit is contained in:
commit
d69cdce704
@ -192,7 +192,7 @@ func (r *ResourceCollector) GetLatest() (framework.ResourceUsagePerContainer, er
|
|||||||
for key, name := range systemContainers {
|
for key, name := range systemContainers {
|
||||||
contStats, ok := r.buffers[name]
|
contStats, ok := r.buffers[name]
|
||||||
if !ok || len(contStats) == 0 {
|
if !ok || len(contStats) == 0 {
|
||||||
return nil, fmt.Errorf("Resource usage of %s:%s is not ready yet", key, name)
|
return nil, fmt.Errorf("No resource usage data for %s container (%s)", key, name)
|
||||||
}
|
}
|
||||||
stats[key] = contStats[len(contStats)-1]
|
stats[key] = contStats[len(contStats)-1]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user