atenet: bind the Envoy sockets and Services dual-stack - #911
atenet: bind the Envoy sockets and Services dual-stack#911Yuan Gao (ygao-g) wants to merge 2 commits into
Conversation
|
Bowei Du (@bowei) mind taking a look? |
5308c09 to
3162d63
Compare
5257d6b to
580afef
Compare
378c535 to
5c35bdc
Compare
24055c6 to
6c1910d
Compare
6c1910d to
cff4f76
Compare
be492e5 to
e48bdf3
Compare
The router and egress manifests bind the IPv4 wildcard on every Envoy socket, and neither gateway's Service asks for a second IP family. On a dual-stack cluster the router answers on its IPv4 ClusterIP and on nothing at all for IPv6; on an IPv6-primary cluster the kubelet cannot probe the pod on its only address, so atenet-egress crashloops while Envoy itself starts fine. Both gateways now bind `::` as well and ask for PreferDualStack. That makes them accept IPv6, not reach it: the egress dns_lookup_family, the DNS AAAA path, and atunnel's original-destination lookup stay IPv4. The experimental sdsmint egress variant is untouched.
e48bdf3 to
cf406b1
Compare
Nothing checked that the router's dataplane listeners bind more than an IPv4 socket, and nothing reached an actor over the router's IPv6 ClusterIP. Every other path a test has into the router -- a port-forward, the pods/proxy and services/proxy subresources -- is mediated by the API server, which picks the family, so no existing test could have caught a listener that lost its IPv6 socket. Reads the bound addresses from Envoy's own admin /listeners, and drives an in-cluster probe pod at the router over each ClusterIP in turn. Red until agent-substrate#911 binds those sockets, so this stays a draft until then. The per-family probe skips on a single-stack cluster. Part of agent-substrate#246.
Nothing checked that the router's dataplane listeners bind more than an IPv4 socket, and nothing reached an actor over the router's IPv6 ClusterIP. Every other path a test has into the router -- a port-forward, the pods/proxy and services/proxy subresources -- is mediated by the API server, which picks the family, so no existing test could have caught a listener that lost its IPv6 socket. Reads the bound addresses from Envoy's own admin /listeners, and drives an in-cluster probe pod at the router over each ClusterIP in turn. Red until agent-substrate#911 binds those sockets, so this stays a draft until then. The per-family probe skips on a single-stack cluster. Part of agent-substrate#246.
Nothing checked that the router's dataplane listeners bind more than an IPv4 socket, and nothing reached an actor over the router's IPv6 ClusterIP. Every other path a test has into the router -- a port-forward, the pods/proxy and services/proxy subresources -- is mediated by the API server, which picks the family, so no existing test could have caught a listener that lost its IPv6 socket. Reads the bound addresses from Envoy's own admin /listeners, and drives an in-cluster probe pod at the router over each ClusterIP in turn. Red until agent-substrate#911 binds those sockets, so this stays a draft until then. The per-family probe skips on a single-stack cluster. Part of agent-substrate#246.
The rcode assertions in the previous commit prove the zone stops failing an AAAA query, not that it ever answers one. Nothing checks that the record the zone does publish is the router's IPv6 ClusterIP, so agent-substrate#938 could regress to an empty answer and every existing test would still be green. Kept separate from TestActorDNSZone because it is the only assertion here whose expected result changes with the cluster: it skips wherever atenet-router has a single ClusterIP, which is every cluster until agent-substrate#911 gives the Service a dual-stack policy. Part of agent-substrate#246.
Nothing checked that the router's dataplane listeners bind more than an IPv4 socket, and nothing reached an actor over the router's IPv6 ClusterIP. Every other path a test has into the router -- a port-forward, the pods/proxy and services/proxy subresources -- is mediated by the API server, which picks the family, so no existing test could have caught a listener that lost its IPv6 socket. Reads the bound addresses from Envoy's own admin /listeners, and drives an in-cluster probe pod at the router over each ClusterIP in turn. Red until agent-substrate#911 binds those sockets, so this stays a draft until then. The per-family probe skips on a single-stack cluster. Part of agent-substrate#246.
Nothing checked that the router's dataplane listeners bind more than an IPv4 socket, and nothing reached an actor over the router's IPv6 ClusterIP. Every other path a test has into the router -- a port-forward, the pods/proxy and services/proxy subresources -- is mediated by the API server, which picks the family, so no existing test could have caught a listener that lost its IPv6 socket. Reads the bound addresses from Envoy's own admin /listeners, and drives an in-cluster probe pod at the router over each ClusterIP in turn. Red until agent-substrate#911 binds those sockets, so this stays a draft until then. The per-family probe skips on a single-stack cluster. Part of agent-substrate#246.
| @@ -0,0 +1,86 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
what is this script used for
I think we should just rely on e2e tests to tell us that IPv6 is working.
There was a problem hiding this comment.
Removed. CI does catch it on the egress side — the kubelet probes that admin port, so dropping ipv4_compat means the pod never goes Ready and every run turns red. The router's admin port has no such probe, and the drain reads a refused dial as "Envoy already exited", so I dropped the dependency instead of guarding it: the in-pod callers dial localhost now, with a unit test against an IPv6-only loopback listener.
|
Changes look ok, but can we remove the extra script? |
The router's dataplane health check and the drain sequence dial the Envoy admin interface on the IPv4 loopback, which now depends on the admin socket keeping ipv4_compat set alongside its `::` bind. Losing that fails silently: the drain reads the refused dial as "Envoy already exited" and reports a drain it never performed. Both callers now dial localhost, which resolves to either loopback, so the drain no longer depends on how the socket is spelled. ipv4_compat stays for the egress kubelet probe, where a regression turns any IPv4 run red on the spot.
cf406b1 to
20951c0
Compare
|
Done. The in-pod callers now dial |
The rcode assertions in the previous commit prove the zone stops failing an AAAA query, not that it ever answers one. Nothing checks that the record the zone does publish is the router's IPv6 ClusterIP, so agent-substrate#938 could regress to an empty answer and every existing test would still be green. Kept separate from TestActorDNSZone because it is the only assertion here whose expected result changes with the cluster: it skips wherever atenet-router has a single ClusterIP, which is every cluster until agent-substrate#911 gives the Service a dual-stack policy. Part of agent-substrate#246.
Nothing checked that the router's dataplane listeners bind more than an IPv4 socket, and nothing reached an actor over the router's IPv6 ClusterIP. Every other path a test has into the router -- a port-forward, the pods/proxy and services/proxy subresources -- is mediated by the API server, which picks the family, so no existing test could have caught a listener that lost its IPv6 socket. Reads the bound addresses from Envoy's own admin /listeners, and drives an in-cluster probe pod at the router over each ClusterIP in turn. Red until agent-substrate#911 binds those sockets, so this stays a draft until then. The per-family probe skips on a single-stack cluster. Part of agent-substrate#246.
Nothing checked that the router's dataplane listeners bind more than an IPv4 socket, and nothing reached an actor over the router's IPv6 ClusterIP. Every other path a test has into the router -- a port-forward, the pods/proxy and services/proxy subresources -- is mediated by the API server, which picks the family, so no existing test could have caught a listener that lost its IPv6 socket. Reads the bound addresses from Envoy's own admin /listeners, and drives an in-cluster probe pod at the router over each ClusterIP in turn. Red until agent-substrate#911 binds those sockets, so this stays a draft until then. The per-family probe skips on a single-stack cluster. Part of agent-substrate#246.
Fixes #910
Part of #246
The router and egress manifests bind the IPv4 wildcard on every Envoy socket, and neither gateway's Service asks for a second IP family. On a dual-stack cluster the router answers on its IPv4 ClusterIP and on nothing at all for IPv6; on an IPv6-primary cluster the kubelet cannot probe the pod on its only address, so
atenet-egresscrashloops while Envoy itself starts fine.Both gateways now bind
::as well, and both Services ask forPreferDualStack. A newhack/verifycheck guards theipv4_compatflag that the in-pod loopback callers depend on, since nothing else in the tree reads these manifests. The experimentalatenet-egress-with-sdsmint.yamlvariant is deliberately out of scope.This makes both gateways accept IPv6; it does not make them reach IPv6 destinations. The egress
dns_lookup_family, the DNS AAAA path, and atunnel's original-destination lookup stay IPv4, and are tracked in #246 and #686.Testing
CI has no IP-family matrix, so the green e2e run here is the IPv4 regression check and nothing more. The other two families were verified by hand on kind, using
IP_FAMILYfrom #877.[::]:443socket. Reverting only the two bind lines turns those assertions red, so they are not passing vacuously.ipv4_compatwas read from/config_dump—/listenersnever emits it.atenet-egressgoes from1/2 CrashLoopBackOff(64 restarts, startup probe refused) to2/2 Running, andTestActorDirectAccesspasses, including through the router's ingress.TestActorEgressstill fails inside the actor's netns, which is ateomnet: enable IPv6 forwarding in worker pod netns #979's scope.🤖 Generated with Claude Code