oxidecomputer / oxidecomputer/omicron

don't hardcode service port numbers when available from SRV records

Open
#6,363 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

in https://github.com/oxidecomputer/omicron/pull/6320 i found a few places where we construct a SocketAddr (or SocketAddrV6) from an IP that we retrieve via a SRV record, but a hardcoded port. there's also a port in the SRV record; either it's authoritative and we should use it, or we've tied two services together by address, with one part implicit in source.

in these cases, we might either be able to add SRV records or maybe even use existing records:

  • wicket assumes that the techport proxy can be done on the same IP as Nexus' API, just a different port. if there isn't a SRV record here, might be able to add one?
  • we assume the CRDB admin service listens on the same IP as CRDB itself, but we could have a distinct SRV to point to the admin service directly.
  • we look up addresses for MGS here via ServiceName::Dendrite, but there's a ServiceName::ManagementGatewayService we could use instead. this might just be a typo, with things otherwise set up for MGS.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the SocketAddr construction in wicketd/src/nexus_proxy.rs, nexus/reconfigurator/execution/src/omicron_zones.rs, and sled-agent/src/bootstrap/early_networking.rs. Trace the SRV lookups and the ServiceName definitions, then determine which records or service names apply. Done means these connections no longer pair SRV-resolved IPs with unrelated hardcoded ports or service identities.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, networking
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.