Skip to content

e2e(soak): a mid-run new-ServiceAccount step and the init_fetch_timeout gate, so the soak can see the #1008 class (#1014) - #1024

Merged
bpalermo merged 3 commits into
mainfrom
feat/1014-soak-new-sa-step
Sep 27, 2026
Merged

bpalermo merged 3 commits into
mainfrom
feat/1014-soak-new-sa-step

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Why

The 8 h soak's churn set only rolls workloads whose ServiceAccount the node has already seen, so it never makes a node proxy build clusters for an identity that is new to that node. That is exactly where #1008 lived: a QUIC twin added after its h2 base was subscribed shared the base's EDS name, Envoy's delta WatchMap deduplicated the subscription, and the twin sat warming for its full 15 s initial_fetch_timeout, so every request from that identity to a QUIC destination got 503/NC. On rev242 that was 1,060 k6 failures in 11 s. We saw it only because the k6 loaders happened to start 58 s before T0. The 8 h of churn after that showed nothing. #1012 fixed it. This PR gives the soak a way to see it if it comes back, and #979 (QUIC unconditional) needs that before it can be graded.

What the step does

churn.sh has a new newsa schedule kind. Each step:

  1. Creates a ServiceAccount, a ConfigMap and a 1-replica Deployment in aether-test, all named sa-new-<epoch>, at the same time. The pod is pinned with a kubernetes.io/hostname nodeSelector to one Ready worker. Steps take workers in turn, starting from an offset based on T0, so successive steps and runs land on different nodes.
  2. The pod runs e2e/soak/newsa-client.sh (busybox sh + curl) in curlimages/curl:8.22.0. The UDP dialer already uses that image, so it is already on every node and the pod starts without a pull; no new image or publish path. From its first instant the pod drives ~20 rps for 120 s, split between svc-1.aether-test.aether.internal:18081 (QUIC) and svc-3…:18081 (h2), with user agent aether-soak-newsa/sa-new-<epoch>. Every 10 s it logs AETHER_NEWSA … ok= non2xx= connerr= per destination, and at the end it prints AETHER_NEWSA_FINAL … and AETHER_METRIC newsa_tally={…}.
  3. The driver copies those lines into the churn log and deletes all three objects together. It then logs either ROLLED newsa/sa-new-<epoch> <node> ready=Ns svc-1:ok=…,non2xx=…,connerr=…,codes=… svc-3:…, or FAILED newsa/… with the same tally if any destination got a non-2xx, a connect error, or no 2xx at all.

A FAILED newsa/ line is a gate finding: the run keeps going and stays gradeable. A step that produces no tally at all is a hole in the schedule and aborts the run with CHURN ABORTED, like a failed roll (#951). Those cases are: the apply is refused, the pod is not Ready within 180 s, or no final line appears. The EXIT/INT/TERM traps also delete a step that is still running. Pre-flight now checks create/delete on SA/ConfigMap/Deployment, pods/log read access, and that at least one Ready worker exists.

The step name sa-new-<epoch> is the join key everywhere: it is the SA, the suffix of the user agent, and the twin's stats key (aether-test/svc-1@aether-test/sa-new-<epoch>).

churn.sh --new-sa-once runs one step immediately and exits. README step 0d uses it as a pre-run check; it is also how the step was exercised on kind below.

Schedule

The steps run at T0+126 and T0+288, set with SOAK_NEWSA_OFFSETS (in minutes). Both are nudged off T0+2h and T0+5h because those minutes already have the edge roll (120) and the TRIPLE (300), and running a step on top of a roll would mix up which one caused an error. Each step finishes at least 3 minutes before the next roll. grep -c ROLLED is now 33 (31 rolls + 2 steps). Other knobs: SOAK_NEWSA=0 (turn the step off), _SECONDS, _RPS, _TARGETS, _UPSTREAMS, _IMAGE, _NS.

Grading recipe (README, "The new-ServiceAccount step (#1008/#1014)")

Both of these must hold:

sum(increase(envoy_cluster_init_fetch_timeout_total{aether_cluster=~".*@.*"}[8h])) == 0
# plus the raw form: increase() reads 0 for a series whose FIRST sample is 1, and that
# is how the rev242 series appeared, so the increase() form alone could pass on a real failure
max_over_time(envoy_cluster_init_fetch_timeout_total{aether_cluster=~".*@.*"}[8h]) > 0   # must be empty
log_name:aether_access_logs AND reporter:source AND user_agent:~"aether-soak-newsa" AND response_flags:NC
  | stats by (node_name, authority) count()          # must be empty

On top of that, the churn log must show two ROLLED newsa/ lines with non2xx=0,connerr=0.

  • Negative control: rev242 (before fix(quic): give every twin cluster its own EDS resource name so a twin added after its base is not deduplicated into 15 s of warming (503/NC) (#1008) #1012) is the red reading. …@aether-test/default = 1 on all 5 nodes, plus @anyport-probe on w02, and 1,060 × 503/NC from aether-test/default.
  • Checking the zero means something: each step's own @…/sa-new-* twin series has to exist and carry requests, and the access-log query without response_flags:NC has to return the step's own requests. If svc-1 is not QUIC-enabled on the build under test, the @ half of the gate proves nothing, and the grade should say so.
  • What a FAIL looks like: 503s on the QUIC destination only, about 150 in the first ~15 s of one step (10 rps × 15 s), on one node, with that node's @…/sa-new-<epoch> init_fetch_timeout = 1. If the h2 destination fails too, or connerr shows up with err6/err7, that is a different class of problem, and the README lists which.
  • The metric is in a new "Zero-reading gates: seeded or vacuous?" table, next to prober dns_*, anyport and capture_divert.

Kind run

This used a throwaway 1 control-plane + 2 worker kind cluster with busybox-httpd stand-ins for svc-1/svc-3 on :18081. It did not bring up the full mesh; this exercises the step itself, not the #1008 data path. The kind targets are cluster-local FQDNs with a trailing dot. Without the dot, curl in the image hit a kind-only resolver problem (curl could not resolve the name, error 6) because of the host's extra search domain. On talos the targets are mesh-DNS names.

Green (--new-sa-once, 120 s):

NEWSA begin aether-test/sa-new-1790544720 on newsa-1014-worker for 120s at 20 rps -> svc-1=http://svc-1.aether-test.svc.cluster.local.:18081/ svc-3=…
AETHER_NEWSA 2026-09-27T21:32:15Z step=sa-new-1790544720 node=newsa-1014-worker dst=svc-1 t=10s ok=100 non2xx=0 connerr=0
…
AETHER_NEWSA 2026-09-27T21:34:14Z step=sa-new-1790544720 node=newsa-1014-worker dst=svc-3 t=129s ok=1300 non2xx=0 connerr=0
AETHER_NEWSA_FINAL step=sa-new-1790544720 node=newsa-1014-worker svc-1:ok=1300,non2xx=0,connerr=0,codes=- svc-3:ok=1300,non2xx=0,connerr=0,codes=-
AETHER_METRIC newsa_tally={"step":"sa-new-1790544720","node":"newsa-1014-worker","seconds":120,"dst":{"svc-1":{"ok":1300,"non2xx":0,"connerr":0,"codes":"-"},"svc-3":{"ok":1300,"non2xx":0,"connerr":0,"codes":"-"}}}
deployment.apps "sa-new-1790544720" deleted / configmap … deleted / serviceaccount … deleted
2026-09-27T21:34:17Z ROLLED newsa/sa-new-1790544720 newsa-1014-worker ready=5s svc-1:ok=1300,non2xx=0,connerr=0,codes=- svc-3:ok=1300,non2xx=0,connerr=0,codes=-

(The step before this one landed on newsa-1014-worker2, so the node rotation works.)

Forced FAIL (SOAK_NEWSA_SECONDS=30, svc-1 pointed at a path that does not exist, plus a destination svc-ghost that does not exist):

AETHER_NEWSA 2026-09-27T21:35:00Z step=sa-new-1790544868 node=newsa-1014-worker dst=svc-1 t=30s ok=0 non2xx=300 connerr=0
AETHER_NEWSA 2026-09-27T21:35:00Z step=sa-new-1790544868 node=newsa-1014-worker dst=ghost t=30s ok=0 non2xx=0 connerr=300
AETHER_NEWSA_FINAL step=sa-new-1790544868 node=newsa-1014-worker svc-1:ok=0,non2xx=300,connerr=0,codes=404x300 ghost:ok=0,non2xx=0,connerr=300,codes=err6x300
2026-09-27T21:35:01Z FAILED newsa/sa-new-1790544868 newsa-1014-worker ready=3s svc-1:ok=0,non2xx=300,connerr=0,codes=404x300 ghost:ok=0,non2xx=0,connerr=300,codes=err6x300

Nothing was left behind in aether-test after either run. The kind cluster was deleted afterwards, and kubectl config current-context is talos-main. Nothing was run against talos-main.

Lint / format

  • bazel run --disk_cache= //:format: clean, no changes.
  • bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //e2e/...: green. To confirm the lint actually checks the new file (No shell script in the root workspace is linted: the shellcheck aspect has no sh_* target to visit #853), an unquoted echo $X was temporarily added to newsa-client.sh. The build then failed with SC2086 on that line, and after reverting it passed again. newsa-client.sh is picked up by the existing //e2e/soak:soak_shell glob.

Closes #1014

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

bpalermo and others added 3 commits September 27, 2026 18:38
…ut gate, so the soak can see the #1008 class (#1014)

The churn set only ever rolls workloads whose ServiceAccount the node has
already seen, so an 8h soak never makes a node proxy build clusters for a
new identity -- the exact case that cost rev242 1,060 x 503/NC (#1008, fixed
in #1012) and was visible only because the k6 loaders happened to start
58 s before T0.

churn.sh gains a new-sa step (T0+126 and T0+288 by default,
SOAK_NEWSA_OFFSETS): it creates a ServiceAccount + ConfigMap + 1-replica
Deployment named sa-new-<epoch> in aether-test, pinned round-robin to a
Ready worker, whose pod (newsa-client.sh, busybox sh + curl in the
already-resident curlimages/curl:8.22.0) drives ~20 rps at svc-1 (QUIC) and
svc-3 (h2) for 120 s with user agent aether-soak-newsa/<step>, tallying
ok/non2xx/connerr per destination every 10 s plus a final AETHER_METRIC
newsa_tally line. The driver copies the tallies into the churn log, deletes
the three objects together and logs ROLLED newsa/<step> <node> <tally>, or
FAILED newsa/... (a gate finding, not an abort) when anything was not a
2xx. A step with no tally at all aborts like a failed roll.
--new-sa-once runs one step now and exits (pre-run check, kind exercise).

README: the step, its gate (init_fetch_timeout on @ clusters == 0, with the
max_over_time companion because increase() reads 0 for a series born at 1,
plus zero 503/NC for the new-SA user agent in VictoriaLogs), rev242 as the
negative control, how a FAIL reads, and a zero-reading-gates table.

Closes #1014

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
@bpalermo
bpalermo merged commit b270756 into main Sep 27, 2026
24 checks passed
@bpalermo
bpalermo deleted the feat/1014-soak-new-sa-step branch September 27, 2026 21:53
bpalermo added a commit that referenced this pull request Sep 27, 2026
Keeps chart 1.0.0 (main: 0.95.8) and takes main's new ghcr.io proxy pin
(a43a20b), a PROXY_PIN_LEGACY_REFERENCES reference.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: 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

1 participant