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

probes emit log noise when containers stop #1683

Closed
rade opened this issue Jul 14, 2016 · 2 comments
Closed

probes emit log noise when containers stop #1683

rade opened this issue Jul 14, 2016 · 2 comments
Assignees
Labels
chore Related to fix/refinement/improvement of end user or new/existing developer functionality dogfood Important for the developer's own use of the project
Milestone

Comments

@rade
Copy link
Member

rade commented Jul 14, 2016

I have no containers running except scope 0.16.1, and every few seconds the weavescope container log shows a triplet of events like this

<probe> INFO: 2016/07/14 18:41:54.975843 docker container: collecting stats for e678d8136f448933f6d04317e6fbab3d5f8fe5743804d833947e28ced162183c
<probe> ERRO: 2016/07/14 18:41:55.059077 docker container: error reading event, did container stop? read unix @->/var/run/docker.sock: use of closed network connection
<probe> INFO: 2016/07/14 18:41:55.059097 docker container: stopped collecting stats for e678d8136f448933f6d04317e6fbab3d5f8fe5743804d833947e28ced162183c

...

<probe> INFO: 2016/07/14 18:42:05.212411 docker container: collecting stats for 0aaf7f771a15411c0d3ca9104624347fc6222a106908de1f1c3a85a25b633c33
<probe> ERRO: 2016/07/14 18:42:05.298484 docker container: error reading event, did container stop? read unix @->/var/run/docker.sock: use of closed network connection
<probe> INFO: 2016/07/14 18:42:05.298508 docker container: stopped collecting stats for 0aaf7f771a15411c0d3ca9104624347fc6222a106908de1f1c3a85a25b633c33

The events do also get triggered when I start and then stop a container. So I am guessing that perhaps scope itself is starting and stopping a container every few seconds. In any case though, starting and stopping of containers is not something we should record in the logs at INFO let alone ERRO level.

@rade rade added dogfood Important for the developer's own use of the project chore Related to fix/refinement/improvement of end user or new/existing developer functionality labels Jul 14, 2016
@rade rade changed the title probe log noise probe log noise when containers stop Jul 14, 2016
@rade rade changed the title probe log noise when containers stop probes emit log noise when containers stop Jul 14, 2016
@rade
Copy link
Member Author

rade commented Jul 14, 2016

Switching the INFOs to DEBUG is easy, but I am little uncomfortable with swallowing all errors coming back from decoder.Decode(). The loop that is in is bailing on io.EOF. Evidently it's not getting that but a *net.OpError containing errClosing. I would like to treat that specific error the same as io.EOF, but because of the well-known problem of errClosing being private, the only way to do that is checking for the error string. urgh.

@peterbourgon any better idea?

@peterbourgon
Copy link
Contributor

Strong +1 to moving the collecting stats for and stopped collecting stats for logging to DEBUG, or removing it entirely. Beyond that, you correctly summarize the situation. You could check !err.(*net.OpError).Temporary() but it might be too coarse-grained. I don't see an alternative to checking the string; as it is a log optimization rather than a correctness thing, I don't see a huge problem with it.

@rade rade added this to the July2016 milestone Jul 16, 2016
@rade rade self-assigned this Jul 16, 2016
rade added a commit that referenced this issue Jul 18, 2016
eliminate stats log noise from stopped containers

Fixes #1683.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Related to fix/refinement/improvement of end user or new/existing developer functionality dogfood Important for the developer's own use of the project
Projects
None yet
Development

No branches or pull requests

2 participants