Repository navigation
e2e/soak: restart watchdog (#1242) + event-synced uds-csi window (#1243) - #1265
Merged
Merged
Conversation
restart-watch.sh (#1242): moves the soak's restart watchdog out of the workstation wrapper into the harness. It baselines every container's restartCount in aether-system, aether-ingress and aether-test (prober, k6 runners, soak workloads) at start, keyed by pod UID, then samples every 120s for 8h and writes one unambiguous line per sample: `ok count=0`, or a cumulative RESTART list with restarts/new/lastReason/ exitCode/finishedAt/state/seen=live|gone, or `ERROR kubectl failed: ...` when a call or its parse fails -- a failed call never reads as "none". It ends with `SUMMARY restart-watch verdict=PASS|FAIL|UNPROVEN ...`. churn.sh (#1243): the uds-csi step now watches the victim node's plugin pods from before the restart and deletes the victim when the node's plugin is DOWN (old pod terminating or gone, no Ready replacement), not when a 1s poll of the old pod happens to catch it terminating. The old poll called the window missed as soon as the old pod was gone, though the plugin stays down until the replacement is Ready (maxSurge 0). The wait is bounded (SOAK_UDSCSI_WINDOW_TIMEOUT, 300s), a read after the delete confirms window=down, and late/missed log a distinct "leg NOT exercised" line with what the watch saw. No retry: the roll count and the ROLLED line count are unchanged. harness_test.sh runs both against canned fixtures without a cluster. Closes #1243 Refs #1242 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Oct 5, 2026
…gets; pin cloud-provider-kind - e2e/soak/harness_test.sh (#1265, 34 offline cases) ran nowhere: it needed jq from the host. It is now //e2e/soak:harness_test, an sh_test with the Bazel-pinned jq (jq.bzl) put on PATH, so it runs in bazel test //... and in ci.yaml's test leg whenever the soak harness changes. - The shell jobs in ci.yaml and proxy.yml warmed @buildifier_prebuilt //:buildifier, which nothing in either job runs since scripts/lint-proxy.sh stopped running buildifier (#1256); --config=lint's aspects are buf, shellcheck and gocognit, and proxy.yml's //:format.check warm-up already covers the formatter's buildifier. - e2e.yaml installed sigs.k8s.io/cloud-provider-kind@latest (then run under sudo): pinned to v0.12.0, what @latest resolves to today. - Stale comments: ci.yaml's shell job ("17 source files" -> 70) and main.yaml's test job ("the proxy-ready linkage guard" -> five guards). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Oct 5, 2026
…gets; pin cloud-provider-kind (#1279) - e2e/soak/harness_test.sh (#1265, 34 offline cases) ran nowhere: it needed jq from the host. It is now //e2e/soak:harness_test, an sh_test with the Bazel-pinned jq (jq.bzl) put on PATH, so it runs in bazel test //... and in ci.yaml's test leg whenever the soak harness changes. - The shell jobs in ci.yaml and proxy.yml warmed @buildifier_prebuilt //:buildifier, which nothing in either job runs since scripts/lint-proxy.sh stopped running buildifier (#1256); --config=lint's aspects are buf, shellcheck and gocognit, and proxy.yml's //:format.check warm-up already covers the formatter's buildifier. - e2e.yaml installed sigs.k8s.io/cloud-provider-kind@latest (then run under sudo): pinned to v0.12.0, what @latest resolves to today. - Stale comments: ci.yaml's shell job ("17 source files" -> 70) and main.yaml's test job ("the proxy-ready linkage guard" -> five guards). Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr Co-authored-by: Claude Fable 5.1 <[email protected]>
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.
Closes #1243
Refs #1242. This PR covers only the harness half of #1242. The kube-state-metrics / cAdvisor question (restarts gradable from metrics) is a separate GitOps decision, so #1242 stays open.
#1242:
e2e/soak/restart-watch.shThis replaces the one-liner in the workstation wrapper (
nightly-soak-1005.sh). That one-liner printed the same blank line for "no restarts" and for "kubectl failed", and it covered onlyaether-system.aether-system,aether-ingressandaether-test. The prober DaemonSet, the k6 runners and the soak workloads all live inaether-test; I checked that read-only on talos-main.BASELINE ...and never counted as new. If the baseline cannot be taken (5 tries), the script exits 2 withSUMMARY ... verdict=UNPROVEN reason=no-baseline.ok count=0is written only when every namespace was listed. It is the only line that means "none".RESTARTS count=Nis followed byRESTART ns/pod/ctr restarts=N new=M lastReason=<OOMKilled|Error|…> exitCode=… finishedAt=… state=… seen=live|gone. The list is cumulative: a restarted pod that a later roll deletes stays listed asseen=gone.ERROR kubectl failed: ns=… …appears when the API call fails or its output is not a List of pods. Nookline is written for that sample.SUMMARY restart-watch verdict=PASS|FAIL|UNPROVEN new_restarts=… containers=… samples=… error_samples=… ended=complete|TERM|INT …, plus oneSUMMARY RESTART …per container. TERM/INT are handled at once (sleep & wait).verdict=PASS new_restarts=0), whatUNPROVENmeans, and the k6-runner restart at ~T0+8h26m, which is why the default duration is 8h.Kickoff (the exact command):
#1243: the uds-csi window
The likely cause of
window=missedwas in the old loop. It polled only the old plugin pod, once a second, and it treatedNotFoundas missed. WithmaxSurge: 0the node's plugin stays down until the replacement is Ready, so a plugin that exits quickly on SIGTERM was logged as missed while it was still down.The step now works like this:
kubectl get pods -won the victim node's plugin pods before therollout restart.udscsi-window.awksays the node's plugin is down: the old pod is terminating or gone, and no Ready replacement exists yet.SOAK_UDSCSI_WINDOW_TIMEOUT, default 300 s). If the watch ends, the step falls back to a 0.2 s poll and logs that it did.window=down: the leg ran.window=late: the plugin was already Ready again.window=missed: the plugin was never seen down.lateandmissedalso logUDSCSI window=<w> … NOT exercisedand theplugin-watchlines. The README tells the grader to treat both as "leg not exercised". There is no retry, so the step still writes exactly one ROLLED/FAILED line per roll. Pre-flight now also checkswatch podsand the awk file.I found one kubectl quirk while testing on kind. With kubectl 1.35,
get -w -o jsonpathwith a{range}…{end}template prints the initial list and then exits 0 at the first change. The template therefore uses a filter without{range}; a comment inchurn.shrecords why.Proof
bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...passes (shellcheck coversrestart-watch.shandharness_test.shvia the//e2e/soak:soak_shellglob).make format-checkis clean aftermake format(shfmt).bash e2e/soak/harness_test.shreports 34/34 PASS with no cluster. It is not ansh_testbecause it needs hostjqand the directory has nosh_testpattern.kubectl get pods -o jsonfixtures (e2e/soak/testdata/restart-watch/) through a fake kubectl. It covers:seen=gone) (FAIL,new_restarts=6);Statusanswer, which produceERRORlines, nookline for those samples, andverdict=UNPROVEN;ended=TERM;udscsi-window.awkruns against canned watch lines in 8 cases (unseen/up/down/back, poll-after-watch, terminating replacement).kind create cluster, deleted afterwards; context restored totalos-main):BASELINE.lastReason=Error exitCode=3) and an OOMKilled pod (lastReason=OOMKilled exitCode=137) were listed.docker pauseacross one sample gaveERROR kubectl failed: ns=aether-system sample=3 exit=1 Unable to connect to the server: net/http: TLS handshake timeout.seen=gone.SUMMARY restart-watch verdict=FAIL new_restarts=9 containers=3 samples=8 error_samples=1.churn.sh --uds-csi-once): the stand-in was a busybox DaemonSet with the same name, selector andmaxSurge: 0that exits at once on SIGTERM, plus busyboxuds-echo/uds-cr-echoDeployments.window=down … deleted 0-1s after the restart while the plugin was down (watch).window=down … (poll).SOAK_UDSCSI_WINDOW_TIMEOUT=0run loggedwindow=missed … NOT exercisedwith itsplugin-watchlines.FAILED … bad=csinodebecause there is no real CSI driver on that cluster. That is expected and unrelated to the window.Not exercised:
aether-uds-csiroll: no csi.aether.io plugin, no real NodeUnpublishVolume, and not the 5-node talos-main roll order.window=latewas never produced live; it is covered only by the logic and the awk tests.kubectl getto check namespaces and pod-status shape.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr