Return an empty stats if the container is restarting#28026
Merged
vdemeester merged 1 commit intomoby:masterfrom Nov 20, 2016
boaz0:fix_27772
Merged
Return an empty stats if the container is restarting#28026vdemeester merged 1 commit intomoby:masterfrom boaz0:fix_27772
vdemeester merged 1 commit intomoby:masterfrom
boaz0:fix_27772
Conversation
In case, a container is restarting indefinitely running "docker stats --no-stream <restarting_container>" is suspended. To fix this, the daemon makes sure the container is either not running or restarting if `--no-stream` is set to true and if so returns an empty stats. Should fix #27772. Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>
Contributor
|
ping @crosbymichael |
Contributor
|
LGTM |
Merged
liusdu
pushed a commit
to liusdu/moby
that referenced
this pull request
Oct 30, 2017
In case, a container is restarting indefinitely running "docker stats --no-stream <restarting_container>" is suspended. To fix this, the daemon makes sure the container is either not running or restarting if `--no-stream` is set to true and if so returns an empty stats. Should fix moby#27772. fix DTS2017062812251 backport from moby#28026 without conflicts. Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com> Signed-off-by: Yuanhong Peng <pengyuanhong@huawei.com>
liusdu
pushed a commit
to liusdu/moby
that referenced
this pull request
Oct 30, 2017
…wei-1.11.2' Return an empty stats if the container is restarting In case, a container is restarting indefinitely running "docker stats --no-stream <restarting_container>" is suspended. To fix this, the daemon makes sure the container is either not running or restarting if `--no-stream` is set to true and if so returns an empty stats. Should fix moby#27772. fix DTS2017062812251 backport from moby#28026 without conflicts. Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com> Signed-off-by: Yuanhong Peng <pengyuanhong@huawei.com> See merge request docker/docker!612
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
Send an empty stats if a container is restarting to avoid suspended docker-stats.
Closes #27772
- How I did it
In case
streamis0and the given container is restarting the daemon returns an empty stats.- How to verify it
$ docker run --restart always ubuntu true $ docker stats --no-stream CONTAINER CPU % MEM USAGE / LIMIT MEM % NET I/O BLOCK I/O PIDS 61d2e2e3fbb3 0.00% 0 B / 0 B 0.00% 0 B / 0 B 0 B / 0 B 0