My naive attempts at using link-local uplink addresses failed due to this validation code on the insert path:
|
// Ensure a lot block exists with the requested address. |
|
|
|
let block = block_dsl::address_lot_block |
|
.filter(address_lot_block::address_lot_id.eq(lot_id)) |
|
.filter(address_lot_block::first_address.le(inet)) |
|
.filter(address_lot_block::last_address.ge(inet)) |
|
.select(AddressLotBlock::as_select()) |
|
.limit(1) |
|
.first_async::<AddressLotBlock>(conn) |
|
.await |
|
.map_err(|_e| { |
|
ReserveBlockTxnError::CustomError( |
|
ReserveBlockError::AddressNotInLot, |
|
) |
|
})?; |
@rcgoodfellow pointed me to a working config-rss.toml in a4x2: https://github.com/oxidecomputer/testbed/blob/14a77225190af5a41cb4f7f2d7f7785e9c840bf5/a4x2/config/rss-pieces/rack-network-bgp-unnumbered.toml
Critically, that config defines the infrastructure address lot as
infra_ip_first = "::"
infra_ip_last = "::"
which allows us past the above address lot check. However, we're only using :: as a sentinel value as a way to say "use an automatically generated link-local address". We should either skip the address lot check for link-locals, or address lots should have a setting for "should link locals be allowed" and we check that instead.
This should be cleaner to implement after #10082 lands - we should be able to push an UplinkAddress down into address_lot::try_reserve_block() instead of an IpNetwork.
My naive attempts at using link-local uplink addresses failed due to this validation code on the insert path:
omicron/nexus/db-queries/src/db/datastore/address_lot.rs
Lines 340 to 354 in 1db108a
@rcgoodfellow pointed me to a working
config-rss.tomlin a4x2: https://github.com/oxidecomputer/testbed/blob/14a77225190af5a41cb4f7f2d7f7785e9c840bf5/a4x2/config/rss-pieces/rack-network-bgp-unnumbered.tomlCritically, that config defines the infrastructure address lot as
which allows us past the above address lot check. However, we're only using
::as a sentinel value as a way to say "use an automatically generated link-local address". We should either skip the address lot check for link-locals, or address lots should have a setting for "should link locals be allowed" and we check that instead.This should be cleaner to implement after #10082 lands - we should be able to push an
UplinkAddressdown intoaddress_lot::try_reserve_block()instead of anIpNetwork.