Repository navigation
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
Merged
Conversation
A `quic:` twin cloned its h2 base's eds_cluster_config, so both clusters subscribed to the same EDS resource name on the same delta-ADS mux. Envoy's WatchMap deduplicates interest per (type_url, resource name): a twin added after its base was subscribed (a new ServiceAccount's first pod on the node) sent no subscribe, the control plane had nothing to answer, and the twin warmed for the full 15 s initial_fetch_timeout -- 503/NC from that source to every QUIC destination. #842's mechanism, on EDS. proxy.QUICClusterFrom now points the twin at its own EDS name (the twin's cluster name), and the cache publishes the base's ClusterLoadAssignment under every twin's name in the same snapshot that introduces the twin (proxy.QUICLoadAssignmentFrom: endpoints/named endpoints/policy shared with the base, field set pinned by a test). Gates: - cache: TestQUICTwinsSubscribeToTheirOwnEDSResource (red on main). - mtlspool, live delta ADS against the pinned proxy: a late twin serves in 57 ms; the negative control with the old shared name reproduces 15.05 s of warming, init_fetch_timeout=1 and the proxy's "initial fetch timed out for ...ClusterLoadAssignment". - envoy_validate: QUICUpstreamsSharingEDSName over the QUIC fixture, with an anti-vacuity rewrite back to the shared shape. Docs: runbook troubleshooting entry + fleet gate query, 038 Phase 4b row. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This was referenced Sep 27, 2026
bpalermo
added a commit
that referenced
this pull request
Sep 27, 2026
…ut gate, so the soak can see the #1008 class (#1014) (#1024) 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 Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr Co-authored-by: Claude Fable 5.1 <[email protected]>
bpalermo
added a commit
that referenced
this pull request
Sep 27, 2026
Brings in #1016 (repository-cache keys, cache-save: false, ci-bazel-warmup first steps), #1019 and #1012. publish.yaml keeps both sides: the #1016 setup-bazel cache settings and warm-up step, then the release-environment Quay robot login. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This was referenced Sep 27, 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.
Mechanism
proxy.QUICClusterFromcloned the h2 base, so everyquic:twin kept the base'seds_cluster_config(the bare-service EDS name,ads: {}).WatchMapdeduplicates subscription interest per (type_url, resource name).resource_names_subscribe: no request goes out.initial_fetch_timeout. Every request from that SA to that destination is503/NC.envoy_cluster_init_fetch_timeout_total{aether_cluster="aether-test/svc-1@aether-test/default"}= 1 on every node. This is Make the source-identity filter state Hashable so the mesh can drop connection_pool_per_downstream_connection #842's mechanism (SDS, fixed in fix(agent): give the certificate selector its own SDS stream (#842) #865), this time on EDS.Fix
proxy.QUICClusterFromsets the twin'seds_cluster_config.service_nameto the twin's own cluster name. The config source is stillads: {}, on the same stream.proxy.QUICLoadAssignmentFrom(base, twinName)publishes the base'sClusterLoadAssignmentunder the twin's name. Endpoints, named endpoints and policy all come from the base, including the health status aether writes and all locality/metadata. The endpoint slice elements are shared, not deep-cloned: CLAs are never mutated after build. A test pins the CLA descriptor's field set, so a new upstream field cannot be dropped silently.cache.entryTwinsAndVhostreturns the twin CLAs from the same pass that produces the twins, so a new twin and its CLA always ride the same snapshot. They are emitted in sorted-identity order and re-sorted with every other CLA, so identical inputs produce byte-identical output.This follows the pattern the per-port clusters already use: a cluster that must not share EDS membership gets its own EDS name.
Why not a separate
api_config_source(the #865 shape)A separate source would add a mux per twin set and reintroduce a SotW/delta split for endpoints. A distinct resource name costs one extra CLA copy per twin on the existing stream, and go-control-plane's delta cache serves distinct names independently. No blocker to the preferred fix came up.
Gates (each seen red)
Unit:
//agent/internal/xds/cacheTestQUICTwinsSubscribeToTheirOwnEDSResource. It uses ≥2 local identities, then adds a third identity in a later snapshot, and checks:Red on
main: I revertedcluster.goandegress.goand the test failed on (a) for every twin and on (c) ("the new identity's twin load assignment must ride the SAME snapshot as the twin").Live:
//test/mtlspoolquic_twin_eds_test.goruns the pinned proxy against the go-control-plane snapshot cache over DELTA_GRPC ADS (the existing Make the source-identity filter state Hashable so the mesh can drop connection_pool_per_downstream_connection #842 harness;launchEnvoyOverADSwas extracted fromstartEnvoyOverADS, and the xDS trace now also logs EDS). It publishes base + twin(source-a), waits until both serve 200 via acluster_headerroute, then publishes a new snapshot adding twin(source-b). The twin is production'sQUICClusterFrom/QUICLoadAssignmentFromoutput with only the transport swapped to cleartext h2; the EDS shape is untouched.TestLateQUICTwinGetsEndpointsPromptly(green): the late twin served its first 200 after 57 ms and left warming after 60 ms, withinit_fetch_timeout=0(budget 3 s). The trace shows the newSUBSCRIBE add=[quic:…@demo/source-b]and its response.TestLateQUICTwinWithSharedEDSNameStaysWarming(red arm, kept as a permanent negative control): with the pre-fix shape (twin on the base's EDS name, no twin CLA), the twin served its first 200 only after 15.05 s and left warming after 15.05 s, withinit_fetch_timeout=1. No EDS subscribe was sent after snapshot 2, and the proxy loggedgRPC config: initial fetch timed out for type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment, exactly the fleet signature. The test asserts this outcome, so the harness is proven able to see the defect.envoy_validate:
quic_outbound_bootstrap.jsonstill passesenvoy --mode validate. The newQUICUpstreamsSharingEDSNamecheck (TestQUICUpstreamsHaveTheirOwnEDSName) runs over the fixture bytes. Its anti-vacuity half rewrites every twin back to the shared name and requires each one to be flagged.Also run:
bazel test //agent/... //test/...(38/38 pass),--config=raceon//agent/internal/xds/cache:alland//agent/internal/xds/proxy:all, lint withfail_on_violation, and//:format.Docs
docs/runbook.md:envoy_cluster_warming_state,envoy_cluster_manager_warming_clusters,envoy_cluster_init_fetch_timeout_total{aether_cluster=~".*@.*"}), the proxy log line and the cause./config_dumpcheck.docs/proposals/038_udp-tproxy-capture.mdPhase 4b: a twin carries its own EDS name, with the reason and the rejected alternative.Follow-ups (not in this PR)
e2e/soak/as a separate PR. The fleet gate isenvoy_cluster_init_fetch_timeout_totalon@clusters = 0 across the run.buildPortAliasesLocked) and TCP floor clusters (capture.go). Either would hit the same dedup if it were ever added in a later CDS update than its default cluster. I have not checked whether that happens in practice; it is worth its own issue.Closes #1008
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr