-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
rootless: no DNS for containers within created network + host not using resolved stub resolver #11222
Labels
In Progress
This issue is actively being worked by the assignee, please do not work on this at this time.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
Comments
Where is |
> ls -la /etc/resolv.conf
lrwxrwxrwx. 1 root root 39 Jul 29 12:38 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
> cat /etc/resolv.conf
# This is /run/systemd/resolve/resolv.conf managed by man:systemd-resolved(8).
# Do not edit.
#
# This file might be symlinked as /etc/resolv.conf. If you're looking at
# /etc/resolv.conf and seeing this text, you have followed the symlink.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs should typically not access this file directly, but only
# through the symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a
# different way, replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 10.0.0.2
search ec2.internal Rootless container: > podman run --rm -it --network=testnetwork registry.fedoraproject.org/fedora:34 bash
> ls -la /etc/resolv.conf
-rw-r--r--. 1 root root 39 Aug 12 23:50 /etc/resolv.conf
[root@7030a4fe145f /]# cat /etc/resolv.conf
search dns.podman
nameserver 10.88.3.1 |
Thank you, I will work on this today. |
PR #11230 |
Luap99
added a commit
to Luap99/libpod
that referenced
this issue
Aug 16, 2021
When a host uses systemd-resolved but not the resolved stub resolver the following symlinks are created: `/etc/resolv.conf` -> `/run/systemd/resolve/stub-resolv.conf` -> `/run/systemd/resolve/resolv.conf`. Because the code uses filepath.EvalSymlinks we put the new resolv.conf to `/run/systemd/resolve/resolv.conf` but the `/run/systemd/resolve/stub-resolv.conf` link does not exists in the mount ns. To fix this we will walk the symlinks manually until we reach the first one under `/run` and use this for the resolv.conf file destination. This fixes a regression which was introduced in e73d482. Fixes containers#11222 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Luap99
added a commit
to Luap99/libpod
that referenced
this issue
Aug 19, 2021
When a host uses systemd-resolved but not the resolved stub resolver the following symlinks are created: `/etc/resolv.conf` -> `/run/systemd/resolve/stub-resolv.conf` -> `/run/systemd/resolve/resolv.conf`. Because the code uses filepath.EvalSymlinks we put the new resolv.conf to `/run/systemd/resolve/resolv.conf` but the `/run/systemd/resolve/stub-resolv.conf` link does not exists in the mount ns. To fix this we will walk the symlinks manually until we reach the first one under `/run` and use this for the resolv.conf file destination. This fixes a regression which was introduced in e73d482. Fixes containers#11222 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
In Progress
This issue is actively being worked by the assignee, please do not work on this at this time.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
On Fedora CoreOS we're currently not using the DNS stub resolver in
systemd-resolved
. There was a change in thepodman 3:3.2.2-1.fc34 -> 3:3.2.3-1.fc34
transition that broke DNS for containers within a created network for this case.Reproducer (on FCOS):
To get an FCOS machine to test you can use
podman machine
(see article)There is a lot more context on this bug over in coreos/fedora-coreos-tracker#923
The text was updated successfully, but these errors were encountered: