Repository navigation
test(pressure): collector-shedding harness to exercise #662's startup decoupling on demand - #690
Merged
Merged
Conversation
… decoupling on demand #668 made agent startup independent of OTel export, but the branch it fixed has never run since: over the 09-03 and 09-04 soaks the collector peaked at 245 MiB, 21.7% of its 1126 MiB memory_limiter soft limit, and refused zero metric points. A soak drives mesh traffic, not telemetry volume, so it cannot reach that state. e2e/pressure/ reaches it deliberately and reversibly: a telemetrygen Job floods the shared collector's logs pipeline (memory_limiter is one process-wide component, so every pipeline — including the metrics pipeline the agents export to — starts refusing), then one node's agent pod is deleted under that pressure and asserted to start, attest to SPIRE and resume exporting. Refs #662 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This was referenced Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A test-only harness that reproduces #662's trigger — an otel-collector shedding
under
memory_limiterpressure — on demand, so the decoupling #668 shipped canactually be exercised instead of merely not-disproven.
No production code, chart, proto or dependency changes. Nothing in it runs in CI.
Why soaks cannot test this
#662 was a data-plane outage caused by an o11y component: with the collector
returning
data refused due to high memory usage, the agent's startup context wascancelled, SPIRE source creation failed, and 3 of 5 agents crash-looped (worker-02
at 5 restarts, still
CrashLoopBackOff— a node with no xDS control plane). #668made telemetry best-effort and bounded the first-SVID wait.
Since then the shedding branch has never run. Measured now, over the 09-03 and
09-04 soaks:
That is not a gap in soak discipline; it is what a soak is. A soak drives mesh
traffic and rollout churn, not telemetry volume, and the o11y plane was resized to
2Gi (GitOps #35/#36) precisely so it would stop saturating. Waiting for the next
organic saturation is not a test strategy — the last one cost a soak and an
unplanned outage.
Options considered
A — flood the shared collector (implemented). A
telemetrygenJob pushessynthetic OTLP at
otel-collector.o11y.svc.cluster.local:4317until the processcrosses the soft limit and starts refusing; then one node's agent pod is deleted
under that pressure. It hits the real agent's real export path, with no code, image
or chart change anywhere in the mesh. The cost is real and documented: the prober
SLI goes blind for the 1–4 minutes shedding is engaged, because the prober exports
through the same collector — hence the hard pre-flight against running during a
soak.
B — a second, undersized collector plus a one-node agent override (rejected).
There is no node-scoped mechanism to point one agent at a different endpoint:
--otlp-endpointis a DaemonSet-wide flag (ahelm upgradethat rolls all fiveagents and leaves the whole fleet exporting to a deliberately undersized
collector);
kubectl set env/patchon the DaemonSet is equally fleet-wide; a podcannot have its args mutated in place; and a per-node override would be a product
change shipped to serve a test. B also proves less — that an agent survives a
shedding collector, not the one every component is queued behind. If the chart
ever grows a legitimate per-node telemetry override, B becomes strictly safer and
this harness should switch.
Which pipeline to flood. Logs, not metrics.
memory_limiteris oneprocess-wide component shared by every pipeline, so pressure applied anywhere makes
every pipeline refuse — including the metrics pipeline the agents export to. The
flood therefore stays out of Prometheus, which is the plane
run.shmeasures from;contaminating the measurement plane with the pressure signal would be
self-defeating. The garbage lands in VictoriaLogs under
service.name=aether-collector-pressure(NUL-filled payloads, compresses tonearly nothing).
Procedure (
run.sh --node <name>)talos-main; no soak running (nok6-soak-loader, no localchurn.sh); collector 2/2 Ready; the target node'sagent Ready with
restartCount: 0; the external prober reporting successes;the agent's own series present; baseline collector RSS under 35% of the soft
limit.
prometheus-server(the LB address is not workstation-reachable)and records baseline RSS +
otelcol_receiver_refused_{metric_points,log_records}_total.refused_metric_points_totalincreases — the agents' own exports being shed, not merely the flood. Gives up
at 5 minutes and reports the max RSS reached.
kubectl rollout restartisDaemonSet-wide and would restart the fleet under a shedding collector.
(≤120s),
restartCount: 0, neverCrashLoopBackOff, logsresolved workload trust domain from SPIRE, and logs neitherfailed to create SPIRE Workload API sourcenor anyERROR-levelcontext canceled.window — if the flood lapsed while the agent started, the run is
INCONCLUSIVE, not a PASS.
aether_agent_storage_pods{node="<node>"}to be fresher than 120s.Sizing and the OOM guard
From the deployed config (2Gi limit,
check_interval: 5s, 80/25): hard limit 1638MiB, soft limit 1126 MiB, and a 512 MiB spike budget per 5s check ⇒ ~102 MiB/s per
replica is the frontier where the limiter could be overrun between checks. The
harness runs at ~64 MiB/s aggregate (~32 MiB/s per replica), a third of that, so
the collector sheds rather than OOM-kills — and
run.shdeletes the Job andaborts if any replica's RSS crosses 1500 MiB, before an agent is ever touched.
Three generator flags are load-bearing:
--allow-export-failures(without it thegenerator
Fatal()s on the first refusal, killing the pressure at the exact momentit engages),
--timeout=5s(the OTLP client retriesUnavailablefor a minute bydefault, collapsing the flood while it has to hold), and
--batch=false(batched1 MiB records would build ~100 MiB requests that die at the gRPC layer against
max_recv_msg_size_mib: 64, beforememory_limitersees them).Abort and cleanup guarantees
Three independent layers:
run.shtrapsEXIT/INT/TERMand deletes the Job on every exit path,including failures, aborts and Ctrl-C.
activeDeadlineSeconds: 600on the Job — it self-terminates even if theworkstation dies or the script is
SIGKILLed.backoffLimit: 0so a failedgenerator pod ends the Job instead of retrying at an unknown pressure.
kubectl -n aether-test delete job aether-collector-pressure, safe at anyinstant.
The Job is priority 0 (first evicted under node pressure, never the collector or an
agent), has no tolerations, is capped at 500m/512Mi per pod, carries an explicit
aether.io/managed: "false"mesh opt-out, and prefers not to co-schedule with acollector replica. Nothing else is mutated: no helm release, no chart value, no
DaemonSet, no collector config.
Expected PASS signature
Exit 0 PASS · 1 FAIL (#662 is back — capture the pod log before re-running, the next
run replaces the pod) · 2 INCONCLUSIVE (pressure not reached, lapsed mid-test, or the
1500 MiB ceiling aborted the run with no agent touched).
Validation done here
kubectl apply --dry-run=clientand--dry-run=serveron the Job manifest: accepted.bash -nclean; shellcheck (the repo'saspect_rules_lintbinary,--shell=bash --external-sources) clean;make format-checkclean (shfmt included).live cluster:
otelcol_process_memory_rss_bytes,otelcol_receiver_refused_{metric_points,log_records}_total(
instance=~"otel-collector-.*"),aether_agent_storage_pods{node=...},aether_probe_requests_total, andresolved workload trust domain from SPIRE(
agent/internal/cmd/root.go:342).Refs #662
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr