Skip to content

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

@rcgoodfellow

Description

@rcgoodfellow

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiRelated to the API.networkingRelated to the networking.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions