RSS: Refactor how we construct the blueprint we hand off to Nexus#9399
Merged
jgallagher merged 4 commits intomainfrom Nov 18, 2025
Merged
RSS: Refactor how we construct the blueprint we hand off to Nexus#9399jgallagher merged 4 commits intomainfrom
jgallagher merged 4 commits intomainfrom
Conversation
Base automatically changed from
sunshowers/spr/meta-remove-remaining-uses-of-idmap-idmap-itself
to
main
November 13, 2025 18:40
28adb88 to
95744c5
Compare
smklein
approved these changes
Nov 14, 2025
Collaborator
smklein
left a comment
There was a problem hiding this comment.
Happy to see the sled agent exposing a smaller interface, and using inventory when that works instead.
andrewjstone
approved these changes
Nov 14, 2025
Contributor
andrewjstone
left a comment
There was a problem hiding this comment.
Thanks for the cleanup!
f92b587 to
36f2a70
Compare
Contributor
Author
|
Rebased on top of #9407 to let it get into main first (both it and this PR rev sled-agent's API). |
Base automatically changed from
zl/vmm-register-api-version-correction
to
main
November 18, 2025 00:12
36f2a70 to
fe50b8f
Compare
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 mostly a refactor of how RSS generates the blueprint it hands off to Nexus. At the point we need to construct a blueprint, we have a
ServicePlanand aSledPlan(both renamed imports fromPlanstructs in other modules). We have to combine these to construct the blueprint:ServicePlancontains all the sled configs but not the sled IDs, andSledPlancontains all the sled IDs. Both contained maps keyed by each sled's underlay address, so constructing a blueprint was a two step process:build_sled_configs_by_id(sled_plan, service_plan)to match up the two maps via sled underlay addresses, producing a single map containing both sled IDs and sled configsHowever, this is largely unnecessary:
ServicePlandid originally know all the sled IDs too - it just threw that information away. This PR changesServicePlanto keep track of the sled IDs also, removing the need to join it againstSledPlanlater. The helper function that constructs a blueprint is now ato_blueprint()method onServicePlanitself.(The motivator for this change is that I want to add some additional fields to
BlueprintSledConfigthat are also available toServicePlan, and doing so is a lot easier if we already have this refactor in place.)There should be no behavioral changes in this PR, except for an extra small change that snuck in while I was here: Previously, RSS was asking each sled for its inventory and then separately asking for its role (i.e., scrimlet vs gimlet). But at some point we added the role to the inventory, so this PR removes the
get_sled_roleendpoint altogether, and RSS reads the role from the inventory it just fetched. (I did double check that theinventoryandget_sled_rolehandlers read from exactly the same bit of information to determine the sled's role.)This is staged on top of #9391 to avoid merge conflicts touching some of these same bits.