-
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
DNS using container name fails for containers on user-defined rootless cni network with a pod #8194
Comments
Working DNS using container names - containers on user-defined rootless cni network NOT in a pod
|
Dupe of #8040 |
No this is not a duplicate. The problem is that we always use the podname for the dns entry if the container is in a pod. In this case we do not join the pod network namespace and thus should use the container name for the dns entry. |
This happens with both rootful and rootless cni. I can fix this. |
Good catch - thanks!
…On Fri, Oct 30, 2020, 09:43 Luap99 ***@***.***> wrote:
This happens with both rootful and rootless cni. I can fix this.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#8194 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCG4O7ACNBHLEUWZL53SNK7H3ANCNFSM4TEQI5HA>
.
|
I know the documentation says rootless containers within pods need to access each other's services from localhost:port within the pod, or publish their services to a host port and access each other's services via containerhost:published_port. However, if pod containers don't need to share "net" namespace (as is already the case when containers within a pod belong to a user-defined CNI network), and each container within a pod can have its own hostname assignment (not the pod name as it is now) courtesy of current bug fix, then shouldn't the example in the second block (below) be possible if container-name-based DNS resolution is made to work within a pod? For example:
Containers within pod created with default set of "--share ipc,net,pid,uts"
The above behavior makes sense. According to podman documentation, by default containers within a pod share the name network namespace and must access each other's services via localhost. Containers within pod NOT SHARING "net"
These containers behave exactly the same way regarding container-name-based DNS lookup and hostname assignment as containers in user-defined rootless cni networks. If the current bug fix addresses hostname assignment to containers within a pod that belong to a user-defined cni network, and if those containers do not share "net" namespace, then perhaps the current bug fix can also makes the second block, above, work properly (since the above containers also do not share "net" namespace). If such containers within a pod can successfully reach each other via container name, then the section of the documentation explaining how containers within a rootless pod reach each other's services also needs revision. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
DNS using container name fails for rootless containers on user-defined rootless cni network WITHIN a pod. The same succeeds for similar rootless containers NOT WITHIN a pod.
Steps to reproduce the issue:
Describe the results you received:
DNS lookup based on container name fails within pod
Describe the results you expected:
DNS lookup works for containers within a pod the way it works for containers not within pod
Additional information you deem important (e.g. issue happens only occasionally):
happens consistently and reproducably
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Container host is a VirtualBox VM running on Fedora 32
podman packages installed from OpenSuse repo
$> cat "/etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
$> cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
The text was updated successfully, but these errors were encountered: