Skip to content

Conversation

smklein
Copy link
Collaborator

@smklein smklein commented Sep 27, 2025

In response to #8936 (comment), this PR migrates planner tests for nexus generation testing to use the reconfigurator-cli.

To make this possible, the reconfigurator-cli has been modified to allow the caller to modify the set of active and not_yet Nexus zones explicitly. In production, these values would be read from the database, and populated by the executor. Before this PR, these values were inferred by the reconfigurator simulator, based on the target blueprint.

@smklein smklein changed the title [reconfigurator] Remove inline planner tests in favor of CLI, for nexus generation testing [reconfigurator] Planner tests conversion CLI tests, for nexus generation testing Sep 27, 2025
@smklein smklein changed the title [reconfigurator] Planner tests conversion CLI tests, for nexus generation testing Planner tests conversion CLI tests, for nexus generation testing Sep 27, 2025
@smklein smklein marked this pull request as ready for review October 1, 2025 22:02
@smklein smklein requested a review from jgallagher October 1, 2025 22:02
set 0 explicit active Nexus zones

> blueprint-plan latest latest
error: failed to construct planning input: no Nexus zones found at current active generation (1)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Technically this output is coming from the reconfigurator-cli, but, even if it wasn't, the planner would throw a similar error.

Comment on lines +19 to +27
# I wish there was a less painful way of doing this!
# Manually update the:
# - RT Bootloader
# - ROT
# - SP
# - Host Phase 1
# - Host Phase 2
#
# To match what is requested by the blueprint.
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes! This just came up on #9044 (comment) too. I'll file an issue.

Copy link
Contributor

Choose a reason for hiding this comment

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

blueprint-diff latest

# If we expunge one of the OLD nexuses, we should observe
# that it is re-created.
Copy link
Contributor

Choose a reason for hiding this comment

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

Great addition to this test 👍

set active-nexus-gen 2

# Now expungement can complete
# (Three Nexuses, expunged one at a time)
Copy link
Contributor

Choose a reason for hiding this comment

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

We're not regenerating inventory from each of these, so I guess the planner isn't waiting for the first expungement before proceeding to the second and so on? Seems fine, but - could the planner expunge all three in one step? (I could imagine this being trivial or really painful depending on how that bit of the planner is structured, but I haven't looked.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think that's correct - I think the planner just happens to be bailing out after the first one.

If it's cool with you, I'm going to punt this to a follow-up -- it would be a planner behavior change (which is fine!) but probably shouldn't be part of this PR

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, definitely! Sorry, should've made it clear that was more of a "huh, is this what we want?" question than a request for changes on this PR.

@smklein smklein enabled auto-merge (squash) October 3, 2025 20:12
@smklein smklein merged commit d83db55 into main Oct 3, 2025
16 checks passed
@smklein smklein deleted the nexus-generation-bump-test branch October 3, 2025 22:10
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