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
Infra containers receive IP addresses implicitly from unused network #4908
Comments
@mheon PTAL |
Eeek. Do you still have the stock |
I don't. By default there are only two files:
|
This does not sound like a bug, then. Pods presently do not support being attached to user-specified networks, and if this was supported, it would have to be done at pod creation time; attaching containers that specify custom networks should not be allowed. Your pods have joined the default network, and are receiving IP addresses from it; this sounds correct. There are separate issues for the ability to have pods join a non-default CNI network. |
What is the purpose of attaching a pod to a network from podman's perspective? Sorry, I may not get everything right as I am kinda new to the concept of pods. |
Containers in a pod all share the same network namespace - they use the same network stack and IP. Containers may allow you to specify things like CNI network if they are doing this, but that is a bug - it will be ignored, and the container will join the pod network, which is already configured. |
Thanks for the clarification. Then it sound more reasonable to define network on pod level than on container level like the way it works now. |
/kind bug
Description
The package cni I use installs a bridge network by default into location
/etc/cni/net.d/87-podman-bridge.conflist
.Although I do not use the network called
podman
it provides explicitly, IP addresses are assigned from that network to infra containers when I attach containers to other user defined networks.I found this issue during #4907 All details which should relevant here can be found in the referenced issue.
I am not sure whether is this a problem with podman or cni.
Steps to reproduce the issue:
Create pods and attach containers to user defined networks.
Check the persistent storage of assigned IP addresses of this network in /var/lib/cni/networks/podman/
Describe the results you received:
Again this output was made from the same running environment I provided in #4907
Describe the results you expected:
I do not expect IPs to be released from a network pool I do not explicitly use.
In case the infra images do need an IP then why don't they got it from the same network a container in that pod was attached to?
Or in case there are multiple networks, how can I specify which network it must connect 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: