Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5b26fc4
builder: add method to add boundary NTP directly instead of always pr…
jgallagher Nov 12, 2025
5cef8ac
use builder in rack_set_initialized_with_services()
jgallagher Nov 12, 2025
6baa021
rack_set_initialized_missing_service_pool_ip_throws_error()
jgallagher Nov 12, 2025
d00b536
rack_set_initialized_with_many_nexus_services()
jgallagher Nov 12, 2025
8302b01
rack_set_initialized_with_ipv6_public_addresses()
jgallagher Nov 12, 2025
ce1c5dc
rack_set_initialized_overlapping_ips_throws_error()
jgallagher Nov 12, 2025
fc4658d
revert now-unneccesary visibility change
jgallagher Nov 12, 2025
3373282
add BlueprintBuilder::build_empty()
jgallagher Nov 12, 2025
efd74fa
example system: start with truly empty blueprint
jgallagher Nov 12, 2025
4b9eeaf
use build_empty() where we can
jgallagher Nov 12, 2025
ff1b86a
use example system in test_ensure_external_networking_works_with_good…
jgallagher Nov 12, 2025
8d968c5
test_external_dns_external_ips_specified_by_rack_setup()
jgallagher Nov 12, 2025
3efe2c0
test_default_cockroach_admin_addrs_from_blueprint()
jgallagher Nov 12, 2025
9c30cd7
remove build_empty_with_sleds()
jgallagher Nov 12, 2025
de048ec
expectorate
jgallagher Nov 12, 2025
263cd1f
clippy
jgallagher Nov 12, 2025
c2e6bed
add sled subnet to blueprint (planner tests pass)
jgallagher Nov 17, 2025
f33e983
expectorate: reconfigurator-cli tests
jgallagher Nov 17, 2025
831d728
update RSS to include sled subnet in blueprint
jgallagher Nov 17, 2025
e43a038
add subnet column to bp_sled_metadata table
jgallagher Nov 17, 2025
9d71e86
db migration
jgallagher Nov 17, 2025
ef51fa2
minor test fixes
jgallagher Nov 17, 2025
660056e
update lockstep openapi
jgallagher Nov 18, 2025
aa85885
cargo fmt
jgallagher Nov 18, 2025
c316607
Merge branch 'main' into john/blueprint-store-sled-subnet
jgallagher Nov 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions common/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use crate::api::external::{self, Error};
use crate::policy::INTERNAL_DNS_REDUNDANCY;
use daft::Diffable;
use ipnetwork::Ipv6Network;
use oxnet::{Ipv4Net, Ipv6Net};
use schemars::JsonSchema;
Expand Down Expand Up @@ -273,12 +274,19 @@ pub const SLED_RESERVED_ADDRESSES: u16 = 32;
Eq,
PartialOrd,
Ord,
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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a newtype around oxnet::Ipv6Net, actually! All it does is add the const generic.

net: Ipv6Net,
}

impl<const N: u8> std::fmt::Display for Ipv6Subnet<N> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
self.net.fmt(f)
}
}

impl<const N: u8> Ipv6Subnet<N> {
pub fn new(addr: Ipv6Addr) -> Self {
// Create a network with the compile-time prefix length.
Expand All @@ -302,6 +310,14 @@ impl<const N: u8> From<Ipv6Network> for Ipv6Subnet<N> {
}
}

impl<const N: u8> From<Ipv6Subnet<N>> for Ipv6Network {
fn from(net: Ipv6Subnet<N>) -> Self {
// Ipv6Subnet::new() asserts that `N` is a valid IPv6 prefix, so it's
// okay to unwrap here.
Self::new(net.net.prefix(), N).unwrap()
}
}

// We need a custom Deserialize to ensure that the subnet is what we expect.
impl<'de, const N: u8> Deserialize<'de> for Ipv6Subnet<N> {
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
Expand Down
20 changes: 16 additions & 4 deletions dev-tools/omdb/tests/successes.out
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,10 @@ stdout:
blueprint ......<REDACTED_BLUEPRINT_ID>.......
parent: <none>

sled: ..........<REDACTED_UUID>........... (active, config generation 2)
sled: ..........<REDACTED_UUID>...........
state::::::::::::: active
config generation: 2
subnet:::::::::::: ::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -1591,7 +1594,10 @@ parent: <none>



sled: ..........<REDACTED_UUID>........... (active, config generation 2)
sled: ..........<REDACTED_UUID>...........
state::::::::::::: active
config generation: 2
subnet:::::::::::: ::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -1676,7 +1682,10 @@ stdout:
blueprint ......<REDACTED_BLUEPRINT_ID>.......
parent: <none>

sled: ..........<REDACTED_UUID>........... (active, config generation 2)
sled: ..........<REDACTED_UUID>...........
state::::::::::::: active
config generation: 2
subnet:::::::::::: ::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -1715,7 +1724,10 @@ parent: <none>



sled: ..........<REDACTED_UUID>........... (active, config generation 2)
sled: ..........<REDACTED_UUID>...........
state::::::::::::: active
config generation: 2
subnet:::::::::::: ::/64

host phase 2 contents:
------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ planning report:
blueprint 8da82a8e-bf97-4fbd-8ddd-9f6462732cf1
parent: dbcbd3d6-41ff-48ae-ac0b-1becc9b2fd21

sled: 00320471-945d-413c-85e7-03e091a70b3c (active, config generation 1)
sled: 00320471-945d-413c-85e7-03e091a70b3c
state::::::::::::: active
config generation: 1
subnet:::::::::::: fd00:1122:3344:104::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -86,7 +89,10 @@ parent: dbcbd3d6-41ff-48ae-ac0b-1becc9b2fd21



sled: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c (active, config generation 2)
sled: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:102::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -151,7 +157,10 @@ parent: dbcbd3d6-41ff-48ae-ac0b-1becc9b2fd21



sled: 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6 (active, config generation 2)
sled: 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:101::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -213,7 +222,10 @@ parent: dbcbd3d6-41ff-48ae-ac0b-1becc9b2fd21



sled: d81c6a84-79b8-4958-ae41-ea46c9b19763 (active, config generation 2)
sled: d81c6a84-79b8-4958-ae41-ea46c9b19763
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:103::/64

host phase 2 contents:
------------------------
Expand Down
35 changes: 28 additions & 7 deletions dev-tools/reconfigurator-cli/tests/output/cmds-example-stdout
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ zpools (10):
blueprint ade5749d-bdf3-4fab-a8ae-00bea01b3a5a
parent: 02697f74-b14a-4418-90f0-c28b2a3a6aa9

sled: 2eb69596-f081-4e2d-9425-9994926e0832 (active, config generation 2)
sled: 2eb69596-f081-4e2d-9425-9994926e0832
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:102::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -196,7 +199,10 @@ parent: 02697f74-b14a-4418-90f0-c28b2a3a6aa9



sled: 32d8d836-4d8a-4e54-8fa9-f31d79c42646 (active, config generation 2)
sled: 32d8d836-4d8a-4e54-8fa9-f31d79c42646
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:103::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -307,7 +313,10 @@ parent: 02697f74-b14a-4418-90f0-c28b2a3a6aa9



sled: 89d02b1b-478c-401a-8e28-7a26f74fa41b (active, config generation 2)
sled: 89d02b1b-478c-401a-8e28-7a26f74fa41b
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:101::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -497,7 +506,10 @@ zpools (4):
blueprint ade5749d-bdf3-4fab-a8ae-00bea01b3a5a
parent: 02697f74-b14a-4418-90f0-c28b2a3a6aa9

sled: 89d02b1b-478c-401a-8e28-7a26f74fa41b (active, config generation 2)
sled: 89d02b1b-478c-401a-8e28-7a26f74fa41b
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:101::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -1151,7 +1163,10 @@ T ENA ID PARENT
blueprint ade5749d-bdf3-4fab-a8ae-00bea01b3a5a
parent: 02697f74-b14a-4418-90f0-c28b2a3a6aa9

sled: 2eb69596-f081-4e2d-9425-9994926e0832 (active, config generation 2)
sled: 2eb69596-f081-4e2d-9425-9994926e0832
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:102::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -1203,7 +1218,10 @@ parent: 02697f74-b14a-4418-90f0-c28b2a3a6aa9



sled: 32d8d836-4d8a-4e54-8fa9-f31d79c42646 (active, config generation 2)
sled: 32d8d836-4d8a-4e54-8fa9-f31d79c42646
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:103::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -1255,7 +1273,10 @@ parent: 02697f74-b14a-4418-90f0-c28b2a3a6aa9



sled: 89d02b1b-478c-401a-8e28-7a26f74fa41b (active, config generation 2)
sled: 89d02b1b-478c-401a-8e28-7a26f74fa41b
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:101::/64

host phase 2 contents:
------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ loaded example system with:
blueprint 3f00b694-1b16-4aaa-8f78-e6b3a527b434
parent: 06c88262-f435-410e-ba98-101bed41ec27

sled: 711ac7f8-d19e-4572-bdb9-e9b50f6e362a (active, config generation 2)
sled: 711ac7f8-d19e-4572-bdb9-e9b50f6e362a
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:103::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -125,7 +128,10 @@ parent: 06c88262-f435-410e-ba98-101bed41ec27



sled: 9dc50690-f9bf-4520-bf80-051d0f465c2c (active, config generation 2)
sled: 9dc50690-f9bf-4520-bf80-051d0f465c2c
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:102::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -236,7 +242,10 @@ parent: 06c88262-f435-410e-ba98-101bed41ec27



sled: a88790de-5962-4871-8686-61c1fd5b7094 (active, config generation 2)
sled: a88790de-5962-4871-8686-61c1fd5b7094
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:101::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -549,7 +558,10 @@ external DNS:
blueprint 366b0b68-d80e-4bc1-abd3-dc69837847e0
parent: 3f00b694-1b16-4aaa-8f78-e6b3a527b434

sled: 711ac7f8-d19e-4572-bdb9-e9b50f6e362a (active, config generation 3)
sled: 711ac7f8-d19e-4572-bdb9-e9b50f6e362a
state::::::::::::: active
config generation: 3
subnet:::::::::::: fd00:1122:3344:103::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -663,7 +675,10 @@ parent: 3f00b694-1b16-4aaa-8f78-e6b3a527b434



sled: 9dc50690-f9bf-4520-bf80-051d0f465c2c (active, config generation 2)
sled: 9dc50690-f9bf-4520-bf80-051d0f465c2c
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:102::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -774,7 +789,10 @@ parent: 3f00b694-1b16-4aaa-8f78-e6b3a527b434



sled: a88790de-5962-4871-8686-61c1fd5b7094 (active, config generation 2)
sled: a88790de-5962-4871-8686-61c1fd5b7094
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:101::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -1112,7 +1130,10 @@ external DNS:
blueprint 9c998c1d-1a7b-440a-ae0c-40f781dea6e2
parent: 366b0b68-d80e-4bc1-abd3-dc69837847e0

sled: 711ac7f8-d19e-4572-bdb9-e9b50f6e362a (active, config generation 4)
sled: 711ac7f8-d19e-4572-bdb9-e9b50f6e362a
state::::::::::::: active
config generation: 4
subnet:::::::::::: fd00:1122:3344:103::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -1229,7 +1250,10 @@ parent: 366b0b68-d80e-4bc1-abd3-dc69837847e0



sled: 9dc50690-f9bf-4520-bf80-051d0f465c2c (active, config generation 2)
sled: 9dc50690-f9bf-4520-bf80-051d0f465c2c
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:102::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -1340,7 +1364,10 @@ parent: 366b0b68-d80e-4bc1-abd3-dc69837847e0



sled: a88790de-5962-4871-8686-61c1fd5b7094 (active, config generation 2)
sled: a88790de-5962-4871-8686-61c1fd5b7094
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:101::/64

host phase 2 contents:
------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ loaded example system with:
blueprint dbcbd3d6-41ff-48ae-ac0b-1becc9b2fd21
parent: 184f10b3-61cb-41ef-9b93-3489b2bac559

sled: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c (active, config generation 2)
sled: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:102::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -123,7 +126,10 @@ parent: 184f10b3-61cb-41ef-9b93-3489b2bac559



sled: 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6 (active, config generation 2)
sled: 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:101::/64

host phase 2 contents:
------------------------
Expand Down Expand Up @@ -234,7 +240,10 @@ parent: 184f10b3-61cb-41ef-9b93-3489b2bac559



sled: d81c6a84-79b8-4958-ae41-ea46c9b19763 (active, config generation 2)
sled: d81c6a84-79b8-4958-ae41-ea46c9b19763
state::::::::::::: active
config generation: 2
subnet:::::::::::: fd00:1122:3344:103::/64

host phase 2 contents:
------------------------
Expand Down
Loading
Loading