Repository navigation
Description
Now that the resolver is a standalone DaemonSet on the critical path for every managed pod's DNS (the CNI DNATs all UDP+TCP :53 to HOST_IP:18054), its observability is inadequate. Audit + live verification against talos.
Verified state
Metrics work, but there is only one. aether.mesh_dns.queries (counter, single result attribute: answered/nxdomain/cold/forwarded/forward_error) — agent/internal/meshdns/metrics.go:20-48. It reaches Prometheus correctly per-node (node="main-worker-0X", promoted from host.name). No latency, no gauges, no per-upstream, no runtime metrics. Repo-wide, this metric is consumed by nothing — no dashboard, no alert.
Logs are shipped nowhere. agent/internal/meshdns/telemetry.go installs a MeterProvider only — no LoggerProvider. The otel-collector has only an otlp receiver (no filelog), and no log-collector DaemonSet exists. So mesh-dns logs exist only as pod stdout and are lost when the pod is replaced — i.e. on every roll. This matters because several failure modes' only signal today is a log line.
The forward path is unexercised and unwatched: live counters show forwarded=6 per node vs answered≈380,000. The prober's mesh_dns tier only resolves mesh names, which are never forwarded — so kube-dns health and upstream failover have zero coverage.
P1 — snapshot staleness is completely invisible
The daemon serves from a snapshot file the agent writes (agent/internal/xds/cache/capture.go:129). If the agent crashes, loses RBAC, or its capture reconciler wedges, no fsnotify event fires and the daemon serves the frozen table forever: new services never resolve, re-IP'd services resolve to dead ClusterIPs, and since ready is true those misses are authoritative, negatively-cached NXDOMAINs (server.go:368). The daemon has no Kubernetes access by design and cannot cross-check. The external prober stays 100% green throughout, because its long-lived target keeps resolving from the stale snapshot.
mtime alone is insufficient: the writer is event-driven (no SyncPeriod; default resync 10h), so a healthy quiet cluster would look stale.
P1 — empty upstreams = silent total DNS outage (bug, not just observability)
NameserversFromResolvConf returns nil on any read error (resolvconf.go:16-18); the caller logs upstreams=[] at INFO and proceeds (cmd/mesh-dns/main.go:130-132). Every non-mesh query then becomes forward_error. Since all pod :53 traffic is DNAT'd here, that is a full DNS outage for cluster.local + external, announced at info level.
Scope (one PR)
- Snapshot freshness: versioned envelope
{writtenAt, generation, records}(tolerate the legacy bare map on read); agent re-writes on a ~60s heartbeat even when unchanged; daemon exportsaether.mesh_dns.snapshot_age_seconds+aether.mesh_dns.snapshot_written_at_seconds(observable gauges). - Record/reload health:
aether.mesh_dns.recordsgauge (catches an empty snapshot NXDOMAIN-ing the whole mesh),aether.mesh_dns.snapshot_reloads_total{result=success|read_error|parse_error|missing},aether.mesh_dns.watch_activegauge. - Ship logs via OTLP — add a LoggerProvider to the daemon. Do not import
common/telemetry/setup:bazel query somepathshows it reaches controller-runtime and would undo the slim binary (mesh-dns: build a dedicated slim binary for the daemon instead of reusing the full /agent #583). Mirrorlogs.go's light deps (otlploggrpc+sdklog) locally. - Empty-upstreams fix: promote to ERROR +
aether.mesh_dns.upstreams_configuredgauge. - Cheap adds:
aether.mesh_dns.query.durationhistogram{result},aether.mesh_dns.readygauge, Go runtime metrics (runtime.Start()), andNODE_NAMEfieldRef sok8s.node.nameis the node name not the IP (cosmetic today, but wrong).
Deliberately deferred to follow-ups
Wedge/liveness detection (REUSEPORT makes a network probe ambiguous — see #580); a non-mesh prober target to cover the forward path; dashboards + alerts (none exist); mesh-DNS runbook section (docs/runbook.md has zero DNS content); qtype/proto split; the UDP-only forward client truncating TCP-originated queries.
Activity
feat(mesh-dns): close the observability gaps (#586) (#587)
fix(mesh-dns): detect a wedged resolver and forward TCP queries over …
feat(mesh-dns): split nodata from answered and bucket the query type (#…
chore: "one release" is one chart minor; mesh-DNS reads only the snap…