DNS watchdog has no flap damping: a failing primary costs a full cache flush every interval #166
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The #95 watchdog re-pins the primary whenever its direct probe succeeds while resolved's selection sits on the fallback — and
repin_dns_primaryends withresolvectl flush-caches. When the primary is persistently unreachable from resolved's own sockets but reachable from the watchdog's (the #118 condition), that becomes a permanent loop: observed 2026-08-24, seven re-pins between 20:08 and 20:17, each wiping the entire host's DNS cache, each followed by resolved re-failing within seconds. Every application doing frequent lookups saw multi-second stalls plus a cold cache every ~90s — Discord through the tunnel was visibly in-and-out for exactly as long as a tunnel was up.The re-pin exists to rescue split-horizon resolution after a transient primary blip; it should recognize when the rescue isn't taking. Shape: track consecutive re-pins that fail to stick (selection back off the primary by the next interval), back off the retry cadence sharply after a few, and log the give-up once at warning — a primary that never sticks is #118's bug, not something to fight every 15 seconds. The unconditional flush also deserves a look: it exists to drop stale public answers from the fallback window, but in a flap loop it is the dominant user-visible cost.
🤖 Generated with Claude Code