Add sled-agent API for managing attached subnets#9778
Merged
Conversation
Collaborator
bnaecker
commented
Feb 3, 2026
- Add APIs to the sled agent for attaching and detaching either a single subnet on an instance, or setting / clearing the entire set for an instance.
- Add list of attached subnets in the instance-creation request body, and fill that in from Nexus with the (currently-empty) set of attached subnets for the target instnace.
- Plumb attachment requests all the way through the sled-agent internals to the new APIs in OPTE.
- Add mapping of attached subnets per-instance to the simulated sled agent for testing.
- Fixes Add sled-agent API for attached external subnets #9702
- Add APIs to the sled agent for attaching and detaching either a single subnet on an instance, or setting / clearing the entire set for an instance. - Add list of attached subnets in the instance-creation request body, and fill that in from Nexus with the (currently-empty) set of attached subnets for the target instnace. - Plumb attachment requests all the way through the sled-agent internals to the new APIs in OPTE. - Add mapping of attached subnets per-instance to the simulated sled agent for testing. - Fixes #9702
7f014c4 to
5851b43
Compare
rcgoodfellow
reviewed
Feb 3, 2026
jgallagher
reviewed
Feb 3, 2026
sled-agent/types/versions/src/add_attached_subnets/attached_subnet.rs
Outdated
Show resolved
Hide resolved
FelixMcFelix
approved these changes
Feb 3, 2026
Contributor
FelixMcFelix
left a comment
There was a problem hiding this comment.
Thanks for this Ben, the impl makes sense to me reading through. Just some nits in addition to the existing comments.
- Update instance's view of attached subnets based on what actually gets applied in OPTE. - Enum to describe attached subnet kind, instead of boolean. - Inline error chain, contains_key over get, and a few other minor fixes
rcgoodfellow
approved these changes
Feb 4, 2026
jgallagher
approved these changes
Feb 4, 2026
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.