Skip to content

docs(agent): close #815 release three — both filter-state keys stay on the listeners - #826

Merged
bpalermo merged 1 commit into
mainfrom
fix/815-release-three
Sep 19, 2026
Merged

bpalermo merged 1 commit into
mainfrom
fix/815-release-three

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Release three was planned as "drop aether.network.network_namespace from 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 or cluster_modified by 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

  • Rollback, permanently — the decisive one. While the listeners stamp both keys, a proxy matches correctly against clusters from either side of release two, which is what makes a downgrade below 0.92.28 hitless. 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; not spiffe://<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.
  • Another full-fleet deploy that re-keys and drains every per-pod filter chain (listeners only — clusters would be untouched, so no warming_clusters wave and no pool drain; cheaper than release two, still not free).
  • An access-log schema migration: accesslog.go's source_netns is the copy's only remaining reader.

The Envoy facts, read from source

The native envoy.network.network_namespace object exists (1.37.0+), is set in the ActiveTcpSocket constructor at accept time for any listener carrying network_namespace_filepath (every per-pod listener here does), 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 with no config knob, which is exactly why the copy exists: only a shared_with_upstream copy can reach TransportSocketOptions::downstreamSharedFilterStateObjects(), which is what a cluster transport_socket_matcher reads. Since release two the copy has no upstream reader, so its SharedWithUpstream: ONCE is 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 called source_netns would 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_netns has 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 are tcp_proxy chains), and both of those HCMs already bake pod_name/pod_namespace in 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); the buildNetworkNamespaceFilterState doc comment (the Envoy facts, the sole remaining reader, the vestigial sharing, the source-vs-destination trap); a note on the source_netns attribute; and docs/runbook.md's version-ordering section — this is the only ordering constraint #815 will ever impose, and keeping both keys is what makes rollback below 0.92.28 safe. NOTES.txt never 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=3 on //agent/internal/xds/cache:all clean.

Closes the release-three item of #815. Refs #824.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

…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
@bpalermo
bpalermo merged commit 3cdeac3 into main Sep 19, 2026
20 checks passed
@bpalermo
bpalermo deleted the fix/815-release-three branch September 19, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant