Skip to content

Conversation

@jgallagher
Copy link
Contributor

Sled subnets are chosen when the sled is added to the cluster (either by RSS or by the "add sled" process), and do not change for the lifetime of the sled's membership. This PR adds that subnet to BlueprintSledConfig, removing one of the remaining bits where BlueprintBuilder::new_based_on() needs information other than the parent blueprint.

This PR is staged on top of #9393.

Diffable,
)]
#[schemars(rename = "Ipv6Subnet")]
pub struct Ipv6Subnet<const N: u8> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, https://docs.rs/oxnet has Ipv6Net but doesn't use a const generic. Nothing to change here but an interesting inconsistency.

Comment on lines +136 to +140
nic: NetworkInterface {
id: uuid::Uuid::new_v4(),
kind: NetworkInterfaceKind::Service {
id: zone_id.into_untyped_uuid(),
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ew, we should use typed UUIDs here :(

.slot_b
.artifact_hash()
.map(ArtifactHash),
subnet: Ipv6Network::from(sled.subnet).into(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sighhh ideally we'd use oxnet here too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants