octodns / octodns-bind

RFC compliant (Bind9) provider for octoDNS
MIT License
7 stars 12 forks source link

refactor _host to use getaddrinfo instead of dns.resolver #28

Closed yzguy closed 1 year ago

yzguy commented 1 year ago

Follow up to #27 which is about #24 #25

dns.resolver.resolve() does not look at the normal chain of things (/etc/hosts, etc when resolving a DNS name so there can be cases when things like localhost do not resolve, or when a user configured something in /etc/hosts would not work.

By using socket.getaddrinfo we can support IPv4/IPv6 as well as have the lookup go through the normal chain of things.

yzguy commented 1 year ago

@ross added some more bits after your approval. Mostly just adding IPv6 + Logging to the docker-compose (this was super helpful for development) and then adding a timeout