Repository navigation
fix(agent): drop waypointed endpoints from the UDP load assignment - #939
Merged
Merged
Conversation
Fixes #932. UDPLoadAssignment clone-and-patched the service's SHARED bare-name load assignment, rewriting exactly two fields (protocol, port) and carrying everything else through proto.Clone. For a waypointed endpoint that is wrong in a way the rewrite cannot fix. src's address for a remote-cluster endpoint is not the pod. The HTTP path rewrote it to the destination NODE's IP plus the east/west tunnel port (proposal 019) and marked it with waypoint subset metadata. Rewriting only the PORT left the node IP in place, so the datagram went to a host that was never the backend -- silently, because the UDP floor has no transport socket and nothing asserts the reply. There is no correct address to substitute. The tunnel is a TCP mTLS SNI forwarder with no datagram counterpart, so a waypointed backend is genuinely unreachable over the UDP floor. So drop it, which makes the state legible: the service ends up with no routable endpoint, and that is exactly what udp_no_healthy_backend counts and logs (#931). A service reachable ONLY through the waypoint therefore reports itself instead of delivering to the wrong machine. Two other fields stop surviving the clone: Metadata the udp: cluster sets no LbSubsetConfig, so an envoy.lb subset key is inert -- and an inert subset key on a cluster that does no subset LB invites someone to think it is load bearing. HealthCheckConfig it opts an endpoint out of an ACTIVE health check, and this cluster has none, so it describes a mechanism that does not exist here. Priority is flattened to 0: without the locality-priority set the HTTP path builds, a lone endpoint left at a non-zero priority is a cluster whose only host sits in an empty fallback tier, which Envoy will not use. HealthStatus DOES still survive, and that is deliberate. Before #936 it was meaningless here (a TCP probe of a UDP port could only ever fail); now the probe targets the mesh inbound port, which a UDP pod really does answer, so the verdict is a real signal. The tests also pin that src is not mutated -- it is the shared assignment, and the old code patched the clone but the next reader of that habit might not. 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.
Fixes #932.
UDPLoadAssignmentclone-and-patched the service's shared bare-name load assignment, rewriting exactly two fields (protocol, port) and carrying everything else throughproto.Clone. For a waypointed endpoint that is wrong in a way the rewrite cannot fix.src's address for a remote-cluster endpoint is not the pod. The HTTP path rewrote it to the destination node's IP plus the east/west tunnel port (proposal 019) and marked it with waypoint subset metadata. Rewriting only the port left the node IP in place, so the datagram went to a host that was never the backend — silently, because the UDP floor has no transport socket and nothing asserts the reply.Why drop rather than fix the address
There is no correct address to substitute. The tunnel is a TCP mTLS SNI forwarder with no datagram counterpart, so a waypointed backend is genuinely unreachable over the UDP floor.
Dropping makes that legible: the service ends up with no routable endpoint, which is exactly what
udp_no_healthy_backendcounts and logs (#937). So a waypoint-only service now reports itself instead of delivering to the wrong machine — the two fixes compose.Two other fields stop surviving
Metadataudp:cluster sets noLbSubsetConfig, so anenvoy.lbsubset key is inert — and an inert subset key on a cluster that does no subset LB invites someone to think it is load bearingHealthCheckConfigPriorityis flattened to 0: without the locality-priority set the HTTP path builds, a lone endpoint left at a non-zero priority is a cluster whose only host sits in an empty fallback tier, which Envoy will not use.What deliberately still survives
HealthStatus. Before #936 it was meaningless here — a TCP probe of a UDP port could only ever fail, which was #931. Now the probe targets the mesh inbound port, which a UDP pod really does answer, so the verdict is a real signal and should propagate.Tests
Both directions, plus one thing the old code got away with: the tests assert
srcis not mutated. It is the shared bare-name assignment; the old code patched the clone, but the next reader of that habit might not.bazel test //...— 109/109. Lint clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr