Skip to content

docs: 045 soak preconditions and row-returning checks; runbook timing and heap reads for the readiness probe - #1738

Merged
bpalermo-agent-bot[bot] merged 2 commits into
mainfrom
fleet/045-runbook-followup
Nov 1, 2026
Merged

bpalermo-agent-bot[bot] merged 2 commits into
mainfrom
fleet/045-runbook-followup

Conversation

@bpalermo

@bpalermo bpalermo commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Docs only. This fixes the review notes deferred from #1737 (proposal 045) and #1735 (runbook).

Proposal 045 (from #1737)

  • Precondition: access logs on. The identity check requires the MeshConfig to set spec.proxy.accessLogsEnabled: true and accessLogSuccessSampleRate: 100 for the whole soak. On default config, inbound access logs are off and the check would fail every window.
  • Which source node a destination log line came from. The destination line is joined to the source-side line on x_request_id, and the source line carries node_name. This was checked against live logs. downstream_remote_address was not used: it is a pod-network address, so mapping it to a node would depend on the CNI. A destination line with no source partner is a FAIL.
  • Failures return a row. > 0 and == 0 filters drop a failing node's row. The checks now use > bool 0 / == bool 0 and take the expected node set from the load placement. Measured: one 0/1 row per node.

Runbook (from #1735)

  • Demotion takes about 20 s. Under stop_accepting_connections, a node's pods are demoted after two failed probe checks and three failing liveness ticks, about 20 s of sustained heap ≥ 0.98. Only pods whose probe already passed in the current Envoy epoch are affected.
  • The heap check reads two series. It pairs the 0/1 action gauge with envoy_overload_envoy_resource_monitors_fixed_heap_pressure (in percent), both under max_over_time, because a 5 s sample can miss a short excursion.

Every PromQL expression added was run against the reference cluster's Prometheus and returns one row per node.

Written by an agent.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YacWmjoxWSZRJC38XYxuZx

bpalermo and others added 2 commits November 1, 2026 17:42
…st_id join, failure checks that return a row

- The identity check requires MeshConfig spec.proxy accessLogsEnabled: true
  and accessLogSuccessSampleRate: 100 for the whole soak; on default config it
  would fail every window.
- A destination line's source node comes from joining its x_request_id to the
  source-side line (reporter=source, node_name), checked against live logs;
  downstream_remote_address is a pod-network address whose node mapping would
  depend on the CNI. A line with no source partner is a FAIL.
- > 0 / == 0 filters drop a failing node's row, so the checks use > bool 0 /
  == bool 0 (one 0/1 row per node, measured) and take the expected node set
  from the load placement.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YacWmjoxWSZRJC38XYxuZx
… read heap pressure with the action gauge

- Demotion needs two failed probe checks and three failing liveness ticks
  (~20 s of sustained heap >= 0.98), and touches only pods whose probe passed
  in this epoch.
- The heap check pairs the 0/1 action gauge with
  envoy_overload_envoy_resource_monitors_fixed_heap_pressure (percent), both
  under max_over_time, since a 5 s sample can miss a short excursion. Both
  queries were run against the reference cluster's Prometheus.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YacWmjoxWSZRJC38XYxuZx
Copilot AI balanced review requested due to automatic review settings November 1, 2026 20:43

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

The TLS gate examples still omit bool modifiers, dropping failing nodes and returning a count rather than a verdict, while the runbook incorrectly requires a probe pass in the current hot-restart epoch.

2 open issues
What changed in this PR

This docs-only PR refines the Envoy 1.41 soak procedure and readiness-probe troubleshooting guidance, following #1737 and #1735.

Changes:

  • Documents access-log prerequisites and request-ID joins for per-source identity checks.
  • Explains boolean TLS-check results and how to treat missing node rows.
  • Adds sustained-overload demotion timing and paired action/heap-pressure queries.
File Description
docs/​runbook.md Expands probe-demotion timing and heap-pressure diagnostics.
docs/​proposals/​045_envoy-1.41-dev-snapshot.md Clarifies soak logging prerequisites, source-node attribution, and TLS verdict handling.

Review effort: Balanced

Comment thread docs/runbook.md Resolved

@bpalermo-agent-review bpalermo-agent-review Bot 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.

pr-reviewer: approve @ 2d36d20
CI: green on this head. Every reported check passed: ci, test, race, shell, format, diff, deps-audit, netns, proxy-pin, envoy-api-parity, actionlint, CodeQL, coverage and the proxy gate. e2e, integration and the proxy test legs were skipped, as the change is docs-only.

Previous findings

  1. Identity check needs inbound access logs; how a destination line maps to its source node (045, from #1737): fixed. The new precondition is correct against the code. accessLogsEnabled defaults to false (GetAccessLogsEnabled() in applyMeshConfig, agent/internal/cmd/root.go). accessLogSuccessSampleRate is set to 100 unless the field is present. The source node now comes from a join on x_request_id, which works: both reporters log x_request_id (%REQ(X-REQUEST-ID)%, buildAccessLog in agent/internal/xds/proxy/accesslog.go). The mesh HCMs leave use_remote_address unset, so Envoy treats no mesh hop as an edge request and keeps the id the source proxy generated (conn_manager_utility.cc: edge_request = !internal_request && useRemoteAddress()). node_name is the OTel resource attribute taken from --service-node $(NODE_NAME), so it names the Kubernetes node. One inline comment covers the window edge of that join.
  2. > 0 drops a failing node's row (045, from #1737): fixed. T(…) > bool 0 and == bool 0 are valid PromQL. Because T(C) has an or on(node) anchor term, they return one 0/1 row for every node with a C or anchor series. The expected node set now comes from the load placement, and a node with no row is a FAIL.
  3. "Every local pod is demoted" read as immediate (runbook, from #1735): fixed. The timing matches the code. The probe uses a 1 s timeout, a 5 s interval and an unhealthy threshold of 2 (NewInboundReadyProbeCluster, agent/internal/xds/proxy/cluster.go). Then come livenessDemoteStreak = 3 and livenessInterval = 5s (agent/internal/cni/server/liveness.go). That is roughly 16 to 26 s from onset, depending on phase, so "about 20 s" is fair. Only pods whose probe passed this epoch are demoted: that is the inboundRegressed verdict, while inboundUnproven follows the app probe or holds the pod. The agent can still see the probe result under this stage because the health gateway sets bypass_overload_manager (healthgateway.go).
  4. "Check the proxy heap" named only the 0/1 action gauge (runbook, from #1735): fixed. In Envoy the resource monitor gauge is overload.<monitor>.pressure, set to pressure * 100 (overload_manager_impl.cc). The action gauge is overload.<action>.active. With the sink's envoy prefix, these export as envoy_overload_envoy_resource_monitors_fixed_heap_pressure (percent, so the stage is 98) and …_stop_accepting_connections_active. The chart's stats_matcher excludes nothing under overload., and the 0.98 trigger matches agent-proxy-configmap.yaml.

Findings

  • minor: the identity check fails a destination line that has no source partner in the window. The source line can be stamped before the window opens, and a dropped source record also counts as a FAIL. See the inline comment.
  • nit: the agent reads the MeshConfig only at startup. The precondition holds only for agents started after it was set. See the inline comment.

Verified

  • MeshConfig field names, defaults, and where the agent reads them (applyMeshConfig, loaded once in PersistentPreRunE, with no reload watcher).
  • Access-log fields on both reporters, the sample filter (an independent RuntimeFilter on each side; nothing overrides aether.access_log.sample), the OTel record timestamp (the stream start time), and x-request-id preservation across the hop.
  • Probe and liveness constants, the decision table, and the gateway's overload bypass.
  • Overload stat names and the percent scaling in Envoy's source. The chart's overload thresholds and stats matcher.
  • Every changed path is under docs/. No generated files are touched.

Not run

  • The PromQL and the access-log join were not run against any live Prometheus or log store. The PR's "measured" and "checked against live data" claims are taken from the PR, not reproduced.
  • make test-unit was not run. The PR changes docs only.

Deploy risk

None. Docs only: no chart, image or workflow change.

Notes

The soak itself still depends on the access-log precondition holding on the reference cluster's agents for the whole run (see the nit).

@bpalermo-agent-bot
bpalermo-agent-bot Bot merged commit e52fa8d into main Nov 1, 2026
32 checks passed
@bpalermo-agent-bot
bpalermo-agent-bot Bot deleted the fleet/045-runbook-followup branch November 1, 2026 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants