Repository navigation
test(e2e): gate the agent surge roll on kind, under load (proposal 041) - #1158
Merged
Merged
Conversation
bpalermo
force-pushed
the
feat/041-agent-surge-gate
branch
from
October 3, 2026 17:57
0e6d102 to
4f105e8
Compare
bpalermo
force-pushed
the
feat/041-agent-surge-chart
branch
from
October 3, 2026 18:18
b0ba2e5 to
89e4f0c
Compare
bpalermo
force-pushed
the
feat/041-agent-surge-gate
branch
from
October 3, 2026 18:18
4f105e8 to
1234f6d
Compare
Owner
Author
|
Review fix pushed (1234f6d): with 🤖 Generated with Claude Code |
bpalermo
force-pushed
the
feat/041-agent-surge-chart
branch
from
October 3, 2026 20:27
89e4f0c to
267eacd
Compare
e2e/agent-restart-gap.sh, the #1123 harness, gains what proposal 041 needs: - `strategy on|off` switches the agent DaemonSet between surge and delete-then-create without a roll (ARG_SURGE=1 surges from the install). - Load while measuring: every source pod requests a destination on the other node every ARG_LOAD_INTERVAL s, so both node proxies are on the path; the non-200 count is reported. - Surge terms per roll: old exit -> lock, lock -> owned (the takeover diff), owned -> stream. A takeover shorter than one poll (~80 ms) is reported as its bracketing interval, an upper bound, instead of "unreadable". - `overlap`: minReadySeconds holds the old agent for ARG_OVERLAP_HOLD s beside a Ready standby; a pod is created and another deleted on the worker inside that window. Asserts the OLD agent served both, the standby had not taken over, the takeover reconciled added>=1 removed>=1, the node proxy has the added pod's listeners and not the deleted one's, and the added pod answers 200 through the mesh. - `delete-pod`: kubectl delete pod of an agent: the replacement owns the node at once (no standby, no lock wait) and the proxy reconnects. - `report` re-summarizes a finished run; summarize no longer dies (pipefail) on a column with no readings. Kind, 2 nodes, etcd backend, load on, 20 rolls each: delete-then-create gap median 6.298 s, p99 10.216 s; 3 non-200 of 13391 surge gap median 0.080 s, p99 0.242 s; 0 non-200 of 17693 The 1 s gate is red on the first arm and green on the second. Proposal 041 is marked Implemented. Fixes #1123 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…(proposal 041 review) ARG_BOUND unset now means 1.0 s when the agent DaemonSet surges (or, for `report` of a finished run, when its rows carry takeover readings) and 5.0 s, the #1123 target, for delete-then-create. An explicit ARG_BOUND still wins. Also shfmt on `replaced`. Refs #1123 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
force-pushed
the
feat/041-agent-surge-gate
branch
from
October 3, 2026 21:22
1234f6d to
3079a8e
Compare
bpalermo
marked this pull request as ready for review
October 3, 2026 21:22
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.
Fixes #1123. Part 4 of 4 of proposal 041. Stack: #1155 ← #1156 ← #1157 ← this PR. Base:
feat/041-agent-surge-chart.This PR adds the gate for the surge roll and marks proposal 041 Implemented.
Measured: proxy-side gap across an agent roll
Setup:
e2e/agent-restart-gap.shon kind: control plane + worker, SPIRE on, etcd registry backend.control_plane.connected_state(one sample every ~80 ms, with the curl cost).strategy off/strategy on.000)Notes on the surge arm:
0sample.The gate can fail.
ARG_BOUND=1.0 ARG_EXPECT=green measureon the delete-then-create arm:✗ a node's proxy had no ADS stream for more than 1.0s across an agent roll(every one of its 40 gaps is over 4 s).On the surge arm the same command is green:
✓ every gap <= 1.0s.Agent WARN/ERROR kinds across the 20 rolls, before vs after.
liveness: failed to re-register endpoint health: 8 → 0.subscribing to the pod's X.509 SVIDs failed; retrying: 246 → 265. Same order, same cause: the attestor waits for the kubelet.standby readiness failinglogs at INFO (feat(agent): node-ownership lock and standby mode for a surge roll of the agent (proposal 041) #1155), not WARN.Overlap correctness (
e2e/agent-restart-gap.sh overlap): greenSetup:
minReadySeconds=30holds the old agent alive beside a Ready standby, which gives a deterministic overlap window.overlap-addand deletes podoverlap-del.The 30 s of
minReadySecondsalso exercises open question 3 on a real cluster: the standby stayed a Ready standby, bound nothing, and took over only when the old pod was finally deleted.kubectl delete pod(open question 4,delete-pod): greenHarness changes
strategy on|offARG_SURGE=1onupARG_LOAD,ARG_LOAD_INTERVAL) with a non-200 reportoverlap,delete-pod,reportsummarizesurvives a column with no readings: it used to die under pipefail and turned the first run's summary intoEXIT 1Shellcheck via
//e2e:e2e_shellis clean.Hazard rows
Each row of the proposal's table is closed in #1155–#1157, with a test per row (see #1155's table). These are the ones this gate exercises end to end:
overlap.Still to do, per the proposal's rollout: a talos soak with
agent.updateStrategy.surge=trueand the agent rolled under the standard churn. The surge strategy stays default-off until then.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr