-
Notifications
You must be signed in to change notification settings - Fork 47
dns is not updated when addnhosts change #85
Comments
I can't confirm this behaviour. started 2 containers. the addnhosts file looks this:
then ran after that, the addnhsots file content:
container-a has new .4 ip. looking up the ip of container-a in container-b:
so DNS response contains the new ip correctly. Versions:
|
That mean we can close this issue? |
Hi, please try to recreate the A container. The real containers are (on arm64)
when I recreate the graphite-statsd, then the grafana is not able to connect to the new one (stil resolving the old ip of graphite) |
also if I re-create the container, DNS resolution works fine.
I rather suspect your app doesn't lookup the DNS name again and just tries to connect to the old ip that it looked up earlier? |
ok that is strange. With your example it is working as expected (I tried also ubuntu:20.04) but please see this:
As you can see, the addnhosts shows now 192.168.0.17 graphite. I'm not sure how to debug this :( when I run podman inspect graphite:
|
Also I somehow get this state, where is the graphite twice in dns. But only one instance.
And when I reload the network: "podman network reload -a" |
Same issue |
Hi,
I'm facing following issue:
Versions:
I have multiple containers connected to network named "podmannet".
They have proper and updated ip/name in addnhosts file. But the dnsmasq does not reread this file when changes.
steps to reproduce:
Possible workaround (untested):
use --hostsdir= for dnsmasq which is automatically reread when changes
So the "addnhosts" should be in a subdirectory. And use --hostsdir= instead of --addnhosts=
The text was updated successfully, but these errors were encountered: