fix(dhcp): order Kea D2 DNS servers local-first so DDNS stays on-host #87
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/ddns-local-first-server-order"
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?
Fixes the live error:
DHCP_DDNS ... timed out waiting for response to forward RR removal for roborock-vacuum-a70.home.forked.io. to DNS server 172.16.0.3 port:5300on octet-dhcp-1.Root cause: Kea D2 tries a domain's DNS servers in list order, but the list was a plain alphabetical IP sort. Each mesh host owns a distinct lattice /24 (.7 → 172.16.1.0/24, .9 → 172.16.0.0/24), so
172.16.0.3(dns-3 on .9) always sorted ahead of172.16.1.4(dns-1, co-located with dhcp-1 on .7). Every DDNS update from dhcp-1 therefore crossed the mesh to .9 first; when that cross-host round-trip dropped a packet, Kea hit the 2.5s dns-server-timeout and logged the error before falling back to the local dns-1.Fix: order the D2
dns-serverslist local-first — DNS members sharing the DHCP consumer'smesh_host_idcome first, each group sorted so the hashed Kea payload stays deterministic. Applies to both the flatddnsServersand the per-zoneddnsServersByZone. Missing consumer host falls back to the prior plain sort.Tests: new unit tests for the ordering (local-first, per-group sort, dedupe, no-host fallback); existing dhcp-config determinism test still green.
Takes effect on the next D2 config push after deploy.
🤖 Generated with Claude Code