Repository navigation
fix(agent, chart): every per-pod listener, cluster and stat name carries the pod's namespace, so two same-named pods on one node are both served (#1584) - #1634
Merged
Conversation
…ies the pod's namespace, so two same-named pods on one node are both served (#1584) The node agent named everything it builds for one pod after the pod's NAME alone (inbound_<pod>, inbound_<pod>_h3, outbound_http_<pod>, capture_<pod>, capture_udp_<pod>, app_<pod>_<port>, health_<pod>, inboundready_<pod>), while its snapshot cache keys its entries by network namespace. Two mesh pods of one name in two namespaces on one node (two StatefulSets called "web", each with a "web-0") produced two resources under each name. go-control-plane keeps one resource per name, and which pod's it kept was decided by map order on every snapshot build, separately for listeners and for clusters: one pod had no listeners, and the other's inbound listener could route to an app cluster that dials the first pod's loopback. The acknowledgement waits of CNI ADD and DEL and the liveness loop's health gateway paths were keyed by the same names. Agent - proxy.PodResourceKey returns "<namespace>_<pod>" (an underscore is legal in neither part) and is the one place a pod is spelled in a name. Every per-pod listener name, cluster name, health gateway path, stat prefix and filter chain name is built from it. There is no flag and no old-name fallback. - The snapshot build reports two DIFFERENT resources of one type under one name: an ERROR naming the type and the names, written when the set changes, and aether.agent.snapshot.duplicate_resource_names, one per name per build. It reports only; what is published is unchanged. Equal duplicates are not reported (a dual-protocol service yields its load assignment twice for a refresh). One input still produces it: two sandboxes of the same pod. - Nothing else in the agent was keyed by the bare pod name: the cache is keyed by netns, the CNI server's maps by container ID, "<namespace>/<name>" or IP, the SPIRE bridge by netns, and the acknowledgement tracker by resource name. Chart 2.5.0 - The proxy bootstrap extracts aether.namespace next to aether.pod from the listener stat prefixes. The namespace part is optional in the aether.pod extractor so the prefixes of an agent older than this change still collapse into the two metric families while a node is between versions. - The stats exclusions are unchanged and still match the renamed probe clusters; the membership gauges the health gateway reads stay allocated. - docs/runbook.md, "Chart 2.5.0", is the release note: the names, the metric labels, and what the rename does to a running node. Measured on the pinned proxy (//agent/test/mtlspool, //agent/test/envoy_validate) - A snapshot that removes a listener and adds a differently named one at the same address is accepted; of about 1,000 connections opened across the swap none is refused. A connection established before it is closed at the end of the proxy's drain time; until then it is served as before when the route's cluster keeps its name (outbound, capture) and answered 503 when the cluster was renamed with the listener (inbound). - Two same-named pods are each answered by their own application, in every order a snapshot can list them. - The chart's stats_config yields the two labels, keeps the gauges and drops the probe clusters' dead subtrees under the new names. The e2e scripts and the runbook spell the new names. The external-harness contract lists none of these names and is unchanged. Closes #1584 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This was referenced Oct 10, 2026
…roxy workspace's tag tests carry the chart's two extractors (#1584) Review of the pull request found a second input of the duplicate-name check that has nothing to do with pods: a service that is no longer listed under the HTTP key while it still is under the TCP key keeps a retained HTTP entry (serviceRetentionGrace) with an empty load assignment under the name of the TCP entry's populated one. The two differ, so the check reports them. It is right to: that duplicate predates the check and is not changed here. - The ERROR no longer carries a fixed issue attribute. - TestRetainedHTTPEntryBesideALiveTCPEntryIsLoggedOnceAndCounted pins what the check does with that input: one line for 32 builds, the endpoint type and the service name, the counter at one per build. - The comments and the runbook list both known inputs and no longer call the counter zero forever. - proxy/: the aether_stats tag tests spelled the chart's old single aether.pod extractor. They now carry the two the chart ships, and one assertion for a namespaced stat prefix. Not built locally; the proxy workflow runs them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Oct 10, 2026
…ome from the name builders Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This was referenced Oct 10, 2026
bpalermo
added a commit
that referenced
this pull request
Oct 10, 2026
…y one of its entries, the one built from a live listing, so its endpoints no longer alternate while another listing's cluster is retained (#1635) (#1638) * fix(agent): a service's shared load assignment is published by exactly one of its entries, the one built from a live listing, so its endpoints no longer alternate while another listing's cluster is retained (#1635) A service's h2 cluster, its TCP floor and its UDP floor share one load assignment, named after the service. The HTTP default entry, the TCP floor entry and the UDP floor entry of the cluster cache all name it, and one of them is meant to hold it. Two paths gave it two holders: - Ownership was decided while the refresh's passes ran, when the map holds only entries built from a live listing; the retention step then re-inserted the entry of a listing that had gone with an EMPTY load assignment under the same name. HTTP listing gone and TCP (or UDP) listing still there, or the mirror in one refresh (TCP gone, HTTP appears), or both gone and one back. - The UDP pass asked only whether the HTTP entry held the name, so a service listed under TCP and UDP had two holders for as long as it was. go-control-plane keeps one resource per name and which one is redrawn on every build. Measured in the cache over 32 refreshes with the HTTP listing gone and the TCP one live: the bare name published 2 0 0 2 0 0 2 0 2 2 ... endpoints with a new version each change, and the TCP floor's own-name copy, the h2 port alias's and the udp: cluster had NO endpoints on all 32, because the copies were taken from the retained entry's empty one. The rule now: a name's load assignment is held by one entry. Among entries built from a live listing, the first of HTTP, TCP, UDP. An entry retained after its listing went holds an empty one only under a name no other entry holds, and otherwise none (the shape of a port alias). It keeps its cluster and its vhost for the grace, which is what the retention is for; its cluster's subscription to the shared name resolves to the live entry's load assignment, as the floor cluster's already does for a service listed under both. The QUIC twins of a retained default entry and the udp: cluster read the shared load assignment from whichever entry holds it. The duplicate-name check of #1634 is silent for these inputs; its test, its comment and the runbook say so. Closes #1635 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr * fix(agent): the udp: cluster takes its port from the entry that holds its endpoints (#1635) Review of the previous commit. The udp: cluster read its endpoints from the entry that holds the service's shared load assignment and its application port from the entry serviceEntryLocked prefers (HTTP, then TCP). With an HTTP or a TCP entry retained beside a live UDP listing those are two entries, and two listings of one service need not register one port: the live UDP pod was dialed at the retained entry's port (10.2.3.1:8080 for a pod registered on 5353) for the grace. bareServiceHolderLocked returns the one holder, and the cluster and the predicate that decides whether it is published read both facts from it. Tests: every listing of the fixtures now registers its own port (HTTP 8080, TCP 9000, UDP 5353) and the udp: cluster is asserted by address and port in each sibling case, retained TCP beside live UDP included. A seeded random walk over one service's three listings, the grace, the dependency set and the QUIC twin (from the review) checks the holder rule and what is derived from it after every refresh. The duplicate-name check is driven directly on a non-pod duplicate, which no cache input produces any more, so that the line is still pinned to carry no issue attribute. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
This was referenced Oct 10, 2026
bpalermo
added a commit
that referenced
this pull request
Oct 10, 2026
…re of TCP and UDP, HTTP/3 between proxies, outcome-based retries, UDS over CSI, the surge-rolled agent (#1648) The architecture page is README.md and the landing page is website/pages/index.md; neither mentioned transparent capture, QUIC, UDP, L4 routes, the edge, retries or the data-plane ports. README.md (the site's Architecture page) - Intro and diagram: the CNI's TPROXY-style divert of TCP and UDP, the transports of a mesh hop (HTTP/3 over QUIC, HTTP/2, TCP; UDP in plaintext), the uds-csi node plugin. - New paragraphs: transparent capture, transport between proxies, retries, edge gateway, multi-cluster, data-plane ports. The agent paragraph names the ownership lock and the opt-in surge roll; the Gateway API paragraph names the L4 route types and the authz sidecar. - The CNI plugin exports no telemetry of its own (#1185); the observability paragraph said it did. website/pages/index.md (landing page) - "What it does today", eight entries, each linked to its doc or proposal. - The hot-restart cell said the agent supervises Envoy (it is the proxy supervisor since #772) and claimed zero drops measured by the prober; it now quotes proposal 042's write-up of the soak, the prober's mesh-DNS timeouts included. - The install block names the SPIRE prerequisite and the four privileged DaemonSets, as docs/getting-started.md does. docs - getting-started.md: the east-west QUIC text was a bullet of the edge section; it is its own subsection under "Call other services" (#east-west-quic), unchanged in content. The edge section gains the HTTP/3 switch (edge.config.http3.enabled, default off). The model diagram and its bullets name HTTP/3. - workload-requirements.md: one paragraph on what carries a request between proxies. - runbook.md: one per-pod cluster name spelled without its namespace (#1634). Site plumbing - docs/observability/metric-labels.md is staged as /docs/metric-labels/ and is in the nav; three staged pages linked it on GitHub. Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr Co-authored-by: Claude Opus 5.5 <[email protected]>
bpalermo
added a commit
that referenced
this pull request
Oct 10, 2026
…cts in the runbook, AGENTS.md, CLAUDE.md, README and the configuration reference are corrected (#1653) Proposal statuses (the website's proposals index is generated from them): - 042: Implemented; the harness is maintained outside this repository. The three passages that left the soak's mesh_dns timeouts "under investigation" now state the outcome (CPU saturation on one node, #1320). - 036: Implemented; phase 1 is the only phase in this repository. Phases 0, 2 and 3 are platform configuration. - 037: Implemented for Phases 0-3, Phase 4 pending (the any-port shim is still emitted); one Phase 3 item that was not built is named. - 040: the status line is re-wrapped so the index no longer cuts it at a continuation line that began with '#'. Doc drift: - runbook: the aether1022 Envoy patch is no longer carried (#1643); the inbound-readiness WARN sample shows the fields and the cluster name the agent logs since #1634; the agent-roll section no longer says a caller retries "a 503" (#1641). - AGENTS.md, configuration reference: no literal module count for the proxy-supervisor; AGENTS.md gains uds-csi, agent-ready and the two missing proto packages. - CLAUDE.md, README: load-all and push-all cover six images, uds-csi included. - devcontainer comment: DynamoDB Local left in #760. Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr Co-authored-by: Claude Opus 5.5 <[email protected]>
bpalermo
added a commit
that referenced
this pull request
Oct 10, 2026
…shot envelope (#1658) The compatibility window is written down once: one minor version of the aether chart (deprecated in 2.5.x, removable in 2.6.0, never within the same minor). AGENTS.md has the rule for contributors, charts/README.md the operator's side (supported skew, where a deprecation is announced), and the comments that said "for one release" now name a chart version. AGENTS.md and CLAUDE.md also allow removing a production function that only tests reference, with the test that only calls it, when whole-module analysis shows nothing else references it. The optional namespace group of the proxy bootstrap's aether.pod extractor (#1634) is recorded for removal in chart 2.6.0, beside the test that pins it and in the runbook; the rendered bootstrap is unchanged. The mesh-DNS snapshot reader no longer accepts the bare record map written before the envelope (#586, chart 0.87.0). A file without a records object is a parse error: the resolver starts cold or keeps the table it serves, warns and counts parse_error. Before, a JSON object without records was read as an empty table, and a reload of it answered NXDOMAIN for every mesh name. Chart 2.5.7. Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr Co-authored-by: Claude Opus 5.5 <[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 #1584
The defect
The node agent named everything it builds for one pod after the pod's name alone:
inbound_<pod>,inbound_<pod>_h3,outbound_http_<pod>,capture_<pod>,capture_udp_<pod>,app_<pod>_<port>,health_<pod>,inboundready_<pod>. Its snapshot cache keys entries by network namespace, so two mesh pods of one name in two namespaces on one node (two StatefulSets calledweb, each with aweb-0) produced two resources under each name.go-control-plane keeps one resource per name. Which pod's it kept was decided by map order on every snapshot build, separately for listeners and for clusters. One pod had no listeners, and the other's inbound listener could route to an app cluster that dials the first pod's loopback. The CNI ADD/DEL acknowledgement waits and the liveness loop's health gateway paths were keyed by the same names.
The fix
Agent.
proxy.PodResourceKeyreturns<namespace>_<pod>and is the one place a pod is spelled in a name (an underscore is legal in neither part, so the first one ends the namespace). Every per-pod listener name, cluster name, health gateway path, stat prefix and filter chain name is built from it:inbound_<pod>,inbound_<pod>_h3inbound_<namespace>_<pod>,inbound_<namespace>_<pod>_h3outbound_http_<pod>outbound_http_<namespace>_<pod>capture_<pod>,capture_udp_<pod>capture_<namespace>_<pod>,capture_udp_<namespace>_<pod>app_<pod>_<port>app_<namespace>_<pod>_<port>health_<pod>,inboundready_<pod>health_<namespace>_<pod>,inboundready_<namespace>_<pod>/healthz/health_<pod>,/healthz/inboundready_<pod>/healthz/health_<namespace>_<pod>,/healthz/inboundready_<namespace>_<pod>out_http_<pod>,in_tcp_<pod>[_<port>]; filter chainsin_…,in_tcp_…,in_h3_…<namespace>_<pod>This is a breaking rename: no flag, no old-name fallback.
A build-time check. The snapshot build reports two different resources of one type under one name: an ERROR naming the type and the names (written when the set changes, not on every build) and
aether.agent.snapshot.duplicate_resource_names, one per name per build. It reports only; what is published is unchanged. Equal duplicates are not reported (a service listed under both the HTTP and the TCP key yields two equal load assignments). The check is about names of any kind, and two inputs are known to produce it today:Audit of bare-pod-name keys.
agent/internal/xds/proxy)<namespace>_<pod>agent/internal/xds/ack), the CNI ADD/DEL waits (cni/server/pod.go)<namespace>/<name>, or IPaether_statsfilter's config (agent/internal/xds/proxy/stats_filter.go):source_pod/destination_podand the ServiceAccount name--stats-emit-pod), not their traffic, and predates this change.Chart 2.5.0 (
charts/aether, was 2.4.28).aether.namespacenext toaether.podfrom the listener stat prefixes:envoy_listener_inbound_*andenvoy_listener_out_http_*gain the labelaether_namespace, andaether_podkeeps its value. The namespace part is optional in theaether.podextractor, so the prefixes of an agent older than this change still collapse into the two metric families while a node is between versions (the agent and the proxy roll separately); a strict extractor put the pod into the metric name for that window.membership_*gauges the health gateway'shealth_checkfilter reads stay allocated.docs/runbook.md, "Chart 2.5.0", is the release note.e2e and docs.
e2e/eastwest-quic.sh(h3_stat, the E0 listener wait),e2e/supervisor-admin-identity.sh,e2e/agent-restart-gap.shand the runbook spell the new names. The runbook's TCP-floor queries are respelled: that stat prefix is part of the metric name, which now holds the namespace.Proxy workspace.
proxy/source/extensions/filters/http/aether_stats/tag_extraction_test.ccandaether_stats_integration_test.ccspelled the chart's old singleaether.podextractor; they now carry the two the chart ships, plus one assertion for a namespaced prefix. That is a text change not built locally: theproxyworkflow compiles and runs them.The external-harness contract is unchanged.
test/harnesscontract/external-harness.yamllists none of these names or labels, and//test/harnesscontract:checkspasses.What an upgrade does on a node
When a node's agent is replaced, the first snapshot removes every per-pod listener and cluster under its old name and adds it under the new one, at the same address in the same network namespace. Measured on the pinned proxy (
//agent/test/mtlspool,TestListenerRenamedAtTheSameAddress; a pod is a loopback port there, not a network namespace):503.proxy.hotRestart.drainTime, 10 s by default; the test used 3 s and saw 3.1 s). Until then it is served as before on the outbound and capture listeners (the clusters they route to keep their names), and answered503on the inbound listener: the draining listener routes toapp_<pod>_<port>, which no longer exists. A calling proxy retries a503on another endpoint.The release note says how to keep that from reaching callers (agents replaced one node at a time, a second replica for single-replica workloads, or a drained node).
Tests
Each new test was seen red first: against the unchanged names (by making the key the pod name alone) or the unchanged chart template.
//agent/internal/xds/proxy:TestPodResourceKey,TestPerPodResourceNamesCarryTheNamespace(the inventory),TestSameNamedPodsShareNoGeneratedName,TestSameNamedPodsOtherListenersShareNoName.//agent/internal/xds/cache:TestRetainedHTTPEntryBesideALiveTCPEntryIsLoggedOnceAndCounted(the check on the retained-entry input: one line over 32 builds),TestSameNamedPodsOfTwoNamespacesAreBothPublished(both pods published, each with its own netns, SVID and app cluster, byte-identical across 256 consecutive builds, by CNI ADD and by storage load),TestListenerNamesTheProxyIsSentAreAboutOnePod,TestTwoResourcesUnderOneNameAreLoggedAndCounted,TestDuplicateResourceNames.//agent/internal/cni/server:TestAddPodServesSameNamedPodsOfTwoNamespaces,TestLivenessReadsEachSameNamedPodOnItsOwnHealthPath.//agent/test/mtlspool(pinned proxy):TestListenerRenamedAtTheSameAddress,TestSameNamedPodsAreEachAnsweredByTheirOwnApplication.//agent/test/envoy_validate(pinned proxy):TestChartStatsConfigOnNamespacedPodNamesruns the proxy with the chart's ownstats_configand reads the labels and the allocated stats.//charts/aether:aether_proxy_bootstrap_pod_stats_tags_test.Run locally:
bazel test //...without the integration tag (437 pass),--config=raceon the six touchedgo_testtargets, the lint build,make format-check. Nothing was run on a cluster.An agent wrote this pull request.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr