Closed hardcore-sushi closed 1 week ago
Does container name resolution work? I.e. is only the dns forwarding broken?
Yes container name resolution is working properly.
I assume you run rootless? Does it work when running podman as root?
If it works there it is most likely a problem with the way podman set the resolv.conf up in the rootless-netns, check
podman unshare cat /etc/resolv.conf
and if that says the file does not exists please run podman --log-level unshare --rootless-netns stat /etc/resolv.conf
I assume you run rootless? Does it work when running podman as root?
As stated in the first post, same behavior no matter whether running podman as root or not.
podman unshare cat /etc/resolv.conf
gives the same content as the host's resolv.conf
.
Sorry I meant podman unshare --rootless-net cat /etc/resolv.conf
but anyhow if root has the same problem then this is not important.
Possibly the resolv.conf config file parsing is broken and thus we have no upstream server to forward too.
Strangely, podman unshare --rootless-netns cat /etc/resolv.conf
gives:
nameserver 169.254.0.1
nameserver 9.9.9.9
This is normal and expected.
That's my bad. In had a dead DNS server at the top of my host resolv.conf
. After deleting it, everything worked properly.
It looks like an issue with the DNS server fallback process.
I looked closer at this and fallback seems to be working but only theory, in practise the timeout used in aardvark-dns before trying the next server is higher than the client so the client just gave up and when we finally send to response the client socket was already closed.
The default timeout we use 5s and most clients have the same so if we wait 5s each time it will never get a chance to resolve correctly so I think we should lower the timeout to like 1s at least
Steps to reproduce:
Same behavior no matter whether running podman as root or not.
However, it works fine when specifying DNS server on the podman command line:
And works fine without DNS requests (likely not a network issue):
Host
resolv.conf
:Container
resolv.conf
:podman network inspect test
:podman system info
:I'm not sure if it's more of a netavark or podman issue. Let me know and I'll move the issue to the right place.