I'm having some errors with java tests failing to resolve DNS and so trying to understand DNS resolution in dagger a little better.
I exec'd into my dagger engine, and then into the target container namespace via runc
I see the following in DNS settings.
root@buildkitsandbox:/src# cat /etc/resolv.conf
search tg71nu3c0flau.dagger.local buildkit.svc.cluster.local svc.cluster.local cluster.local us-west-2.compute.internal
nameserver 10.87.0.1
options ndots:5
root@buildkitsandbox:/src# cat /etc/hosts
127.0.0.1 localhost buildkitsandbox
::1 localhost ip6-localhost ip6-loopback
10.87.0.18 redis-cluster
10.87.0.20 db
10.87.0.19 localstack
I can resolve redis-cluster via ping, but not nslookup
root@buildkitsandbox:/src# ping redis-cluster
PING redis-cluster (10.87.0.18) 56(84) bytes of data.
64 bytes from redis-cluster (10.87.0.18): icmp_seq=1 ttl=127 time=0.034 ms
64 bytes from redis-cluster (10.87.0.18): icmp_seq=2 ttl=127 time=0.046 ms
64 bytes from redis-cluster (10.87.0.18): icmp_seq=3 ttl=127 time=0.032 ms
root@buildkitsandbox:/src# nslookup
> redis-cluster
Server: 10.87.0.1
Address: 10.87.0.1#53
** server can't find redis-cluster: NXDOMAIN
Why would nslookup not work in this case? This behavior mirrors the problems I'm seeing in my tests, some libraries work for resolution (database), but others do not (redis), indicating they are using different resolution methods somewhere.
A search in discord here shows some previous mentions to an expermental flag, but that appears missing from the current codebase in a search.
All that said, any ideas? Perhaps a team member could help provide some detail about the dns internals?