Skip to content

fix(agent): don't HTTP-liveness-gate TCP floor services - #305

Merged
bpalermo merged 1 commit into
mainfrom
fix/tcp-floor-liveness
Jun 24, 2026
Merged

bpalermo merged 1 commit into
mainfrom
fix/tcp-floor-liveness

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Definitive root cause of the TCP-floor 000: tcp:<svc> EDS endpoints were UNHEALTHY (aether's delegated liveness is an HTTP probe that can't pass for a raw-mTLS-passthrough TCP service), and HealthyPanicThreshold:0 gives an all-unhealthy cluster zero traffic. The transport-socket fixes were red herrings. Fix: liveness loop treats PROTOCOL_TCP pods as healthy (TCP-connect liveness is a follow-up). Validate: echo-tcp → 200.

…or blocker)

Definitive root cause of the TCP-floor passthrough resetting (curl 000), after the
transport-socket fixes turned out to be red herrings: the tcp:<svc> EDS endpoints
were eds_health_status=UNHEALTHY, and NewTCPServiceCluster's HealthyPanicThreshold=0
gives an all-unhealthy cluster ZERO traffic (upstream_cx_none_healthy). The mTLS
never failed — the LB just had no healthy host.

Why unhealthy: aether's delegated liveness is HTTP — the agent promotes an EDS-mode
endpoint to HEALTHY only when appHealth(HealthProbeClusterName) (an HTTP probe) passes.
That can't happen for a TCP service (raw mTLS passthrough, no HTTP health surface),
so its endpoints stay UNHEALTHY forever.

Fix: the liveness loop treats protocol==PROTOCOL_TCP pods as healthy (skips the HTTP
app-health probe). A protocol-aware TCP-connect liveness is a follow-up. Also fixed a
stale ingress.go comment from #304 (the inbound floor is now the default chain, not
ALPN "aether-tcp").

Validate on talos: echo-tcp.aether.internal:18081 (HTTP over the mTLS TCP floor) -> 200.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S
@bpalermo
bpalermo merged commit c6187d0 into main Jun 24, 2026
9 checks passed
@bpalermo
bpalermo deleted the fix/tcp-floor-liveness branch June 24, 2026 22:16
bpalermo added a commit that referenced this pull request Jun 24, 2026
…d HCM → 503) (#306)

With the endpoints healthy (#305) and the floor connecting (upstream_cx_total>0),
echo-tcp still 503'd: the inbound HCM was handling the connection
(listener.inbound.http.inbound.downstream_rq_5xx), not the TCP floor.

Cause: captureTCPClusters passed httpEntry.sni (the destination port, e.g. "8080")
to the TCP floor cluster's transport socket. So the egress floor connection presented
SNI="8080", and the destination inbound's per-port HCM chain (server_names:["8080"])
out-ranks the inbound TCP floor's default chain (Envoy precedence: server_names >
application_protocols > default). The connection landed on the HCM, which can't parse
the raw TCP stream → 503.

Fix: pass an empty SNI for the TCP floor cluster. With no SNI, the no-ALPN floor
connection (post #304) matches no per-port chain and no "h2" chain, so it falls to the
inbound default TCP floor chain (tcp_proxy → app loopback) — the actual passthrough.

This is the last piece of the floor data path (with #305 + #304). Validate on talos:
echo-tcp.aether.internal:18081 (HTTP over the mTLS TCP floor) -> 200.


Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S

Co-authored-by: Claude Opus 4.8 <[email protected]>
bpalermo added a commit that referenced this pull request Jun 25, 2026
…es (#312)

Replaces the #305 stopgap (force PROTOCOL_TCP endpoints HEALTHY, skip the probe)
with a real liveness signal. The HTTP delegated probe is inapplicable to a non-HTTP
app, but the rest of the pipeline is protocol-agnostic above the probe: the agent
does an HTTP GET to the health gateway whose health_check filter reflects the per-pod
probe cluster's membership. Only the active checker on that cluster is HTTP-specific.

- NewAppHealthProbeCluster gains a `tcp` flag: TCP services get a connect-only
  TcpHealthCheck (empty send/receive) against 127.0.0.1:<appPort> instead of the
  HTTP GET. A successful connect = healthy.
- listener.go passes the pod's protocol (endpoint.aether.io/protocol) through.
- liveness.go: drop the #305 TCP skip — the loop now probes TCP pods like everyone
  else and reads the connect-health the gateway reflects. EDS-mode flow is unchanged:
  TCP endpoints register UNHEALTHY, promote on first successful connect (warmup grace
  covers startup), demote when the app stops accepting connections.

A dead TCP app (process up but not listening) is now detected instead of assumed
healthy. The agent-side appHealth and the gateway are untouched (protocol-agnostic).

Validate on talos: TCP service app up -> endpoint HEALTHY + floor 200; stop the app's
listener -> endpoint UNHEALTHY (connect fails) -> traffic stops; restart -> recovers.


Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S

Co-authored-by: Claude Opus 4.8 <[email protected]>
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