Skip to content

fix(gcp): give every data center its own DNS records - #628

Open
NJona wants to merge 1 commit into
multi-dc-05-per-datacenter-infrafrom
multi-dc-06-per-datacenter-dns
Open

fix(gcp): give every data center its own DNS records#628
NJona wants to merge 1 commit into
multi-dc-05-per-datacenter-infrafrom
multi-dc-06-per-datacenter-dns

Conversation

@NJona

@NJona NJona commented Jul 31, 2026

Copy link
Copy Markdown
Member

Workspaces resolve per data center, and so does the platform: the frontend asks <dc-id>.<codesphere.domain> for the configuration of the data center a workspace lives in. OMS only created cs.<base-domain> and its wildcard, both pointing at the first data center's gateway, so with more than one data center the second one's endpoint resolved to the first's gateway, which has no route for that host. Every browser request for it was reset — and since the frontend fetches that config before rendering anything, the whole UI failed.

EnsureDNSRecords now creates, per data center, its workspace hosting names and SSH proxy name pointing at its own public gateway and SSH proxy, plus <dc-id>.cs.<base-domain> and its wildcard pointing at its own platform gateway.

Review notes

  • The per-data-center platform names are only created when there is more than one data center: a single one is the primary, which cs.<base-domain> already resolves to. So single-DC bootstraps still create exactly the same five records.
  • The created records are recorded in the infra file so cleanup deletes exactly those. DeleteDNSRecordSets therefore takes the record list instead of a base domain; cleanup falls back to deriving the names for older infra files and for a cleanup driven only by --project-id.
  • Verified against a live two-data-center instance: adding these two records was what made the second data center reachable.

Part of the oms beta bootstrap-gcp --multi-dc stack (10 PRs). Merge in order; each PR is based on its predecessor.

Workspaces resolve per data center, and so does the platform: the
frontend asks <dc-id>.<codesphere.domain> for the configuration of the
data center a workspace lives in. OMS only created cs.<base-domain> and
its wildcard, both pointing at the first data center's gateway, so with
more than one data center the second one's endpoint resolved to the
first's gateway, which has no route for that host — every browser
request for it was reset, and since the frontend fetches that config
before rendering, the whole UI failed.

EnsureDNSRecords now creates, per data center, its workspace hosting
names and SSH proxy name pointing at its own public gateway and SSH
proxy, plus <dc-id>.cs.<base-domain> and its wildcard pointing at its
own platform gateway. The per-data-center platform names are only
created when there is more than one data center: a single one is the
primary, which cs.<base-domain> already resolves to.

The records that were created are recorded in the infra file, so cleanup
deletes exactly those. DeleteDNSRecordSets therefore takes the record
list instead of a base domain, and cleanup falls back to deriving the
names for infra files written before this and for a cleanup driven only
by --project-id.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Jona Neef <Jona.Neef.97@gmail.com>
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