Bug 1092781
Summary: | NetworkSettings are not written out in container config on exit | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | J.C. Molet <jmolet> |
Component: | docker | Assignee: | Daniel Walsh <dwalsh> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.1 | CC: | bsarathy, cevich, dwalsh, lsm5 |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2014-09-18 20:45:18 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 1109938, 1138364 |
Description
J.C. Molet
2014-04-30 01:47:32 UTC
# docker inspect fbd36a9d7071 | json_reformat | grep "NetworkSettings" -A8 "NetworkSettings": { "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "Gateway": "172.17.42.1", "Bridge": "docker0", "PortMapping": null, "Ports": { } -bash-4.3# cat /var/lib/docker/containers/fbd36a9d707171bd20e0b0630c156f08e9b1ef4947fe0adef1d33e9f494ace68/config.json | json_reformat | grep "NetworkSettings" -A 8 "NetworkSettings": { "IPAddress": "172.17.0.2", "IPPrefixLen": 16, "Gateway": "172.17.42.1", "Bridge": "docker0", "PortMapping": null, "Ports": { } rpm -q docker-io docker-io-0.11.1-3.fc21.x86_64 Seems to be fixed in -0.11.1-3 Clarification: This bug is about inspect output on running vs. exited containers. Essentially, the stopped container doesn't show the networking settings that were used when it was running. This may be expected behavior, we just wanted to make sure it was documented if so. Otherwise, it's definitely still broken: [root@docker docker]# rpm -q docker docker-0.11.1-5.el7.x86_64 [root@docker docker]# /usr/bin/docker -D run --name=4vMlGgNqFzyB image_blah_blah /bin/bash -c '/bin/true' [debug] hijack.go:96 [hijack] End of stdout [debug] commands.go:1958 End of CmdRun(), Waiting for hijack to finish. [root@docker docker]# docker inspect 4vMlGgNqFzyB | grep "NetworkSettings" -A8 "NetworkSettings": { "IPAddress": "", "IPPrefixLen": 0, "Gateway": "", "Bridge": "", "PortMapping": null, "Ports": null }, "ResolvConfPath": "/etc/resolv.conf", [root@docker docker]# /usr/bin/docker -D run --name running image_blah_blah /bin/bash -c 'sleep 1h' ... [root@docker docker]# docker inspect running | grep "NetworkSettings" -A8 "NetworkSettings": { "IPAddress": "172.17.0.11", "IPPrefixLen": 16, "Gateway": "172.17.42.1", "Bridge": "docker0", "PortMapping": null, "Ports": {} }, "ResolvConfPath": "/etc/resolv.conf", Confirmed fixed in docker-1.0.0-10.el7.x86_64 Client version: 1.0.0 Client API version: 1.12 Go version (client): go1.2.2 Git commit (client): 20fdb42/1.0.0 Server version: 1.0.0 Server API version: 1.12 Go version (server): go1.2.2 Git commit (server): 20fdb42/1.0.0 docker inspect of running container shows current values, as does /var/lib/docker/<cid>/config.json docker inspect of stopped container shows current empty/null values as does /var/lib/docker/<cid>/config.json Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-1266.html |