Repository navigation
docs(agent): close #815 release three — both filter-state keys stay on the listeners - #826
Merged
Merged
Conversation
…n the listeners Release three was planned as "drop aether.network.network_namespace from the listeners". Evaluated against the code and against Envoy 1.40.0-dev, it is a net loss, so this closes it as a decision rather than implementing it. Why it buys almost nothing. On a LISTENER the netns entry carries no per-pod state — its value is the constant format string %FILTER_STATE(envoy.network.network_namespace:PLAIN)%, byte-identical on every chain of every pod. The churn #815 was about lived entirely in the CLUSTER matcher, which release two (#822) already fixed. Deleting the entry saves one set_filter_state filter, ~240 bytes per mesh-originating filter chain (~0.5-1 KB per pod), plus one format-string evaluation per new downstream connection. Why it costs more than that: - Rollback, permanently. While the listeners stamp BOTH keys a proxy matches correctly against clusters from either side of release two, so a downgrade below 0.92.28 is hitless — which this issue needed once already (release one was rolled back on talos-main on 2026-09-19). Stamping only the SPIFFE ID would make 0.92.28 a permanent floor: a release-three listener facing a pre-release-two netns-keyed cluster matches nothing, takes on_no_match, and presents the agent's own SVID (spiffe://<td>/ns/aether-system/sa/aether-agent — not spiffe://<td>/node/<node>, see #825). - Another deploy that re-keys every per-pod filter chain, draining every mesh pod's chains a second time. - An access-log migration. accesslog.go's source_netns is the netns copy's only remaining reader. The Envoy facts, read from source at 13144fb (1.40.0-dev): the native object envoy.network.network_namespace does exist, is set in the ActiveTcpSocket constructor at accept time for any listener whose address carries a network_namespace_filepath (all per-pod listeners here do), is LifeSpan::Connection, and is PLAIN-formattable — so an HCM access log can read it directly and the aether copy is not needed for logging. It is StreamSharing::None, which is why the copy existed at all: only a shared_with_upstream copy could reach the cluster transport-socket matcher. The catch for a future migration is that the native object is the netns the LISTENER is bound in, so on the inbound listener it is the DESTINATION pod's netns; a field still called source_netns would be wrong and should be renamed. Recorded in the two places that carry the contract: the comment on sourceIdentityFilterStateKey and docs/runbook.md's version-ordering section. The chart NOTES.txt needs no change — it never promised a release three — so no chart version bump. If a later change is already re-keying these chains (#824's source-side peer-identity field is the obvious candidate), fold the removal into it then. Refs #815, #824. Co-Authored-By: Claude Opus 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.
Release three was planned as "drop
aether.network.network_namespacefrom the listeners". Evaluated against the code and the pinned Envoy (1.40.0-dev,13144fb), it is a net loss. This closes it as a decision rather than implementing it. Documentation only — Go comments and Markdown, no generated bytes change, no chart change, nothing to deploy.What it would have bought
On a listener the netns entry carries no per-pod state: its value is the constant format string
%FILTER_STATE(envoy.network.network_namespace:PLAIN)%, byte-identical on every chain of every pod. All of #815's churn lived in the cluster matcher, which release two (#822) fixed. Removing the listener entry would not reduce churn, re-warm orcluster_modifiedby one count. It saves ≈240 bytes per mesh-originating filter chain (≈0.5–1 KB per pod) and one format-string evaluation per new downstream connection. That is the entire benefit.What it would have cost
0.92.28hitless. This issue used that once already: release one was rolled back on talos-main on 2026-09-19 (rev222 → rev223 =0.92.26). A release-three listener stamping only the SPIFFE ID, facing a pre-release-two netns-keyed cluster, matches nothing →on_no_match→ the pod presents the agent's own SVID (spiffe://<td>/ns/aether-system/sa/aether-agent; notspiffe://<td>/node/<node>— docs(runbook, chart): the no-match query had the wrong metric name and the wrong node identity (#815) #825). Trading the rollback path and a permanent version floor for ~240 bytes is a bad trade.warming_clusterswave and no pool drain; cheaper than release two, still not free).accesslog.go'ssource_netnsis the copy's only remaining reader.The Envoy facts, read from source
The native
envoy.network.network_namespaceobject exists (1.37.0+), is set in theActiveTcpSocketconstructor at accept time for any listener carryingnetwork_namespace_filepath(every per-pod listener here does), isLifeSpan::Connectionand isPLAIN-formattable — so an HCM access log can read it directly and the aether copy is not needed for logging. It isStreamSharing::Nonewith no config knob, which is exactly why the copy exists: only ashared_with_upstreamcopy can reachTransportSocketOptions::downstreamSharedFilterStateObjects(), which is what a clustertransport_socket_matcherreads. Since release two the copy has no upstream reader, so itsSharedWithUpstream: ONCEis vestigial (left unchanged deliberately). The catch for any future migration: the native object is the netns the listener is bound in, so on the inbound listener it is the destination pod's netns — a field still calledsource_netnswould be silently wrong and must be renamed.Where the removal belongs instead
Fold it into a later change that is already re-keying these chains. #824 (a verified peer-identity access-log field) is the obvious candidate: it pays for the deploy and the log migration anyway, leaving only the version floor. Never as a release of its own.
Also recorded
source_netnshas zero downstream consumers — no dashboard, alert rule, LogsQL query, runbook procedure or soak script in this repo or in the GitOps repo reads it (independently re-checked). Only 2 of the 5 stamping sites feed an access log at all (the other three aretcp_proxychains), and both of those HCMs already bakepod_name/pod_namespacein as literals, so source-side attribution never depended on the field; destination-reporter lines already render-.Changes
The contract comment on
sourceIdentityFilterStateKey(release three → evaluated and closed, with the reasoning and the fold-in instruction); thebuildNetworkNamespaceFilterStatedoc comment (the Envoy facts, the sole remaining reader, the vestigial sharing, the source-vs-destination trap); a note on thesource_netnsattribute; anddocs/runbook.md's version-ordering section — this is the only ordering constraint #815 will ever impose, and keeping both keys is what makes rollback below0.92.28safe.NOTES.txtnever promised a release three, so it and the chart version are untouched.Tests: 16/16 on
//agent/internal/xds/... //agent/internal/cni/server:all //charts/aether/... //test/envoy_validate:all; lint clean;--config=race --runs_per_test=3on//agent/internal/xds/cache:allclean.Closes the release-three item of #815. Refs #824.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr