Blueprint planner/builder: require reason when accessing expunged zones#9608
Merged
jgallagher merged 24 commits intomainfrom Jan 13, 2026
Merged
Blueprint planner/builder: require reason when accessing expunged zones#9608jgallagher merged 24 commits intomainfrom
jgallagher merged 24 commits intomainfrom
Conversation
Blippy has had checks on sled subnet consistency for a while, but they were implemented by inferring each sled's subnet from its zones' IPs. We added explicit sled subnets to blueprints in #9416; this changes blippy's sled-subnet-related checks to use that new field. (This is work that fell out of a larger PR that isn't ready yet, and I'm opening it separately to reduce diff clutter in that PR.)
jgallagher
commented
Jan 7, 2026
| Either::Left(editor.in_service_zones()) | ||
| } | ||
| InnerSledEditor::Decommissioned(_) => { | ||
| // A decommissioned sled cannot have any in-service zones! |
Contributor
Author
There was a problem hiding this comment.
I strongly suspect we could pretty significantly simplify SledEditor here by getting rid of this internal decommissioned state entirely, with some minor changes to the builder. I put this here when I first started doing the builder cleanup and didn't have a great handle on commissioned vs decommissioned sleds; I'll take a crack at this simplification soon.
smklein
approved these changes
Jan 7, 2026
| for (zone, nexus) in self | ||
| .blueprint | ||
| .current_zones(BlueprintZoneDisposition::any) | ||
| .current_in_service_zones() |
Collaborator
There was a problem hiding this comment.
Noting that this a change which no longer considers expunged zones, but that seems fine
jgallagher
added a commit
that referenced
this pull request
Jan 13, 2026
This is the small cleanup I mentioned in #9608 (comment). Prior to this PR, `SledEditor` wrapped an `InnerSledEditor` enum with active / decommissioned variants, and `SledEditor`'s methods were mostly just passthroughs to the two inner variants, except for a handful of methods that were only valid for commissioned sleds. After this PR, `SledEditor` only handles active sleds, and `BlueprintBuilder` keeps a separate set of all the configs for decommissioned sleds. Most of the other changes to the buildprint builder were minor fallout from slight changes (e.g., some `SledEditor` methods were fallible and now are infallible).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a followup to #9521, specifically driven by @smklein's note that the planner also accesses expunged zones, and we need to track those reasons too. Doing this work revealed one case where the planner was accessing them in a way that was going to cause problems with pruning; that's fixed by #9550, and this PR is staged on top of it.