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 issue in docker stats with NetworkDisabled=true #25905

Merged

Conversation

yongtang
Copy link
Member

- What I did

This fix tries to address the issue in #25000 where docker stats will not show network stats with NetworkDisabled=true.

The NetworkDisabled=true could be either invoked through remote API, or through docker daemon -b none.

The issue was that when NetworkDisabled=true either by API or by daemon config, there is no SandboxKey for container so an error will be returned.

- How I did it

This fix fixes this issue by skipping obtaining SandboxKey if NetworkDisabled=true.

- How to verify it

Additional test has bee added to cover the changes.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

This fix fixes #25000.

Signed-off-by: Yong Tang yong.tang.github@outlook.com

@cpuguy83
Copy link
Member

LGTM

1 similar comment
@tonistiigi
Copy link
Member

LGTM

@yongtang
Copy link
Member Author

Thanks @cpuguy83 @tonistiigi for the review. The failing test on Windows is because Windows does not support stats (as is seen on other tests of the same docker_api_containers_test.go file). The pull request has been updated with DaemonIsLinux.

@mlaventure mlaventure added the status/failing-ci Indicates that the PR in its current state fails the test suite label Aug 23, 2016
@mlaventure
Copy link
Contributor

The win2lin test is a Linux daemon with a windows client, not sure why this new test didn't work though.

@yongtang yongtang force-pushed the 25000-docker-stats-NetworkDisabled branch from e3457b4 to 3dc9b11 Compare August 23, 2016 21:14
This fix tries to address the issue in 25000 where `docker stats`
will not show network stats with `NetworkDisabled=true`.

The `NetworkDisabled=true` could be either invoked through
remote API, or through `docker daemon -b none`.

The issue was that when `NetworkDisabled=true` either by API or
by daemon config, there is no SandboxKey for container so an error
will be returned.

This fix fixes this issue by skipping obtaining SandboxKey if
`NetworkDisabled=true`.

Additional test has bee added to cover the changes.

This fix fixes 25000.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
@yongtang yongtang force-pushed the 25000-docker-stats-NetworkDisabled branch from 3dc9b11 to 7bb9c53 Compare August 23, 2016 23:05
@yongtang
Copy link
Member Author

Thanks @mlaventure. I removed "OpenStdin":true from the config and win2lin test is fine now.

@justincormack justincormack removed the status/failing-ci Indicates that the PR in its current state fails the test suite label Aug 24, 2016
@justincormack
Copy link
Contributor

LGTM

@justincormack justincormack merged commit fe125ad into moby:master Aug 24, 2016
@yongtang yongtang deleted the 25000-docker-stats-NetworkDisabled branch August 24, 2016 16:41
runcom pushed a commit to projectatomic/docker that referenced this pull request Sep 9, 2016
Upstream reference: moby#25905

This fix tries to address the issue in 25000 where `docker stats`
will not show network stats with `NetworkDisabled=true`.

The `NetworkDisabled=true` could be either invoked through
remote API, or through `docker daemon -b none`.

The issue was that when `NetworkDisabled=true` either by API or
by daemon config, there is no SandboxKey for container so an error
will be returned.

This fix fixes this issue by skipping obtaining SandboxKey if
`NetworkDisabled=true`.

Additional test has bee added to cover the changes.

This fix fixes 25000.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
TomasTomecek added a commit to TomasTomecek/docker that referenced this pull request Sep 9, 2016
resolves rhbz#1374265

backport of upstream PR: moby#25905
runcom pushed a commit to projectatomic/docker that referenced this pull request Sep 9, 2016
resolves rhbz#1374265

backport of upstream PR: moby#25905
@thaJeztah thaJeztah added this to the 1.13.0 milestone Sep 12, 2016
runcom pushed a commit to projectatomic/docker that referenced this pull request Oct 5, 2016
Upstream reference: moby#25905

This fix tries to address the issue in 25000 where `docker stats`
will not show network stats with `NetworkDisabled=true`.

The `NetworkDisabled=true` could be either invoked through
remote API, or through `docker daemon -b none`.

The issue was that when `NetworkDisabled=true` either by API or
by daemon config, there is no SandboxKey for container so an error
will be returned.

This fix fixes this issue by skipping obtaining SandboxKey if
`NetworkDisabled=true`.

Additional test has bee added to cover the changes.

This fix fixes 25000.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
runcom pushed a commit to projectatomic/docker that referenced this pull request Oct 12, 2016
Upstream reference: moby#25905

This fix tries to address the issue in 25000 where `docker stats`
will not show network stats with `NetworkDisabled=true`.

The `NetworkDisabled=true` could be either invoked through
remote API, or through `docker daemon -b none`.

The issue was that when `NetworkDisabled=true` either by API or
by daemon config, there is no SandboxKey for container so an error
will be returned.

This fix fixes this issue by skipping obtaining SandboxKey if
`NetworkDisabled=true`.

Additional test has bee added to cover the changes.

This fix fixes 25000.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
runcom pushed a commit to projectatomic/docker that referenced this pull request Oct 27, 2016
Upstream reference: moby#25905

This fix tries to address the issue in 25000 where `docker stats`
will not show network stats with `NetworkDisabled=true`.

The `NetworkDisabled=true` could be either invoked through
remote API, or through `docker daemon -b none`.

The issue was that when `NetworkDisabled=true` either by API or
by daemon config, there is no SandboxKey for container so an error
will be returned.

This fix fixes this issue by skipping obtaining SandboxKey if
`NetworkDisabled=true`.

Additional test has bee added to cover the changes.

This fix fixes 25000.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
runcom pushed a commit to projectatomic/docker that referenced this pull request Dec 13, 2016
Upstream reference: moby#25905

This fix tries to address the issue in 25000 where `docker stats`
will not show network stats with `NetworkDisabled=true`.

The `NetworkDisabled=true` could be either invoked through
remote API, or through `docker daemon -b none`.

The issue was that when `NetworkDisabled=true` either by API or
by daemon config, there is no SandboxKey for container so an error
will be returned.

This fix fixes this issue by skipping obtaining SandboxKey if
`NetworkDisabled=true`.

Additional test has bee added to cover the changes.

This fix fixes 25000.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
runcom pushed a commit to projectatomic/docker that referenced this pull request Dec 16, 2016
Upstream reference: moby#25905

This fix tries to address the issue in 25000 where `docker stats`
will not show network stats with `NetworkDisabled=true`.

The `NetworkDisabled=true` could be either invoked through
remote API, or through `docker daemon -b none`.

The issue was that when `NetworkDisabled=true` either by API or
by daemon config, there is no SandboxKey for container so an error
will be returned.

This fix fixes this issue by skipping obtaining SandboxKey if
`NetworkDisabled=true`.

Additional test has bee added to cover the changes.

This fix fixes 25000.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
runcom pushed a commit to projectatomic/docker that referenced this pull request Jan 11, 2017
Upstream reference: moby#25905

This fix tries to address the issue in 25000 where `docker stats`
will not show network stats with `NetworkDisabled=true`.

The `NetworkDisabled=true` could be either invoked through
remote API, or through `docker daemon -b none`.

The issue was that when `NetworkDisabled=true` either by API or
by daemon config, there is no SandboxKey for container so an error
will be returned.

This fix fixes this issue by skipping obtaining SandboxKey if
`NetworkDisabled=true`.

Additional test has bee added to cover the changes.

This fix fixes 25000.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[1.12rc4] docker stats do not show info with NetworkDisabled=true
8 participants