-
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
Adding dnsname plugin breaks starting rootless containers with podman socket and docker-compose #10855
Comments
I'll build the plugin with containers/dnsname#60 and see what's happening. EDIT: unfortunately the error message is uninformative
|
Ok, it looks like some kind of dnsmasq bug.
If I replace it with an actual file:
the container starts. I'll try to see if this bug has been filed somewhere. |
@lbeltrame Thanks for the report. This is definitely a bug in podman. To make rootless cni possible we mount in a new empty /run in rootless cni namespace to make it writeable for the cni plugins. |
Thanks for the explanation. Do you think it warrants a line in the troubleshooting docs until this is eventually taken care of? I can prepare a PR if need be. |
@lbeltrame Sure you can open a PR to document this. I will try to fix this next week. |
PR #10865 should fix this. Could test it it works for you? You can download a static compiled binary from here https://api.cirrus-ci.com/v1/artifact/task/4684786385027072/binary/bin/podman. |
@Luap99 Many thanks. I'll have a go tonight when I'm at home. |
The rootless cni namespace needs a valid /etc/resolv.conf file. On some distros is a symlink to somewhere under /run. Because the kernel will follow the symlink before mounting, it is not possible to mount a file at exactly /etc/resolv.conf. We have to ensure that the link target will be available in the rootless cni mount ns. Fixes containers#10855 Also fixed a bug in the /var/lib/cni directory lookup logic. It used `filepath.Base` instead of `filepath.Dir` and thus looping infinitely. Fixes containers#10857 [NO TESTS NEEDED] Signed-off-by: Paul Holzinger <[email protected]>
Tested and confirmed working on one machine. I'll do a second test later on another. |
Also confirmed working on the other machine. |
The rootless cni namespace needs a valid /etc/resolv.conf file. On some distros is a symlink to somewhere under /run. Because the kernel will follow the symlink before mounting, it is not possible to mount a file at exactly /etc/resolv.conf. We have to ensure that the link target will be available in the rootless cni mount ns. Fixes containers#10855 Also fixed a bug in the /var/lib/cni directory lookup logic. It used `filepath.Base` instead of `filepath.Dir` and thus looping infinitely. Fixes containers#10857 [NO TESTS NEEDED] Signed-off-by: Paul Holzinger <[email protected]>
FWIW, I found this issue when googling for problems with DNS resolution among my containers. Turns out I was just missing the |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
When using a minimal docker-compose:
starting rootless containers works as long as dnsname plugin is not installed:
(after starting
podman system service -t 0 unix:///tmp/podman.sock
)However, after adding the dnsname plugin, everything breaks:
The problem seems to lie in dnsmasq, as the journal says:
But I've ruled out AppArmor (which I run), because
aa-complain /usr/sbin/dnsmasq
followed by checking/var/log/audit/audit.log
does not produce any indication of denied operations. Unfortunately searches did not yield useful results on what "exit status 5" means.Logs from
podman system service
:Steps to reproduce the issue:
Use provided docker-compose.yml
Install the CNI dnsname plugin
Start the podman socket as user
Use docker-compose to start the container
Describe the results you received:
Container does not start with the output provided above.
Describe the results you expected:
Container starts.
Additional information you deem important (e.g. issue happens only occasionally):
Reproduced on two different distributions: openSUSE Leap and openSUSE Tumbleweed. Happens all the time.
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? (https://github.com/containers/podman/blob/master/troubleshooting.md)
Yes (also happens with podman 3.2.2)
Additional environment details (AWS, VirtualBox, physical, etc.):
The tests were done on openSUSE Tumbleweed but were also replicated on openSUSE Leap. In both cases, bare metal machines with no virtualization.
The text was updated successfully, but these errors were encountered: