Bug 1251538
Summary: | [RFE] Allow docker to report the veth interface used by a container | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Jake Hunsaker <jhunsaker> |
Component: | docker | Assignee: | Antonio Murdaca <amurdaca> |
Status: | CLOSED WONTFIX | QA Contact: | atomic-bugs <atomic-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.1 | CC: | amurdaca, dwalsh, jamills, lans.carstensen, lsm5, smahajan |
Target Milestone: | rc | Keywords: | Extras, FutureFeature |
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Enhancement | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2016-06-03 19:02:34 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: |
Description
Jake Hunsaker
2015-08-07 15:39:58 UTC
Issue opened upstream. https://github.com/docker/docker/issues/17064 Shishir https://github.com/docker/docker/pull/16729 is also related. Shishir what do you think of https://github.com/docker/docker/pull/16729#issuecomment-145259919 Pretty sure a PR based on https://github.com/docker/docker/pull/16729#issuecomment-145259919 would be good to re-start the discussion (it doesn't seem a big patch) Asked upstream to include the veth name here https://github.com/docker/docker/pull/18559#issuecomment-164139816 Since this is merged can we close this as fixed in docker-1.10? It didn't end up in that PR upstream. I'll work out a patch tomorrow and send it upstream. no plan in docker upstream to expose veths (veth's names generation now lives in libcontainer also). Work should start in libnetwork first. libnetwork maintainers wish to have a generalized way to expose additional data for network drivers (no sense to expose veth names if using OVS driver was their argument) After that it will be exposed in docker inspect Jake, one possible way of getting the veth used by a container is (this is fine when using the bridge network driver, which is the default and I'm assuming you need this): $ sudo docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 08b1a5b42aa9 nginx "nginx -g 'daemon off" 2 hours ago Up 2 hours 443/tcp, 0.0.0.0:8090->80/tcp elated_euler $ sudo docker inspect --format='{{.NetworkSettings.SandboxKey}}' 08b1a5b42aa9 /var/run/docker/netns/aea8f5968946 $ sudo nsenter --net=/var/run/docker/netns/aea8f5968946 ethtool -S eth0 NIC statistics: peer_ifindex: 308 $ sudo ip link | grep 308: 308: vetha0c705b: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP mode DEFAULT group default They're still not interested in exposing this in docker inspect because it breaks the abstraction built on network drivers. |