Skip to content

Commit

Permalink
Merge pull request #1798 from weaveworks/1683-start-stats-idempotent
Browse files Browse the repository at this point in the history
Make stats gathering idempotent
  • Loading branch information
Alfonso Acosta authored Aug 16, 2016
2 parents a4d5eb3 + 8b97f12 commit fc4bdf0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ New features and enhancements:
[#1768](https://github.com/weaveworks/scope/pull/1768)
- Eliminate stats log noise from stopped containers
[#1687](https://github.com/weaveworks/scope/pull/1687)
[#1798](https://github.com/weaveworks/scope/pull/1798)
- Hide uncontained/unmanaged by default
[#1694](https://github.com/weaveworks/scope/pull/1694)

Expand Down
2 changes: 1 addition & 1 deletion probe/docker/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (c *container) StartGatheringStats() error {
defer c.Unlock()

if c.statsConn != nil {
return fmt.Errorf("already gather stats for container %s", c.container.ID)
return nil
}

go func() {
Expand Down
2 changes: 1 addition & 1 deletion probe/docker/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ func (r *registry) updateContainerState(containerID string, intendedState *strin
if r.collectStats {
if dockerContainer.State.Running {
if err := c.StartGatheringStats(); err != nil {
log.Errorf("Error gather stats for container: %s", containerID)
log.Errorf("Error gathering stats for container %s: %s", containerID, err)
return
}
} else {
Expand Down

0 comments on commit fc4bdf0

Please sign in to comment.