-
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
Newly started container sometimes fails to resolve hostname of another container on the same podman net #13983
Comments
I think this is expected. The current design simply updates the container record for aardvark in a container file and triggers a reload for aardvark via SIGHUP. There is no logic to make sure aardvark has actually updated its in memory records before we start the container. |
Let me check if I understand correctly. My situation is that I start container A, then I start container B, and container B queries the DNS for hostname of container A and it fails to resolve. You are proposing that this is because the information about A has not yet been reflected in aardvark. To check, I tried to run
and then
to see how long it takes for the new name to be resolved. It often happens almost immediately, but it can also take 5 seconds or even more. I either need a reliable way to check that DNS has been updated, or I have to work without DNS. I can do the first by running a probe container. As for the second, in some situations I can query server container for IP and configure it in client.
I could possibly run my own DNS server (as another container in the network), in the hope that I can implement faster update myself. |
I think we should fix this race eventually but I don't think it is a high priority at the moment. If it actually takes more than 5 seconds to update the records something else is broken IMO, unless your system is under incredible load it should never take that long. Can you attach strace to the aardvark-dns process to see what it is doing for 5 seconds. |
I haven't been able to reproduce the >5 dns info propagation delay when I tried it. I did a When I tried this, I was running three terminals
(and third, manually, to add and remove container)
I always saw update in under 2s, which is about the time resolution of the In any case, I am glad I learned about the window of opportunity for a race now, when I can debug more easily, and not later when tests start failing in a CI. |
A friendly reminder that this issue had no activity for 30 days. |
@Luap99 What is the state of this issue? |
A friendly reminder that this issue had no activity for 30 days. |
@Luap99 Ping |
@flouthoc PTAL |
I have a similar issue / DNS resolving does not work until reboot /,
|
A friendly reminder that this issue had no activity for 30 days. |
Could you please try again with aardvark and netavark v1.1.1 since in previous versions we had an issue where netavark was not waiting for aardvark to complete. I think following PR was attempt at fixing that containers/aardvark-dns#148 so i think retrying with latest version is worth a try. |
I think this should be fixed in newer releases from the PR mentioned above, please re-open if this is seen in netavark + aardvark ( v1.1.0 + v1.1.0 ) |
/kind bug
Description
In my podman net called
mynet
, I have a server in container namedskupperrouter
and I have a client running the imagedocker.io/summerwind/h2spec:2.6.0
with parametersUsually, this works. Sometimes, the h2spec fails to connect, with error message
The 192.168.86.1:53 is DNS on my home wifi router, so the dns request apparently left the podman realm at that point, and seeks fulfillment on the vastness of open plains of the Internet.
I was checking contents of
/run/user/1000/containers/networks/aardvark-dns/mynet
and I do see theskupperrouter
pod and address listed there pretty much right after I start that container.When I rerun the failed container with
podman start h2spec
, it always then connects and runs fine. So I am guessing there is a dead window of time when the dns does not work, for some reason.I am using Fedora 36 beta with Podman 4.0.2 running as a
systemctl --user
service. (I defineDOCKER_HOST=/run/user/1000/podman/podman.sock
and use podman through that with an API library).Describe the results you expected:
Issue does not happen.
My container names don't end up leaked outside of my machine in DNS queries.
Additional information you deem important (e.g. issue happens only occasionally):
Issue happens only occasionally.
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):The text was updated successfully, but these errors were encountered: