Repository navigation
docs(038): Phase 0 is settled — the netns-bound transparent socket sees the VIP - #940
Merged
Merged
Conversation
…es the VIP Answers proposal 038's one open premise, on a node, which unblocks Phase 1. Refs #916. THE QUESTION Does a UDP socket created INSIDE a pod netns (via setns) but READ from another netns still observe the pre-TPROXY destination? That is aether's real shape: the proxy is hostNetwork and binds capture listeners into each pod's netns via network_namespace_filepath. THE ANSWER: yes. C1 in-netns create + read, mark-and-divert ipi_addr=10.250.0.7 (the VIP) C2 REDIRECT, in-netns read ipi_addr=127.0.0.1 (rewritten) C3 no capture rule nothing delivered MAIN create in-netns via setns, read outside ipi_addr=10.250.0.7 (the VIP) main-worker-04, kernel 6.18.34-talos. The rig tests the KERNEL half directly, on the socket Envoy would use, rather than standing up Envoy: `transparent: true` applying to a datagram socket, and Envoy reading ipi_addr via addressFromMessage, were already established by the 2026-09-23 spike. The only open question was the setns interaction, and isolating it removes Envoy's config surface as a confound. Worth stating plainly because it means Phase 0 is answered, but not by running Envoy. C2 IS THE CONTROL THAT MATTERS, AND IT FAILED SILENTLY THE FIRST TIME C2 proves ipi_addr reports the REAL post-NAT header rather than echoing the address that was sent. C3 is weaker: it only shows delivery needs a rule. The 2026-09-23 attempt was unusable because its control agreed with its negative result. The first run of THIS script lost C2 the same way and more quietly: `redirect` is terminal in nftables, so a trailing `counter` invalidated the rule, nothing installed, C2 became an accidental duplicate of C3 -- and still satisfied an assertion written as "C2 must not report the VIP", which a no-delivery None passes trivially. The run printed an answer it had not earned. So the script now raises on any failed setup command instead of logging and continuing, verifies with `nft list ruleset` that the rule is really present before measuring, and treats no-delivery in C2 as a BROKEN RIG rather than a pass. IT BINDS THE SERVICE PORT, NOT THE CAPTURE PORT nftables `tproxy` is prerouting-only, so locally-originated pod egress uses mark-and-divert, which does NOT rewrite the destination port. A listener on any other port receives nothing -- the constraint that forces listener-per-port in Phase 2, arrived at here independently. KEPT AS AN ARTIFACT e2e/spike/ holds the script, the Job and a README, because a spike nobody can re-run is a claim rather than evidence. The Job needs NET_ADMIN + SYS_ADMIN and NO host namespaces and no `privileged: true` -- the pod's own netns is the outer one. It runs in aether-system because that namespace already enforces PodSecurity `privileged`; the rest of the cluster enforces `baseline`, which refuses these capabilities. SYS_ADMIN is the single reason a rootless workstation rig cannot host the test: setns() back needs CAP_SYS_ADMIN in the original netns's user namespace. Exit 0 = yes, 1 = no (038 stops, #916 stands as a limit), 2 = rig broken. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
| # it does not own. A missing capability fails LOUDLY here. | ||
| s.setsockopt(socket.IPPROTO_IP, IP_TRANSPARENT, 1) | ||
| s.setsockopt(socket.IPPROTO_IP, socket.IP_PKTINFO, 1) | ||
| s.bind(("0.0.0.0", SVC_PORT)) |
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.
Answers proposal 038's one open premise, on a node. Phase 1 is unblocked. Refs #916.
The question
Does a UDP socket created inside a pod netns (via
setns) but read from another netns still observe the pre-TPROXY destination? That is aether's real shape — the proxy ishostNetworkand binds capture listeners into each pod's netns vianetwork_namespace_filepath.The answer: yes
main-worker-04, kernel 6.18.34-talos.Scope, stated plainly
The rig tests the kernel half directly, on the socket Envoy would use, rather than standing up Envoy.
transparent: trueapplying to a datagram socket, and Envoy readingipi_addrviaaddressFromMessage, were already established by the 2026-09-23 spike; the only open question was thesetnsinteraction, and isolating it removes Envoy's config surface as a confound.So Phase 0 is answered — but not by running Envoy, and the proposal now says so.
C2 is the control that matters, and it failed silently the first time
C2 proves
ipi_addrreports the real post-NAT header rather than echoing the address that was sent. C3 is weaker: it only shows delivery needs a rule.The 2026-09-23 attempt was unusable because its control agreed with its negative result. The first run of this script lost C2 the same way, and more quietly:
redirectis terminal in nftables, so a trailingcounterinvalidated the rule, nothing installed, and C2 became an accidental duplicate of C3 — while still satisfying an assertion written as "C2 must not report the VIP", which a no-deliveryNonepasses trivially. That run printed an answer it had not earned.The script now:
nft list rulesetthat the rule is really present before measuring;It binds the service port, not the capture port
nftables
tproxyis prerouting-only, so locally-originated pod egress uses mark-and-divert, which does not rewrite the destination port. A listener on any other port receives nothing — the constraint that forces listener-per-port in Phase 2, arrived at here independently of the earlier spike row that found it.Kept as an artifact
e2e/spike/holds the script, the Job and a README, because a spike nobody can re-run is a claim rather than evidence.The Job needs
NET_ADMIN+SYS_ADMINand no host namespaces and noprivileged: true— the pod's own netns is the outer one. My first attempt asked forhostNetwork/hostPID/privilegedand was refused; on reflection none of it was needed, and the narrower pod is a better experiment.It runs in
aether-systembecause that namespace already enforces PodSecurityprivileged(the rest of the cluster enforcesbaseline, which refuses these capabilities) — no security setting was changed to make this work.SYS_ADMINis the single reason a rootless workstation rig cannot host the test:setns()back needsCAP_SYS_ADMINin the original netns's user namespace.Exit
0= yes,1= no (038 stops and #916 stands as a documented limit),2= rig broken.What this does not deliver
Nothing about east-west QUIC, which 038 declines on security-model grounds, and nothing about per-service selection itself — that is Phase 2. This only removes the gate.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr