Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug in resource gatherer and add logging to help debug if it doesn't help #21370

Merged
merged 1 commit into from
Feb 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions test/e2e/resource_usage_gatherer.go
Expand Up @@ -87,10 +87,12 @@ func (g *containerResourceGatherer) startGatheringData(c *client.Client, period
now := time.Now()
data, err := g.getKubeSystemContainersResourceUsage(c)
if err != nil {
return err
Logf("Error while getting resource usage: %v", err)
continue
}
g.usageTimeseries[now] = data
case <-g.stopCh:
Logf("Stop channel is closed. Stopping gatherer.")
g.wg.Done()
return nil
}
Expand All @@ -100,8 +102,9 @@ func (g *containerResourceGatherer) startGatheringData(c *client.Client, period

func (g *containerResourceGatherer) stopAndSummarize(percentiles []int, constraints map[string]resourceConstraint) *ResourceUsageSummary {
close(g.stopCh)
g.timer.Stop()
Logf("Closed stop channel.")
g.wg.Wait()
Logf("Waitgroup finished.")
if len(percentiles) == 0 {
Logf("Warning! Empty percentile list for stopAndPrintData.")
return &ResourceUsageSummary{}
Expand Down