Skip to content
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

[reconfigurator] add decommissioned sleds to the planning input #6644

Conversation

sunshowers
Copy link
Contributor

@sunshowers sunshowers commented Sep 23, 2024

With zone cleanup, part of the logic depends on knowing whether particular sleds are decommissioned. Previously we weren't returning such sleds at all, which means that the planner is unable to distinguish between the cases where the sled is decommissioned and the sled is not present in the input at all. (It would be really bad for zone cleanup to remove zones if something went horribly wrong!)

There is the potential for some fallout from decommissioned entries being present in the sled map -- I've tried to guard it best I can by changing the lookup API making it accept a filter. An alternative would be to store the set of decommissioned sleds separately, but that seems worse long-term.

The change identified a small issue with the reconfigurator CLI -- previously, we'd be okay overwriting decommissioned sleds. That case produces a soft error now.

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
@sunshowers sunshowers changed the title [reconfigurator] also return decommissioned sleds as part of the planning input [reconfigurator] add decommissioned sleds to the planning input Sep 23, 2024
dev-tools/reconfigurator-cli/src/main.rs Outdated Show resolved Hide resolved
dev-tools/reconfigurator-cli/src/main.rs Show resolved Hide resolved
nexus/reconfigurator/planning/src/planner.rs Show resolved Hide resolved
let sled_rows = datastore
.sled_list_all_batched(opctx, SledFilter::Commissioned)
.sled_list_all_batched(opctx, SledFilter::All)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to confirm:

It seems like we could infer that a sled is decommissioned by seeing "a trace of it exists in the blueprint, but it is absent from the planning input".

Is this decision to make things explicit a safety-guard? Just trying to check my understanding whether this is "truly a necessity" or "an explicit alternative to relying on implied state".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's meant to be a safety guard specifically for cleanup -- because zone cleanup will actually remove entries from the blueprint. So it's possible that if a sled is missed somehow then it disappears from the blueprint (I actually first realized this while writing tests for Nexus zone cleanup).

Created using spr 1.3.6-beta.1
@sunshowers sunshowers enabled auto-merge (squash) September 24, 2024 20:47
@sunshowers sunshowers merged commit b477b9d into main Sep 24, 2024
16 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/reconfigurator-also-return-decommissioned-sleds-as-part-of-the-planning-input branch September 24, 2024 22:09
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.

2 participants