Skip to content

fix(extension-server): unique connector domain to stop Envoy config NACK#214

Merged
scotwells merged 3 commits into
mainfrom
fix/connector-duplicate-localhost-domain
Jun 23, 2026
Merged

fix(extension-server): unique connector domain to stop Envoy config NACK#214
scotwells merged 3 commits into
mainfrom
fix/connector-duplicate-localhost-domain

Conversation

@scotwells

@scotwells scotwells commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What

Connector tunnels intermittently get stuck on the 503 "Tunnel not online" page even when the connector is online, and new tunnels sometimes never get a route (404).

Why

Online connector routing appended the connector's backend host to the shared HTTP route config's virtual-host domains. Tunnels almost always target localhost, so multiple connectors collide on the same localhost domain. Envoy rejects the whole xDS snapshot (code 13, "Only unique values for domains are permitted") and freezes config — re-translations are computed but never applied.

Fix

Append a unique per-connector synthetic domain (<vhost>.connector.internal) instead of the raw backend host. Vhost names are already unique within a route config, so it can't collide. The internal tunnel listener routes on cluster metadata, not this domain, so routing is unchanged.

Validation

  • Unit tests incl. a regression test (two connectors sharing a backend host → no duplicate domain); build green.
  • Deployed to staging (infra #2793): 4 concurrent localhost tunnels all program online and serve 200, http-80 has zero duplicate domains, no code 13 NACKs.

Related

🤖 Generated with Claude Code

scotwells and others added 3 commits June 23, 2026 15:05
Online connector routing appended the connector's backend target host to the
virtual host's domains. Tunnels overwhelmingly target "localhost", so every
connector's virtual host received the same "localhost" domain. On a shared route
configuration (the HTTP listener that merges all gateways) those duplicate, and
Envoy rejects the entire xDS snapshot ("Only unique values for domains are
permitted"). A single collision freezes config updates fleet-wide: new tunnels
never program a route, and connectors that come online never leave the offline
503 program.

Append a synthetic domain derived from the virtual host name instead. Envoy
already requires virtual host names to be unique within a route configuration,
so the domain can never collide. The internal tunnel listener routes on cluster
metadata (tunnel address + endpoint id), not on this domain, so a synthetic
value preserves tunnel routing.

Adds a regression test asserting two online connectors that share a backend host
on one route configuration produce no duplicate domain.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rewrite the connector domain comments to lead with the design intent — connector
domains must be unique within a merged-listener namespace — and name the
<virtual-host>.connector.internal format, dropping the mechanical detail.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace "GAP-1b"/"design §" references with plain descriptions of what each
assertion guards. The comments already explain the behavior; the tags added
nothing for a future reader.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@scotwells scotwells marked this pull request as ready for review June 23, 2026 21:08
@scotwells scotwells requested review from a team and savme June 23, 2026 21:22
@scotwells scotwells merged commit 012e769 into main Jun 23, 2026
11 checks passed
@scotwells scotwells deleted the fix/connector-duplicate-localhost-domain branch June 23, 2026 21:24
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.

2 participants