Skip to content

CNI plugin OTLP metrics never reach Prometheus on talos-main: host resolver cannot resolve the collector's cluster DNS name #950

Closed

Description

@bpalermo

Symptom

No aether_cni_* series exists in Prometheus on talos-main at all — list_prometheus_metric_names regex=aether_cni.* returns [] — even though the CNI is configured with --otlp-endpoint=otel-collector.o11y.svc.cluster.local:4317 (cni-install args on the aether-agent DaemonSet).

Cause

The plugin is invoked by containerd on the host, with the host's resolver, not a pod's. /var/log/aether-cni/plugin.log on main-worker-01 (via talosctl read) shows every flush failing:

{"level":"debug","ts":"2026-09-26T11:51:14.248Z","caller":"telemetry/telemetry.go:126","msg":"failed to flush metrics",
 "error":"failed to upload metrics: context deadline exceeded: rpc error: code = Unavailable desc = name resolver error: produced zero addresses"}

Entries with the same error exist from 00:53Z today, i.e. before the 0.94.0 deploy — this is pre-existing, not introduced by #947. The agent pod itself resolves cluster DNS (hostNetwork: true + dnsPolicy: ClusterFirstWithHostNet), which is why the agent's metrics land and the plugin's do not; the plugin does not inherit the agent's dnsPolicy.

Why it matters now

#947 added aether.cni.operations{operation="capture_divert",result="error"} so a pod that started UNCAPTURED (the divert table rejected) is visible from Prometheus rather than only from a log line on the node. On talos-main that counter — and every other aether.cni.* metric, including operation=add/del durations — cannot be seen, so any grading line that reads it is a gate that cannot fail (#853 shape). The e2e/soak/README.md grading section written in #949 references it; until this is fixed, the signal's only home is the node log.

Fix direction

Give the plugin an endpoint the host resolver can reach: the collector's ClusterIP (stable per Service but not chart-portable), a hostPort/NodePort on the collector reachable at the node's own IP (--otlp-endpoint=$(HOST_IP):<port> — the CNI already receives HOST_IP), or the o11y stack's node-local agent if one exists. Whichever it is, add a gate: after install, one aether_cni_operations_total series must exist in Prometheus (the CNI runs on every pod ADD, so an absent series is a broken export, never "nothing happened"). Also consider logging the flush failure at WARN rather than DEBUG so it is not invisible by default.

Found while deploying 0.94.0 (TPROXY capture, #947) on 2026-09-26.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions