-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blueprints: store sled state #5663
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am generally skeptical of landing interfaces without consumers, but I appreciate the desire to separate changes that are separable. It might be useful to wait to land this until we've fleshed out the stuff that needs to use it but I defer to you on that!
@@ -1603,6 +1604,12 @@ mod tests { | |||
} | |||
} | |||
|
|||
fn sled_states_active( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repetition of this reinforces the idea that we could use a nice low-level builder interface that could take care of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this would require some serious rework of BlueprintBuilder
and the planner to make the builder less plan-y, but I was wrong (although I think there is still a lot of room for improvement there). I reworked this test to use BlueprintBuilder in 4949eac and it went pretty well. There were two spots (creating bp2
and bp4
) where it was easier to clone the parent blueprint and manually poke it than to go through the builder, but it still seems like a pretty significant cleanup overall.
This builds on (and is currently pointed at) #5663, and is on the path to fixing #5625, although there is still more work to do there. (Should be small, and I'll start on it while this is in review to make sure it really fixes it.) I don't plan on landing this before R8 is out the door, but wanted to go ahead and open it up to review. Much of this is fallout from our discussions about what it means to decommission a sled. Major changes are: * `SledFilter::All` has been renamed to `SledFilter::Commissioned`, and no longer returns sleds that are in `SledState::Decommissioned`. * The blueprint planner will now update the desired sled state to `Decommissioned` for sleds which satisfy our conditions. (See `do_plan_decommission()`.) * The blueprint planner will carry forward the Omicron zones of decommissioned sleds to child blueprints. Pruning these is #5552. * The blueprint planner will _not_ carry forward a desired sled state of `Decommissioned` once the inputs report that the sled has already been decommissioned. * The blueprint executor will decommission sleds that the planner said to. * Decommissioning a sled implicitly decommissions all its disks. (This matches what happens with sled expungement, and should not interfere with region replacement, which keys off of policy, not state.)
This adds the
sled_state
map described in RFD 457 toBlueprint
. The motivating driver here is decommissioning expunged sleds, which is on the path to addressing #5625, but this PR only adds the field - the planner carries forward states from its inputs, but otherwise makes no changes, and the executor doesn't read the new field at all.