Skip to content

Using link-local addresses shouldn't require an address lot containing the address :: #10103

@jgallagher

Description

@jgallagher

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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