Skip to content

feat(prober): a failed probe's line says where it went; the soak's echo servers stop logging a line per request (#1391, #1395) - #1461

Merged
bpalermo merged 2 commits into
mainfrom
fix/prober-fail-destination-1391
Oct 8, 2026
Merged

bpalermo merged 2 commits into
mainfrom
fix/prober-fail-destination-1391

Conversation

@bpalermo

@bpalermo bpalermo commented Oct 8, 2026

Copy link
Copy Markdown
Owner

Closes #1391
Closes #1395

The second half of a six-issue task; #1458 has the other four (#1390, #1418, #1419, #1423). The two do not depend on each other and merge in either order (checked: no conflict).

A failed probe's destination (#1391)

aether_probe_requests_total has no destination. Its node is the node the prober runs on, the source, and target is the name it asked for. A destination label would be a series per endpoint, so the metric stays as it is and its description now says that node is the source.

The client cannot name the destination either. On the mesh its connection ends at the node proxy of its own node, and the proxy adds no response header that names its upstream. So the AETHER_PROBE_FAIL line gets what the client does know, which costs no series:

key what it is
dial the address of the last connect attempt (what the name resolved to); empty on a reused connection and when the lookup failed
remote the far end of the connection the request was sent on: 127.0.0.1:18081 for liveness and reachability, the mesh Service address for mesh_dns. Never the pod that would have answered
local this end of it, which is the access log's downstream_remote_address
trace_id the trace id of the traceparent header the probe sent

trace_id is the key to the proxies' own rows for that request:

log_name:aether_access_logs AND traceparent:"00-<trace_id>-"*

The source proxy's row has the endpoint it chose (upstream_host); a reporter:destination row on another node means the request arrived there. A probe that failed in dns or connect has no row, and dial is all there is. The runbook has the procedure ("Where a failed probe went").

All four keys are on every detail line, and empty for a probe that was never sent (saturated).

Why the trace id and not the header. The saved work printed the whole traceparent and documented an exact-match search for it. That search would have found nothing: a proxy with tracing on writes its own span id into the header at every hop, also for a request marked not-sampled. Two rows of one probe, read from a test cluster's access logs:

reporter=source       traceparent=00-7562d29beca08c9375101ae165a94196-5fe29c53fe07c4da-00  upstream_host=10.244.4.106:18008
reporter=destination  traceparent=00-7562d29beca08c9375101ae165a94196-64629e6a312a85b9-00  upstream_host=127.0.0.1:8080

Same trace id, different span id. The line now prints trace_id alone and the documented search is by prefix; a test fails if a traceparent key comes back.

Quiet test servers (#1395)

echo-basic (e2e/soak/echo.yaml) and http-echo (mixed-svc in e2e/soak/multiprotocol.yaml) print one stdout line per request and have no switch for it, and their images have no shell. An init container copies a static busybox (pinned by digest) into an emptyDir as sh, and the server is exec'd through it with stdout on /dev/null. It is still PID 1; stderr is kept. Deleting command: brings the lines back.

svc-1 to svc-5 are echo-basic as well and are not defined in this repository, so this change cannot quiet them. The README says what to copy to them. Until that is done, they still log a line per request.

These are soak manifests, not chart files: no chart version changes.

Evidence

Measured:

  • Tests first: the new tests run against main's prober code fail, six of six (fail line has no string "trace_id", "dial", "remote"). With the change, bazel test //prober/... passes, and --config=race on //prober/internal/prober:prober_test.

  • Each field has a test that fails without it. Five mutations, one at a time, each put back: the dial address not recorded (2 tests fail), remote given the local address (3), local not recorded (2), a constant trace id (3), no trace id on a transport failure (2).

  • TestFailLineJoinsTheAccessLog: a server standing in for the proxy records the traceparent and the peer address it saw; the line's trace_id and local must equal them.

  • The two access-log rows above, and that a prober row's downstream_remote_address is the prober pod's ip:port and its downstream_local_address the Service address: read-only queries of a test cluster's log store, for probes that succeeded.

  • The quiet start, with the two images under plain docker, run as the manifests run them (same user, read-only root, the busybox copied by the init step), 20 requests each:

    echo-basic, as it was : answered=20/20 stdout_lines=22 stderr_lines=0 pid1=/echo-basic
    echo-basic, quiet     : answered=20/20 stdout_lines=0  stderr_lines=0 pid1=/echo-basic
    http-echo, as it was  : answered=20/20 stdout_lines=20 stderr_lines=1 pid1=/http-echo
    http-echo, quiet      : answered=20/20 stdout_lines=0  stderr_lines=1 pid1=/http-echo
    
  • bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //..., make format-check, make gazelle (no change).

Inferred, not measured:

  • That the span id is rewritten because proxy tracing is on. What was measured is that the two rows differ in it. With tracing off the header would pass unchanged, and the prefix search works either way.
  • That a liveness probe has no access-log row (its route is a local reply that the access log excludes): from the code, not from a query.

Not verified:

  • A failed probe's line joined to its rows on a cluster. The prober that prints trace_id is not deployed anywhere yet; the rows above are of probes that succeeded.
  • The two manifests applied to a cluster. Docker shows the mechanism; the init container, the emptyDir and the pod security context together were not run under a kubelet.
  • The saved work said "on kind, 20 requests to a pod: 20 log lines without it, none with it". I could not repeat that (no cluster for this task) and replaced it in the README with the docker measurement.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

bpalermo and others added 2 commits October 8, 2026 16:38
… client can know (#1391)

aether_probe_requests_total has no destination: `node` is the prober's own
node, the source, and `target` is the name it asked for. The client cannot
name the destination either. On the mesh its connection ends at the node
proxy of its own node, and the proxy adds no response header that names its
upstream.

So the AETHER_PROBE_FAIL line now carries what the client does know, at no
cost in series:

  dial      the address of the last connect attempt
  remote    the far end of the connection the request was sent on
  local     this end of it (the access log's downstream_remote_address)
  trace_id  the trace id of the traceparent header the probe sent

trace_id is the key to the proxies' own rows for that request. The trace id
and not the whole header: a proxy with tracing on writes its own span id into
the header at every hop, also for a not-sampled request. Two rows of one
probe, read from a test cluster's access logs, share the trace id and differ
in the span id, so a search for the header as sent finds nothing.

Every key is present on every detail line; all four are empty for a probe
that was never sent. The metric's description and the runbook now say that
`node` is the source.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…ut line per request (#1395)

echo-basic and http-echo print one stdout line per request and have no switch
for it; their images have no shell. During a soak that is every probe and
every loader request, shipped to the log store beside the access-log row the
mesh already writes for the same request.

An init container copies a static busybox into an emptyDir as `sh`, and the
server is exec'd through it with stdout on /dev/null. It is still PID 1 and
stderr is kept. With the two images under plain docker, 20 requests each:
echo-basic 22 stdout lines before and none after, http-echo 20 and none.

svc-1 to svc-5 are echo-basic too and are not defined in this repository;
the README says what to copy to them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
Copilot AI balanced review requested due to automatic review settings October 8, 2026 19:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Both quiet-shell init containers lack permission to write into their root-owned emptyDir volumes.

2 open findings
What changed in this PR

Adds destination diagnostics to failed prober logs and suppresses soak echo-server stdout.

Changes:

  • Records connection addresses and trace IDs for access-log correlation.
  • Adds destination-focused tests and documentation.
  • Wraps soak echo servers with a quiet shell.
File Description
prober/​internal/​prober/​prober.go Generates and logs probe trace IDs.
prober/​internal/​prober/​phase.go Captures connection endpoint details.
prober/​internal/​prober/​faillog.go Documents new failure fields.
prober/​internal/​prober/​destination_test.go Tests destination diagnostics.
prober/​internal/​prober/​BUILD.bazel Registers new tests.
e2e/​soak/​README.md Documents diagnostics and quiet servers.
e2e/​soak/​echo.yaml Adds stdout suppression wrapper.
e2e/​soak/​multiprotocol.yaml Quiets the HTTP echo container.
docs/​runbook.md Adds failure-correlation procedure.
docs/​configuration.md Updates failure-log schema.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread e2e/soak/echo.yaml Resolved
Comment thread e2e/soak/multiprotocol.yaml Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants