Repository navigation
fix(xds): port-alias and TCP-floor clusters get their own EDS resource name, so a later-added one is not deduplicated into 15 s of warming (#1013) - #1029
Merged
Conversation
…e name, so a later-added one is not deduplicated into 15 s of warming (#1013) Port-alias clusters (<fqdn>:<port>, buildPortAliasesLocked) and the TCP floor (tcp:<fqdn> and its primary-port alias tcp:<fqdn>:<port>) subscribed to the bare-service EDS name the default cluster already holds. Envoy's delta-ADS WatchMap deduplicates subscription interest per (type_url, resource name), so one added in a later CDS update than the default cluster sent no subscribe and warmed for the full 15 s initial_fetch_timeout -- the #1008 mechanism. Each now subscribes to its own cluster name, and the cache republishes the bare ClusterLoadAssignment under it in the same snapshot pass that emits the cluster. proxy.QUICLoadAssignmentFrom is generalised to proxy.LoadAssignmentAlias, the one helper for twins, aliases and floors. The TCP per-port load assignment is renamed from the HTTP spelling <fqdn>:<port> to its own cluster name, which would otherwise collide with an HTTP :<port> alias on the same port. Gates: cache unit tests (red on main), //test/mtlspool live arms with shared-name negative controls (15.04 s / 15.02 s, init_fetch_timeout=1) vs 55 ms fixed, and an envoy_validate ClustersSharingServiceEDSName check over every fixture. Runbook: the invariant and the real fleet gate. Closes #1013 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
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
<ns>/<svc>) that the default service cluster already holds:<fqdn>:<port>(buildPortAliasesLocked: the ODCDS cold-path authorities, e.g. the mesh port:18081and the default port);tcp:<fqdn>and its primary-port aliastcp:<fqdn>:<port>(captureTCPClusters/tcpPortClustersLocked, plus the edge'sedgeTCPClusters).WatchMapdeduplicates subscription interest per (type_url, resource name).resource_names_subscribe. Two ways this happens:initial_fetch_timeout. For a floor,tcp_proxy(which has no cold path) closes every captured connection during that time.Today this usually stays hidden because the siblings arrive in the same CDS response as the default cluster. It is the #1008 mechanism, on the two other cluster kinds that shared the name.
Fix: one mechanism, shared with the QUIC twins
proxy.QUICLoadAssignmentFromis generalised toproxy.LoadAssignmentAlias(base, name). Twins, aliases and floors all use it now; the QUIC call sites, tests and docs are renamed.NewServiceCluster(alias, alias, …), with a newclusterEntry.bareEDSAlias.clustersEndpointsAndVhosts(via the newappendEntryCLAsLocked) republishes whatever the bare name resolves to (bareServiceCLALocked) under the alias name. Because the copy is derived at snapshot time, every endpoint or health change of the default cluster, and a retained or emptied default, carries through with no second copy to keep in sync.tcp:<fqdn>and the primary aliastcp:<fqdn>:<port>useNewTCPServiceCluster(name, name, svc).captureTCPClustersandedgeTCPClustersnow return(clusters, clas), so a floor and its load assignment always ride the same snapshot.<fqdn>:<port>to the cluster's own name,tcp:<fqdn>:<port>. Once HTTP aliases publish under<fqdn>:<port>, the old spelling would collide when a split-protocol service serves the same port as HTTP default and raw TCP. The unit sweep includes that case, and I watched it fail with the old name: the CLA was published twice and the EDS name was shared by 2.generateSnapshotre-sorts EDS after appending the floor CLAs. The unit tests regenerate with no input change and require byte-identical CDS and EDS.Gates (each seen red)
Unit,
//agent/internal/xds/cache(alias_floor_eds_test.go):TestLatePortAliasSubscribesToItsOwnEDSResource: the default port moves from 18081 to 8080 in a later snapshot, which adds a:8080alias beside:18081.TestLateTCPFloorSubscribesToItsOwnEDSResource: a split-protocol service joins the capture TCP set later, which addstcp:<fqdn>andtcp:<fqdn>:9000.Both assert that each cluster's EDS name is its own and differs from the bare name, and that a CLA under that name equals the base in every field except the name, in the same snapshot, under a new EDS version, with byte-identical regeneration.
TestNoNonDefaultClusterSharesTheBareServiceEDSNamesweeps a snapshot that contains default, per-port, alias, TCP floor, TCP alias, TCP per-port and QUIC twin clusters. It requires one subscriber per EDS name, a published CLA for every subscription, and no CLA published twice. It also checks that every kind is present, so the test cannot pass vacuously.Red on
main: I ran the new tests againstorigin/main's cache and proxy sources. All three fail, for exampleecho.demo.aether.internal:8080 shares the default cluster's bare-service EDS name,tcp:mixed.aether-test.aether.internal shares …, and in the sweep[tcp:… mixed…:8080 tcp:…:9000 mixed…:18081] should have 1 item(s), but has 5.Live,
//test/mtlspool(alias_floor_eds_test.go, the 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 delta-ADS harness):cluster_headerroute. The floor is probed through a realtcp_proxylistener carrying raw TCP, which forwards an HTTP/1.1 request to the destination.cluster.demo/echo.init_fetch_timeoutTestLatePortAliasGetsEndpointsPromptlyTestLatePortAliasWithSharedEDSNameStaysWarming(negative control, kept)TestLateTCPFloorGetsEndpointsPromptlyTestLateTCPFloorWithSharedEDSNameStaysWarming(negative control, kept)SUBSCRIBE add=[echo.demo.aether.internal:18081]andSUBSCRIBE add=[tcp:echo.demo.aether.internal]in the fixed arms.initial fetch timed out for …ClusterLoadAssignment. That is the fleet signature.//test/envoy_validate:capture_tcprouteandcapture_tlsroutefixture floors now use their own EDS name. Thequic_outboundfixture gains the mesh-port alias beside the default cluster and the twins. All fixtures still passenvoy --mode validate.ClustersSharingServiceEDSNamecheck: no EDS cluster except a service's default (<svc>.<ns>.<domain>on<ns>/<svc>) may subscribe to a name other than its own, and no name may have two subscribers. It runs over every fixture insideTestEnvoyValidate.TestNoNonDefaultClusterSharesTheServiceEDSNamerewrites every alias, floor and twin back to the bare name and requires each one to be flagged, with minimum kind counts so it cannot pass vacuously.[tcp:l4-a… tcp:l4-b…],[tcp:l4-tls-front… tcp:l4-tls-a… tcp:l4-tls-b…],[echo.demo.mesh.local:18081]).Also run:
bazel test //agent/... //test/...(38/38),--config=raceon//agent/internal/xds/cache:alland//agent/internal/xds/proxy:all, lint withfail_on_violation(green after splitting outappendEntryCLAsLockedfor gocognit),//:formatand gazelle.Docs
docs/runbook.mdupdates the invariant paragraph to cover all three cases: #842 SDS, #1008 EDS twins, and #1013 aliases and floors. It covers:LoadAssignmentAlias);/config_dumprule: only the default cluster may carryservice_name: <ns>/<svc>;The fleet gate needed a different matcher than the issue assumed. Aliases, floors and per-port clusters keep the default cluster's
alt_stat_name(the bare<ns>/<svc>). Their stats land incluster.<ns>/<svc>.*, soaether_cluster=~"tcp:.*|.*:[0-9]+"matches nothing. The live harness confirmed this: it read the late alias's and floor's timeout atcluster.demo/echo.init_fetch_timeout. The gate is:A non-zero value identifies the service, not which of its clusters timed out;
/config_dumpand the proxy log narrow it down.Not touched:
agent/internal/xds/proxy/capture.go(the capture listener, #1007),charts/,e2e/soak/.Closes #1013
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr