Repository navigation
Description
Problem
The node agent's mesh-DNS resolver is in-process (miekg/dns on HOST_IP:18054, reached via the per-pod CNI :53 DNAT). Because it dies with the agent pod, every agent roll opens a per-node no-listener window where mesh-name lookups fail.
#577 (warm-start snapshot + bind-early + authoritative/never-forward) shipped and is deployed (talos rev 177). E2e on talos proved #577 works as designed — all 5 nodes warm-started records:11 from /host/var/lib/aether/registry/mesh-dns/records.json before binding, and the resolver bound before the xDS cache sync — but it did not make agent rolls hitless. A clean agent roll (fix on both sides) still cost ~329 failed mesh_dns probes (timeout + dns_error/ECONNREFUSED), statistically identical to the pre-fix soak.
Root cause
The agent DaemonSet is maxSurge:0, maxUnavailable:1 with no preStop, so on every node the old agent (and its resolver) is fully deleted before the new pod is created. warm-start/bind-early only make the new resolver correct and quick once it binds — they cannot cover the window where no agent process exists on the node. The dominant mesh_dns failure class during agent rolls is therefore the container-recreation gap, unaffected by #577.
Why decouple (chosen over a front cache)
The obvious zero-gap fix — maxSurge:1 + SO_REUSEPORT on :18054 (new resolver binds while old still serves) — is blocked on the full agent because the agent also binds host-path CNI/xDS UDS sockets that collide under surge.
Decoupling the resolver into its own tiny daemon removes that blocker: a standalone resolver has only the :18054 UDP/TCP socket — no UDS collision — so SO_REUSEPORT + maxSurge:1 becomes feasible and delivers true zero-gap handoff. It also keeps the exact, c-ares-sensitive resolver semantics (EDNS0 OPT echo, NODATA-for-non-A, authoritative flags) untouched (same code, relocated), and reuses #577's snapshot file as the agent→daemon feed. A front cache (CoreDNS/nodelocaldns serve_stale) was considered but rejected: it puts a foreign component with its own semantics in our most sensitive path and is only best-effort (cold-in-gap still misses).
Scope
agent mesh-dnssubcommand (mirrorsagent edge/agent proxy-supervisor) that bindsHOST_IP:18054and serves from themeshdnsresolver. No k8s API access — records come from the snapshot file, not an informer.- Feed via file-watch: the daemon loads
records.jsonat start (already the warm-start path) and reloads on change via fsnotify (reuse theagent/storagewatch pattern). The agent keeps writing the snapshot from its capture reconciler but stops binding:18054. SO_REUSEPORTon the resolver's UDP+TCP listeners (vianet.ListenConfig.Control+unix.SO_REUSEPORT, passed todns.Serveras PacketConn/Listener) so two daemons can co-bind during a surge.- New
aether-mesh-dnsDaemonSet incharts/aether: host-network,updateStrategy.rollingUpdate.maxSurge:1, maxUnavailable:0, mounts the same host-persistent registry volume (read), runsagent mesh-dns. CNI DNAT target is unchanged (:18054). - Chart version bump; tests; gazelle; format/lint.
Acceptance / e2e (talos)
- Roll the
aether-agentDaemonSet →mesh_dnsprober tier stays ~0 errors through the roll (vs ~329 today). Baseline:sum(rate(aether_probe_requests_total{tier="mesh_dns",result!="success"}[5m])) by (node)flat at 0 across the roll. - Roll the new
aether-mesh-dnsDaemonSet → also hitless (surge + REUSEPORT overlap; confirm two pods co-bind:18054during the roll). - Confirm the daemon reloads records on snapshot change (agent reconcile → file write → daemon fsnotify reload).
Follow-up to #577. The residual http_error cross-node drain path is tracked separately.
Activity
feat(mesh-dns): readiness gate so surge rolls are hitless (follows #578/
fix(mesh-dns): give the daemon readiness probe timeout+CPU headroom (#…
fix(e2e): wait for aether-mesh-dns in the multi-cluster harnesses (#590)
chore: remove dead code surfaced by the improvement sweep (#614)
docs: correct stale facts found by the 2026-09-15 review (#772) (#773)
fix(chart): pass --registrar-address to the agent and --mesh-domain t…