Skip to content

Conversation

@sunshowers
Copy link
Contributor

@sunshowers sunshowers commented Oct 5, 2024

ExampleSystem instances now allow for controlling the number of Nexus and DNS
zones.

There was one test that manually poked at the ExampleSystem earlier -- that
test can now switch to using this scheme. (I didn't realize it at the time but
we were allocating just one Nexus zone per sled -- I thought we were doing 3
total. Well, now it's clear how many zones are being allocated.)

Also add tests to ensure zone allocation works properly.

Depends on:

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1
test_name: String,
nsleds: usize,
ndisks_per_sled: u8,
// None means nsleds
Copy link
Contributor

Choose a reason for hiding this comment

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

I know this is a builder, but I think we'd be more likely to maintain the completeness of the ExampleSystem if we took a Policy as input, rather than duplicating what gets built by hand. I think it will also make the use of the ExampleSystem more consistent with production by driving things from Policy rather than another similar, but not quite the same interface.

We could then copy the policy into the PlanningInput when we build the ExampleSystem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That makes sense!

Copy link
Contributor Author

@sunshowers sunshowers Oct 8, 2024

Choose a reason for hiding this comment

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

Hmm, I agree in principle but it's a bit hard to express the current default of 1 Nexus zone per sled in a Policy struct. We could change the default after auditing that our tests all set up the right number of Nexus zones, though.

How about I file a followup issue to do this? I think once the 1-zone-per-sled issue is resolved, we can make the builder interface and Policy work together. We could in principle do something like with_policy(|policy| { policy.target_nexus_zone_count = 1; }).

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I agree in principle but it's a bit hard to express the current default of 1 Nexus zone per sled in a Policy struct. We could change the default after auditing that our tests all set up the right number of Nexus zones, though.

I guess I assumed if there was enough sleds the planner would guarantee this, or that it would be the default.

How about I file a followup issue to do this? I think once the 1-zone-per-sled issue is resolved, we can make the builder interface and Policy work together. We could in principle do something like with_policy(|policy| { policy.target_nexus_zone_count = 1; }).

A follow up seems fine to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll file an issue, thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Filed #6803.

Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
@sunshowers sunshowers changed the base branch from sunshowers/spr/main.4n-reconfigurator-more-control-over-examplesystem-zone-allocation to main October 8, 2024 18:23
Created using spr 1.3.6-beta.1
Copy link
Contributor

@andrewjstone andrewjstone left a comment

Choose a reason for hiding this comment

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

Ship it!

@sunshowers sunshowers merged commit 93d6974 into main Oct 9, 2024
16 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/4n-reconfigurator-more-control-over-examplesystem-zone-allocation branch October 9, 2024 01:59
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.

4 participants