Merge pull request #24205 from yujuhong/fix_stats

e2e: fix error checking in kubelet stats
This commit is contained in:
Daniel Smith 2016-04-13 09:59:03 -07:00
commit 97acf8ca69

View File

@ -501,11 +501,11 @@ func (r *resourceCollector) Stop() {
// the resource usage, and pushes it to the buffer.
func (r *resourceCollector) collectStats(oldStatsMap map[string]*stats.ContainerStats) {
summary, err := getNodeStatsSummary(r.client, r.node)
cStatsMap := getSystemContainerStats(summary)
if err != nil {
Logf("Error getting node stats summary on %q, err: %v", r.node, err)
return
}
cStatsMap := getSystemContainerStats(summary)
r.lock.Lock()
defer r.lock.Unlock()
for _, name := range r.containers {