Skip to content

thread checker, case where docker container has already stopped - #717

Merged
tpetr merged 3 commits into
masterfrom
docker_threads
Oct 8, 2015
Merged

thread checker, case where docker container has already stopped#717
tpetr merged 3 commits into
masterfrom
docker_threads

Conversation

@ssalinas

@ssalinas ssalinas commented Oct 5, 2015

Copy link
Copy Markdown
Contributor

@tpetr found our docker threads issue. In the case where we inspect the container, but it has already stopped, the pid returns as 0. This is due to the docker daemon's response to inspect, not the client's processing. The wrapper checks every few seconds for the container to be running, so a badly timed thread check will throw up the error we saw with /proc/0/cgroup

So, I've added a check that if the pid is 0, we check that it is running. If it isn't running, we return 0. No need for throwing sentry errors when we are about to shut down anyways and nothing is really wrong

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd suggest "Container %s has pid %s (running: %s). Defaulting to 0 threads running."

@ssalinas

ssalinas commented Oct 5, 2015

Copy link
Copy Markdown
Contributor Author

@tpetr updated the message

@tpetr tpetr added the hs_qa label Oct 5, 2015
@tpetr tpetr added this to the 0.4.6 milestone Oct 7, 2015
tpetr pushed a commit that referenced this pull request Oct 8, 2015
thread checker, case where docker container has already stopped
@tpetr
tpetr merged commit 280ef1b into master Oct 8, 2015
@tpetr tpetr removed hs_qa labels Oct 8, 2015
@tpetr
tpetr deleted the docker_threads branch October 8, 2015 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants