Repository navigation
fix(quic): immediate drain + 8 s h3 twin idle so no source h3 connection outlives a hot-restart parent (#1054); skipParentStats default off now that #1060 fixes the deadlock - #1063
Merged
Conversation
…ion outlives a hot-restart parent (#1054); skipParentStats default off now that #1060 fixes the deadlock - chart: proxy.hotRestart.drainStrategy (immediate|gradual, default immediate) rendered as --envoy-arg=--drain-strategy <v>; validated. - agent: --east-west-quic-idle-timeout (default 8s) sets the idle timeout on the quic: twins only; h1/h2 keep 30s. The chart fills it from agent.eastWestQuicIdleTimeout and fails the render unless idle + 5s < proxy.hotRestart.parentShutdownTime. - chart: proxy.hotRestart.skipParentStats defaults to false (the carried #1060 patch fixes the deadlock); kept as an emergency switch. - e2e: HR_MODE=sparse in eastwest-quic-hotrestart.sh (two nodes via EWQ_WORKER=1, optional forced parent freeze), EWQ_LOCAL_PROXY, wedge harness reads per-pod status files before killing load. - docs: runbook section and soak gate for #1054. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This was referenced Sep 28, 2026
bpalermo
added a commit
that referenced
this pull request
Sep 29, 2026
Brings #979 up to date with 36 commits of main (demand-scoped twins #1020/#1032, fresh-stream classifier #1033/#1035, dormant-pair ledger #1036/#1038, per-twin EDS names #1012/#1029, the twin certificate gate #1051, the ODCDS always-answer override, --east-west-quic-idle-timeout #1063, L4 stat keys #1043, access-log timing #1048, the identity gate #1055, hot-restart knobs #1068 and the carried Envoy patches) while keeping #979's intent: no allow-list, every destination in the node's dependency set is QUIC-eligible. Resolution: - cache: quicServices / SetEastWestQUICServices removed. armsFor gives arms to every default, identity-ready, non-waypointed entry whose service is in the dependency set (the same rule recordQUICPair admits by, so no route names a twin the agent would refuse); twins stay demand-scoped. The destination_not_quic_enabled refusal/prune reason is gone. - quicpairs: the dependency-set prune now waits for the pod set like the source prune does -- the allow-list used to force its destinations into the set, and without it the first snapshot after an agent restart dropped every restored pair (TestQUICDemandPairSurvivesAgentRestart was red). - fan-out log: allow_listed_services dropped; observed_pairs and awaiting_client_cert kept. - chart 1.0.12: eastWestQuicServices removed, eastWestQuicIdleTimeout and its parentShutdownTime check kept. - e2e/eastwest-quic.sh: main's demand-scoped E1/E4c/E6 + #979's QUIC_DNS_SANS negative control; h2only/E3 removed; E6 dials quic-a and its idgate-* pairs are excluded from the driven-pair count. eastwest-quic-hotrestart.sh's h2 control is now the weighted GAMMA split (the one h2-by-design path). - tests, runbook, soak README, configuration.md, 038 rewritten for the unconditional state. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
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.
Part A: #1054, source h3 requests die on a stateless reset at a destination's roll
Mechanism and plan: #1054 (last comment). A source's h3 connection to the destination's draining hot-restart parent is still open when the parent exits. The next packet on it reaches the child, which answers with a QUIC stateless reset. The token is
FNV1a_128(CID), so parent and child mint the same one and the source accepts it. Two things kept such connections alive:1. Immediate drain (chart)
proxy.hotRestart.drainStrategy(immediate|gradual, defaultimmediate).--envoy-arg=--drain-strategy+--envoy-arg=<v>through the supervisor's existing extra-args path (buildEnvoyCmd, which also feedsenvoy --mode validate).726d7ac:source/server/options_impl.cc:164-167, a TCLAPValueArgthat acceptsgradual|immediateand throws on anything else (:338-340). The chart therefore validates the value and fails the render on a typo (aether.proxy.drainStrategy), rather than letting every proxy pod crash-loop at rollout.drainTime, which means a burst of TLS/QUIC handshakes against the child. LDS listener drains and the pod-termination drain switch to immediate as well.2. h3 twin idle timeout (agent + chart)
--east-west-quic-idle-timeout(default 8s). It sets the pool idle timeout on thequic:twins only (config.Http3ProtocolOptions(idle)viaproxy.QUICClusterFrom(..., idle);SnapshotCache.SetQUICIdleTimeout). h1/h2 and every other cluster keepUpstreamIdleTimeout(30 s).<= 0. Zero would render Envoy's 1 h default.agent.eastWestQuicIdleTimeout.aether.agent.eastWestQuicIdleTimeoutin_helpers.tplparses both durations (wholems/s/m/hcomponents; anything else fails naming the value) and fails the render unlessidle + 5s < proxy.hotRestart.parentShutdownTime. There is no silent constant.Risks
parentShutdownTimenow requires loweringeastWestQuicIdleTimeoutwith it. The chart says so when it refuses to render.Part B: flip the #1050 workaround default
proxy.hotRestart.skipParentStatsdefaulttrue→false. The carried patch proxy: carried patch — non-blocking hot-restart UDP forwarding and bounded child receives (#1050) #1060 (pinned via chore(proxy): pin aether chart to aether-proxy:c10461030fd82e1765a351ad1cba857ee3935665 #1061) removes the deadlock itself: 0 of 8 forced wedges on kind, and talos rev252 ran the e2e with the flag off. The knob stays as an emergency switch.HR_SKIP_PARENT_STATSandWEDGE_SKIP_PARENT_STATSare nowfalse.Tests
//test/envoy_validate:TestQUICUpstreamsIdleOutBeforeAHotRestartParentExitsruns over the fixture bytes Envoy validates. Everyquic:twin carries 8 s, and every other cluster with HTTP protocol options carries 30 s. Anti-vacuity: at least 2 twins and at least 1 other cluster must be present.//agent/internal/xds/cache:TestQUICTwinsCarryTheirOwnIdleTimeoutcovers the default (8 s) and a configured value (5 s) on twins, with the h2 base still at 30 s.//agent/internal/xds/proxychecks thatQUICClusterFromapplies the default and a custom idle.//agent/internal/xds/configcoversHttp3ProtocolOptions(idle)for zero, negative and explicit values, and checks that the default stays below 30 s.//agent/internal/cmdchecks that the flag is registered, defaults to 8s, parses a Go duration and rejectseight, and that the validator rejects0and negative values.aether_proxy_drain_strategy_test(defaultimmediate),_gradual_test,_invalid_test(fail)aether_agent_quic_idle_timeout_test(8s),_override_test(20s with a 1m parent shutdown),_too_long_test(10s + 5s == 15s fails),_short_parent_test(parentShutdownTime 12s fails with the 8s default),_malformed_testaether_proxy_skip_parent_stats_off_testis now the default and pins absence positionally (--drain-strategy's value is followed directly byenv:);aether_proxy_skip_parent_stats_testsetstrueand checks the arg renders.//charts/...,//agent/...,//test/envoy_validate:alland//test/mtlspool:all, plus--config=raceon the four touched Go packages.bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //...passes, andmake format-checkpasses.1.0.6→1.0.7.Harness
e2e/eastwest-quic-hotrestart.shhas a newHR_MODE=sparsemode:HR_PREs of light loops that end at the SIGHUP, then one request per (source, h3 destination) at T+2.shutting down due to child request. That is the exact text at the pin:hot_restarting_parent.cc:130.Received_stateless_resetand lines carryingPEER_GOING_AWAY, plus client non-200s and hung requests.--drain-strategy(from its argv) and the source Envoy's twinidle_timeout(from config_dump).The mode needs two nodes. On one kind node the source and the destination are the same Envoy, whose client connections die with the parent, so the reset cannot happen there. This PR therefore adds:
EWQ_WORKER=1ineastwest-quic.sh: adds a worker node, pins destinations to it and sources to the control plane, and untaints the control plane.HR_QUIC_IDLE: patches the agent DaemonSet past the chart check. It is only for the red arm's 30 s, which the chart now refuses to render.HR_FREEZE_PARENT_S/HR_FREEZE_AT: an optional forced fault, likeWEDGE_FREEZE_S. It SIGSTOPs the parent just before the child's parent-shutdown timer fires and bursts into the freeze, which holds the production window open.Folded in from the #1060 validation:
EWQ_LOCAL_PROXY=1loads a locally built proxy image.hotrestart-wedge.shreads the per-pod status files before killing the load.Kind red/green
Two nodes (
EWQ_WORKER=1), 10 destination hot restarts per run.gradual, twin idle30sgradual, twin idle30simmediate, twin idle8simmediate, twin idle8sRed barely reproduces on kind:
drainTime, a gradual drain also GOAWAYs every response, so only the first request on a connection left idle since T+2 can land in that window.503 URX,UF … QUIC_NETWORK_IDLE_TIMEOUTlines in the forced runs are new handshakes that cannot complete while the parent is stopped and the child is still paused. That is a freeze artifact, present in both arms and not gated.e2e/hotrestart-wedge.shwith the new defaults (single node,immediatedrain, skipParentStats off,WEDGE_FREEZE_S=6):The kind clusters were deleted afterwards and the kube context was restored.
Soak gate and runbook
e2e/soak/README.md, "The h3 stateless-reset gate (QUIC: 1–2 requests per proxy roll fail with a stateless reset from the successor (upstream_reset {QUIC_PUBLIC_RESET|FROM_PEER|Received_stateless_reset}) when the parent exits with h3 connections still carrying traffic #1054)": per proxy roll, source-sideReceived_stateless_reset= 0 and QUIC (upstream_cluster ~ ^quic:)503 UC= 0 toward the rolling node. ThePEER_GOING_AWAYcount is reported alongside, so a change in error flavour cannot read as a pass.quic.dispatcher.stateless_reset_packets_sent. It is inflated by the draining parent forwarding its own time-wait CIDs.docs/runbook.md: a new hot-restart section, "Source h3 requests die on a stateless reset at a destination's roll (QUIC: 1–2 requests per proxy roll fail with a stateless reset from the successor (upstream_reset {QUIC_PUBLIC_RESET|FROM_PEER|Received_stateless_reset}) when the parent exits with h3 connections still carrying traffic #1054)", plus the updated proxy hot restart: successor wedged after 'starting workers' (no log lines, admin unresponsive) — 30 s watchdog killed both epochs, ~55 s node-local outage on main-worker-02 (rev248 phase C roll 5, 16:37:52–16:38:50Z) #1050 section.Not in this PR
The carried Envoy patch from the issue plan (step 2: HTTP/3 GOAWAY pushed from
onDrain, which would let the idle cut go back to 30 s) is a separate change.Refs #1054 (closes on the talos per-roll gate: 0 Received_stateless_reset across the e2e proxy rolls)
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr