-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman inspect only shows NetworkSettings from the first network a container is attached to #4907
Comments
Any chance you would be interested in opening a PR to fix this issue? |
Need to check how Docker formats things when this happens - is it an array of the network settings struct, or just appending to the struct |
Looks like a map keyed by network name |
To be clear, this is a subset of the NetworkSettings struct - NetworkSettings itself is still present but no part of it save for Networks is populated. |
I don't know how much of this we can populate; a lot of this is inside CNI, and we can't easily get at it. We have one CNI Result struct for each network we attach to, which gives us interfaces, IP adresses, routes, and DNS. Matching that up with the name of the network that created the result could be difficult, and it doesn't give us things like aliases, IPAMConfig, etc. |
@mheon any further ideas? Have you talked to the CNI guys? |
Not yet. I'll ask. |
Update: ordering of results from CNI is same as order that networks were passed in. Will try to get to this tomorrow. |
Nice. |
Fixed by #5295 |
When inspecting containers, info on CNI networks added to the container by name (e.g. --net=name1) should be displayed separately from the configuration of the default network, in a separate map called Networks. This patch adds this separation, improving our Docker compatibility and also adding the ability to see if a container has more than one IPv4 and IPv6 address and more than one MAC address. Fixes containers#4907 Signed-off-by: Matthew Heon <[email protected]>
/kind bug
Description
I created multiple pods each having containers. The containers may be attached to more than one networks created by
podman network create
in advance.Manually checking the network interfaces within the containers looks legit, however
podman inspect <container>
shows only the settings of the first network the container was attached to.Steps to reproduce the issue:
Describe the results you received:
Check the network interfaces and IP addresses in containers. Container 'proxy' looks fine.
Show NetworkSettings without filtering and omit the rest.
However the container 'kibana' is attached to two networks (net_elk, net_proxy). But 'podman inspect' shows only the IP address from the first network the container was attached to (net_elk).
Describe the results you expected:
I expected that podman inspect will show an array of network settings of networks the container has been attached to.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
Test VM of OpenSUSE 15.1 x86_64 in KVM. The podman and cni packages are from devel:cubic repository.
The text was updated successfully, but these errors were encountered: