Skip to content
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e0f5b58
claude: draft 1
davepacheco Jan 30, 2026
9278225
claude: draft 2
davepacheco Jan 30, 2026
a606dd3
claude: split out support vs. default
davepacheco Jan 30, 2026
e9a6a52
claude churning
davepacheco Jan 31, 2026
2cd7294
claude: more
davepacheco Jan 31, 2026
f6e206b
claude: update test
davepacheco Jan 31, 2026
0bdcdc7
dap: edits
davepacheco Jan 31, 2026
b5a4ba3
dap: more improvements (including, finally, better DNS test coverage)
davepacheco Jan 31, 2026
0dc6fb8
claude: small cleanup
davepacheco Feb 2, 2026
614df1b
claude: clean up error path
davepacheco Feb 2, 2026
fa803f0
claude: fix up existing test of zone counts
davepacheco Feb 2, 2026
7614984
dap: cleanup
davepacheco Feb 2, 2026
f66455b
dap: add comment
davepacheco Feb 2, 2026
9672fa9
dap: self review
davepacheco Feb 2, 2026
4fc1fbf
claude: fix bug dap identified in code inspection
davepacheco Feb 2, 2026
e31936a
claude: fix another bug dap found
davepacheco Feb 2, 2026
e6c3456
dap: fix
davepacheco Feb 2, 2026
8197e00
fix comment
davepacheco Feb 3, 2026
154589b
Merge branch 'main' into dap/example-system-all-services
davepacheco Feb 3, 2026
fe63d42
review feedback
davepacheco Feb 3, 2026
ab30ac5
example system: deploy scrimlets to test switch zone services
davepacheco Feb 3, 2026
bdff9d0
verified it
davepacheco Feb 3, 2026
64b0fb0
Merge commit '2a68f33581624711f4b11cab6f83cd8d0dc3ff08' into dap/exam…
davepacheco Feb 3, 2026
bccbce6
Merge branch 'main' into dap/example-system-switch-services
davepacheco Feb 3, 2026
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
42 changes: 33 additions & 9 deletions nexus/reconfigurator/planning/src/example.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ use omicron_common::policy::INTERNAL_DNS_REDUNDANCY;
use omicron_uuid_kinds::GenericUuid;
use omicron_uuid_kinds::SledKind;
use omicron_uuid_kinds::VnicUuid;
use sled_agent_types::inventory::SledRole;
use sled_agent_types::inventory::ZoneKind;
use tufaceous_artifact::ArtifactHash;
use tufaceous_artifact::ArtifactKind;
Expand Down Expand Up @@ -219,6 +220,7 @@ pub struct ExampleSystemBuilder {
cockroachdb_count: ZoneCount,
boundary_ntp_count: ZoneCount,
clickhouse_policy: ClickhousePolicy,
scrimlet_count: u8,
create_zones: bool,
create_disks_in_blueprint: bool,
target_release: TargetReleaseDescription,
Expand Down Expand Up @@ -263,6 +265,7 @@ impl ExampleSystemBuilder {
mode: ClickhouseMode::SingleNodeOnly,
time_created: Utc::now(),
},
scrimlet_count: 0,
create_zones: true,
create_disks_in_blueprint: true,
target_release: TargetReleaseDescription::Initial,
Expand All @@ -289,6 +292,15 @@ impl ExampleSystemBuilder {
self
}

/// Set the number of sleds that identify as Scrimlets in the example
/// system.
///
/// The default value is 0.
pub fn scrimlet_count(mut self, scrimlet_count: u8) -> Self {
self.scrimlet_count = scrimlet_count;
self
}

/// Set the number of Nexus instances in the example system.
///
/// The default value is the same as the number of sleds (i.e. one Nexus
Expand Down Expand Up @@ -556,7 +568,16 @@ impl ExampleSystemBuilder {
let sled_ids_with_settings: Vec<_> = self
.sled_settings
.iter()
.map(|settings| (rng.sled_rng.next(), settings))
.enumerate()
.map(|(i, settings)| {
let role = if i < usize::from(self.scrimlet_count) {
SledRole::Scrimlet
} else {
SledRole::Gimlet
};

(rng.sled_rng.next(), settings, role)
})
.collect();

let artifacts_by_kind = if let TargetReleaseDescription::TufRepo(repo) =
Expand All @@ -578,11 +599,12 @@ impl ExampleSystemBuilder {
None
};

for (sled_id, settings) in &sled_ids_with_settings {
for (sled_id, settings, role) in &sled_ids_with_settings {
let _ = system
.sled(
SledBuilder::new()
.id(*sled_id)
.sled_role(*role)
.npools(self.ndisks_per_sled)
.policy(settings.policy),
)
Expand Down Expand Up @@ -1554,6 +1576,7 @@ mod tests {
.oximeter_count(1)
.external_dns_count(5)
.expect("expected to be able to set external_dns_count")
.scrimlet_count(2)
.clickhouse_policy(ClickhousePolicy {
version: 0,
mode: ClickhouseMode::Both {
Expand Down Expand Up @@ -1790,16 +1813,17 @@ mod tests {
| ServiceName::NexusLockstep
| ServiceName::Oximeter
| ServiceName::OximeterReader
| ServiceName::RepoDepot => {
| ServiceName::RepoDepot
| ServiceName::ManagementGatewayService
| ServiceName::Dendrite
| ServiceName::Mgd => {
out.insert(service, Ok(()));
}
// Services that are not currently part of the example system.
ServiceName::ManagementGatewayService
| ServiceName::Wicketd
| ServiceName::Dendrite
// DNS records for Wicketd, Tfportd, and Maghemite don't
// currently exist, even on real deployed systems.
ServiceName::Wicketd
| ServiceName::Tfport
| ServiceName::Maghemite
| ServiceName::Mgd => {
| ServiceName::Maghemite => {
out.insert(service, Err(QueryError::NoRecordsFound));
}
// InternalNtp is too large to fit in a single DNS packet and
Expand Down
Loading