-
Notifications
You must be signed in to change notification settings - Fork 67
Description
While looking how to expand an IP pool on an Oxide rack I noticed that both the bgp_create_announce_set and bgp_update_announce_set functions set address_lot_block_id to bas.identity.id, which is the announce set's ID instead of the address lot block ID.
omicron/nexus/db-queries/src/db/datastore/bgp.rs
Lines 646 to 650 in b234cfc
| let an = BgpAnnouncement { | |
| announce_set_id: db_as.id(), | |
| address_lot_block_id: bas.identity.id, | |
| network: a.network.into(), | |
| }; |
The external API expects the user to pass address_lot_block, which confused me since I was looking to do a read, modify, write cycle on an announce set to update it with a new network and leave the existing networks alone.
omicron/nexus/types/src/external_api/params.rs
Lines 2645 to 2653 in b234cfc
| /// A BGP announcement tied to a particular address lot block. | |
| #[derive(Clone, Debug, Deserialize, Serialize, JsonSchema)] | |
| pub struct BgpAnnouncementCreate { | |
| /// Address lot this announcement is drawn from. | |
| pub address_lot_block: NameOrId, | |
| /// The network being announced. | |
| pub network: IpNet, | |
| } |
From what I could tell this address lot block ID is ignored entirely. Is this a bug that should instead be resolving the actual address block ID?