oxidecomputer / oxidecomputer/omicron
VPC router routes can have duplicate destinations
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 572
- Forks
- 97
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 96
Description
I don't know if this is actually a problem — I have an ancient todo list item saying to create an issue about it, presumably from when we implemented the relevant page in the console.
A user can create two custom routes in the same VPC router with the same destination but different targets, as long as the names differ. The DB only enforces uniqueness on (vpc_router_id, name):
router_create_route_on_connection doesn't check for an existing route with the same destination:
Downstream, routes get pushed to OPTE as a HashSet<ResolvedVpcRoute> where ResolvedVpcRoute is { dest, target }:
Two routes with identical (dest, target) get deduped, but two routes with the same dest and different target both end up in the set.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with schema/crdb/dbinit.sql, router_create_route_on_connection in nexus/db-queries/src/db/datastore/vpc.rs, and the ResolvedVpcRoute and VPC route task code linked in the issue. Trace how duplicate destinations reach OPTE and identify the expected handling for different targets. Done means the behavior is defined and consistently enforced or handled, with coverage for duplicate destinations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, databases, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100