Skip to content

test(soak): add a no-roll window + demand-set shrink so #682 is visible, and an age-matched proxy RSS sampler for #628 - #687

Merged
bpalermo merged 2 commits into
mainfrom
feat/soak-no-roll-window-and-rss-sampler
Sep 5, 2026
Merged

bpalermo merged 2 commits into
mainfrom
feat/soak-no-roll-window-and-rss-sampler

Conversation

@bpalermo

@bpalermo bpalermo commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Two soak-harness changes, both confined to e2e/soak/. No Go, no chart.

1. The soak was structurally blind to #682 for its entire history

The node agent's demand-scoped dependency set holds each observed upstream for 1h,
and rolling aether-agent rebuilds that set with a fresh TTL. The old churn schedule
rolled the agent at T0+90m and again at T0+300m (the TRIPLE), so the TTL could never
expire inside a soak
. #682 — a TTL expiry that drops the cluster on a node with no
local replica and then stalls ODCDS re-discovery for ~5 minutes — only ever surfaced in
the quiet hours between runs, while every soak reported PASS. Grading the 2026-09-05
run confirmed it quantitatively: all 13 service left dependency set lines across the
five agents were timestamped 09:06:17Z, one second after the k6 DaemonSet was deleted at
teardown. Not one fell inside the graded window.

Two fixes, both opt-out (SOAK_NO_ROLL_WINDOW=0, SOAK_SHRINK=0), default ON:

  • A 90-minute no-roll window at T0+360 → T0+450, placed after the last agent roll
    (the TRIPLE) and after the last roll of any kind. Nothing is rolled: no agent, proxy,
    mesh-dns, edge or svc. The last proxy roll is at T0+336, so the 1h TTL expires at
    roughly T0+396 — under load, inside the graded window, on the nodes with no local
    echo replica. Logged as no-roll window begin / no-roll window end.
  • A demand-set shrink at T0+450, after the window and before
    churn driver complete: deploy/svc-5 is scaled to 0 for 90s and restored to
    whatever replica count was read first (never hard-coded; an EXIT/INT/TERM trap
    restores it even if the driver is killed mid-shrink). This is the cheap trigger the
    demand-scoped TTL expires under continuous load and ODCDS re-discovery stalls ~5 min: 5-minute per-node outages on nodes with no local replica, invisible to soaks #682 grade comment found — any demand-set shrink, not the 1h TTL specifically,
    reproduces the ODCDS stall in seconds. Logged as SHRINK begin / SHRINK done.
    svc-5 is the target on purpose: it is the one service the k6 script declares as an
    upstream but never actually drives, so bouncing it cannot pollute the k6 error rate or
    the prober SLI.

The roll count and the roll composition are unchanged — the other rolls were re-spaced
from a 15-minute to a 12-minute cadence to buy the window without extending the run.
Churn now ends at ~T0+7h32m; k6 still runs 7h40m, so both new steps land under load.

The new schedule

T0+ (min) Roll T0+ (min) Roll
12 svc-1 24 svc-2
36 proxy * 48 svc-3
60 mesh-dns 72 agent
84 svc-5 96 proxy *
108 svc-1 120 edge
132 svc-2 144 mesh-dns
156 svc-3 168 svc-4
180 svc-5 192 svc-1
204 edge 216 proxy *
228 svc-2 240 svc-4
252 proxy * 264 svc-3
276 svc-1 300 TRIPLE * — agent + proxy + svc-3, the stress peak and the last agent roll
312 mesh-dns 324 svc-4
336 proxy * 348 svc-2
360 svc-1 — the last roll of any kind
360 → 450 NO-ROLL WINDOW — nothing is rolled for 90 minutes
450 SHRINK — svc-5 → 0 for 90s, then restored
~452 churn driver complete

* = 30 minutes later an age-matched proxy RSS sample is taken in the background.

2. Age-matched proxy RSS sampler for #628

e2e/soak/sample-proxy-rss.sh prints one row per aether-proxy pod from
kubectl top pods -n aether-system --containers joined with the pod's startTime:

timestamp             node            pod                 age_seconds  working_set_mi
2026-09-05T01:35:04Z  main-worker-01  aether-proxy-abcde  1803         241

Rows are appended to /tmp/soak-proxy-rss.tsv (header written once) and echoed to
stdout. --at-age SECONDS polls every 15s (max 20 min) until the youngest proxy pod
reaches that age and then samples once, so every checkpoint reads the same generation
age. It filters on the proxy container (the pod also runs authz), skips pods with no
startTime, and normalises Ki/Mi/Gi to whole Mi.

Usage:

bash e2e/soak/sample-proxy-rss.sh                # sample now, whatever the ages
bash e2e/soak/sample-proxy-rss.sh --at-age 1800  # a 30-min-old generation, every time

Run it at T0+30m; churn.sh queues the rest itself — 28 minutes after each proxy roll it
backgrounds sample-proxy-rss.sh --at-age 1800, which polls the last couple of minutes
until the youngest pod is exactly 30 minutes old. Six samples per run (the five scheduled
proxy rolls plus the TRIPLE's, since the TRIPLE-fresh incarnation is #628's worst
observed data point). The samplers are detached and can never delay the schedule; the
TRIPLE now waits on its three roll PIDs specifically rather than a bare wait, so a
parked sampler cannot hold up the CONCURRENT triple done log.

Why this matters: #628 has never had two age-matched samples. Churn recycles the proxy
every ~30-90 minutes, so a "higher" node is usually just an older incarnation, and
ramp-then-plateau (born-hot) cannot be told from a leak without holding age fixed.

Also

Testing

  • shellcheck (0.11.0, via @aspect_rules_lint) clean on both scripts; bazel run //:format (shfmt) clean. There is no BUILD target under e2e/soak/, so the lint
    aspect does not cover these files — shellcheck was run directly.
  • Sampler exercised against a stub kubectl: header written once, Ki→Mi conversion,
    <no value> startTime skipped, --at-age deadline warns and samples anyway.
  • Churn driver smoke-run with T0 shifted back 450 minutes and a stub kubectl: 31
    ROLLED lines in the right order, six RSS samplers fired, window logged, shrink read
    .spec.replicas dynamically and restored it — including on SIGTERM mid-shrink.

Refs #682 #628

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

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.

1 participant