oxidecomputer / oxidecomputer/omicron

oxide system networking bgp announce returns 500 when it should return conflict

Open
#9,854 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

I got this in testing

$ oxide system networking bgp announce \
    --announce-set v6-announce \
    --address-lot v6-lot \
    --prefix 'fd00:100::/64'
Error Response: status: 500 Internal Server Error; headers: {"content-type": "application/json", "x-request-id": "16fc7c76-f305-417c-b366-8befffc4215b", "content-length": "124", "date": "Wed, 11 Feb 2026 23:07:33 GMT"}; value: Error { error_code: Some("Internal"), message: "Internal Server Error", request_id: "16fc7c76-f305-417c-b366-8befffc4215b" }

looking at the nexus error we see

23:07:31.215Z ERRO a68f27b4-8e08-4ee3-ba54-908ed3bff2cb (dropshot_external): bgp_update_announce_set failed
    authenticated = true
    error = DatabaseError(UniqueViolation, "duplicate key value violates unique constraint \\"bgp_announcement_pkey\\"")
    file = nexus/db-queries/src/db/datastore/bgp.rs:599
    local_addr = 172.30.2.5:80
    method = PUT
    remote_addr = 192.168.1.3:55161
    req_id = 16fc7c76-f305-417c-b366-8befffc4215b
    silo_id = 7f956950-7863-4d83-98df-07f8422f1bf3
    silo_user_id = d699c01e-20bb-49e1-a7a8-e56af329f7ee
    type = silo_user
    uri = /v1/system/networking/bgp-announce-set

so this should return an HTTP conflict with a nice error message and not a 500

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 in nexus/db-queries/src/db/datastore/bgp.rs around line 599 and trace the PUT /v1/system/networking/bgp-announce-set path. Confirm that a duplicate BGP announcement produces an HTTP conflict with a useful error message rather than a 500 Internal Server Error.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend, databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.