[reconfigurator] Rework planner/builder expungement logic#7495
Merged
jgallagher merged 2 commits intomainfrom Feb 6, 2025
Merged
[reconfigurator] Rework planner/builder expungement logic#7495jgallagher merged 2 commits intomainfrom
jgallagher merged 2 commits intomainfrom
Conversation
andrewjstone
approved these changes
Feb 6, 2025
Contributor
andrewjstone
left a comment
There was a problem hiding this comment.
Ship it immediately. I'm going to pull it into #7286 to deal with disk expungement instead of what I have for that in the planner/builder.
jgallagher
added a commit
that referenced
this pull request
Feb 18, 2025
These were supposed to be fixed before merging #7495, but were not. Both of these are of the flavor "should never happen unless there's an internal bug" and could arguably be `debug_assert`s, but having the option for Nexus panics due to internal bugs here is not awesome.
jgallagher
added a commit
that referenced
this pull request
Feb 18, 2025
These were supposed to be fixed before merging #7495, but were not. Both of these are of the flavor "should never happen unless there's an internal bug" and could arguably be `debug_assert`s, but having the option for Nexus panics due to internal bugs here is not awesome.
hawkw
pushed a commit
that referenced
this pull request
Feb 21, 2025
These were supposed to be fixed before merging #7495, but were not. Both of these are of the flavor "should never happen unless there's an internal bug" and could arguably be `debug_assert`s, but having the option for Nexus panics due to internal bugs here is not awesome.
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.
The high-level summary of this change is that it moves the logic for handling expunged sleds out of
BlueprintBuilder::expunge_zones_for_sled()(which is now gone entirely) and into a new method on the planner (do_plan_expunge_for_commissioned_sled(), naming suggestions welcome).This fixes two problems; one stylistic, and one semantic:
BlueprintBuilder::expunge_zones_for_sled()was maybe the worst offender for "is this a builder API or a planner API", because a big chunk of its logic was actually delegated back tozone_needs_expungement(), a helper function defined in the planner. The builder now has more explicit and direct methods to expunge specific things, and it's the planner that decides based on the planning input which things to expunge.BlueprintBuilder::expunge_zones_for_sled()only handled expunging zones. When a sled was expunged, at no point did the planner expunge the disks or datasets on that sled. We haven't been bitten by this yet because the builder currently omits expunged sleds fromblueprint_disksandblueprint_datasetsentirely, but that's a major roadblock in the path to joining the maps together (which is a prereq for fixing Reconfigurator "deploy datasets then zones" ordering will break for zone expungement #7309 by merging sled-agent endpoints together).do_plan_expunge_for_commissioned_sled()expunges disks, datasets, and zones. For now we still omit the expunged sleds fromblueprint_disksandblueprint_datasets, but when we stop doing that we'll at least have set the dispositions correctly.