-
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
[Regression in 3.2.0] CNI-in-slirp4netns DNS gets broken when running a rootful container after running a rootless container #10929
Comments
Before running a rootful container: $ cat /proc/$(pgrep -u $(id -u) dnsmasq)/root/etc/resolv.conf
nameserver 10.0.2.3
nameserver 8.8.8.8
nameserver 8.8.4.4
options edns0 trust-ad After running a rootful container: $ cat /proc/$(pgrep -u $(id -u) dnsmasq)/root/etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "resolvectl status" to see details about the uplink DNS servers
# currently in use.
#
# 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 127.0.0.53
options edns0 trust-ad
search . The bind-mount for Rootless Podman v3.1.2 and Rootless Docker can work as expected because they don't bind-mount |
I cannot reproduce. I think your example is incorrect because /etc/resolv.conf is a symlink. Not sure why it would work before the root container.
You can join the correct namespace with |
$ ls -l /proc/$(pgrep -u $(id -u) dnsmasq)/root/etc/resolv.conf
lrwxrwxrwx 1 root root 39 May 5 2019 /proc/5358/root/etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf The link points to Before running a rootful container,
This seems to create a new mount namespace, so I don't think this command can be used for testing. |
Does this reproduce (or any command that results in removal and recreation of $ sudo mv /run/systemd/resolve/stub-resolv.conf /tmp/
$ sudo mv /tmp/stub-resolv.conf /run/systemd/resolve/ |
Yes this works.
You are right, OK, I understand the problem but how can podman fix this? |
PR: #10936 |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
CNI-in-slirp4netns DNS gets broken when running a rootful container after running a rootless container
Regression in v3.2.0.
Steps to reproduce the issue:
Terminal 1: Run a rootless container with CNI-in-slirp4netns
Terminal 2: Run some rootful container
$ sudo podman run --rm hello-world
Terminal 1: DNS gets broken in the rootless container
Describe the results you received:
wget: bad address 'example.com'
Describe the results you expected:
Should work
Additional information you deem important (e.g. issue happens only occasionally):
v3.1.2 works as expected. v3.2.0 and
main
(9d98f56 ) is broken.Non-CNI rootless container works as expected
Output of
podman version
:Output of
podman info --debug
:Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes
The text was updated successfully, but these errors were encountered: