home-assistant / plugin-dns

CoreDNS implementation for Home Assistant
Apache License 2.0
20 stars 14 forks source link

Avoid repeated Cloudflare resolve attempts when DNS over TLS is blocked #134

Closed agners closed 6 months ago

agners commented 6 months ago

When a first resolve attempt on the fallback chain (:5553) fails, the fallback plug-in of the main chain will trigger health check. By default health checks sends a request every 0.5s as long as upstream reports unhealthy (default value). Unfortuntely the fallback plug-in's health check can't be confiugred currently.

Each of these health checks will trigger a 5s resolve attempt by the fallback chains forward plug-in. And since we get a health check every 0.5s, and health checks on the fallback chain are disabled, this leads to non-stop resolve attempts, forever.

On-top of that, even when the primary/DHCP provided DNS server is working, the loop plug-in will trigger a first resolve attempt on the fallback chain still! This means, even with a working primary DNS sever, the fallback chain will enter a runaway loop still!

This change does several things:

Fixes #90