-
Notifications
You must be signed in to change notification settings - Fork 42
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
(4/5) [nexus] Consider Affinity/Anti-Affinity Groups during instance placement #7446
Merged
Conversation
This file contains 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
44 tasks
hawkw
reviewed
Jan 31, 2025
smklein
added a commit
that referenced
this pull request
Feb 25, 2025
…#7447) Pulled out of #7076 This PR is a partial implementation of RFD 522 It adds: - Affinity and Anti-Affinity groups, contained within projects. These groups are configured with a **policy** and **failure domain** can currently contain zero or more **members**. Affinity groups attempt to co-locate members, anti-affinity groups attempt to avoid co-locating members. - **Policy** describes "what to do if we cannot fulfill the co-location request". Currently, these options are "fail" (reject the request) or "allow" (continue with provisioning of the group member regardless). - **Failure Domain** describes the scope of what is considered "co-located". In this PR, the only option is "sled", but in the future, this may be expanded to e.g. "rack". - **Members** describe what can be added to affinity/anti-affinity groups. In this PR, the only option is "instance". RFD 522 describes how "anti-affinity groups may also contain affinity groups" -- which is why this "member" terminology is introduced -- but it is not yet implemented. - (anti-)Affinity groups are exposed by the API, through a CRUD interface - (anti-)Affinity groups are considered during "sled reservation", where instances are placed on a sled. This is most significantly implemented (and tested) within `nexus/db-queries/src/db/datastore/sled.rs`, within #7446 Fixes #1705
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.
Pulled out of #7076
Modifies the instance placement logic to consider affinity and anti-affinity groups.
This is still technically "internal-only", because the HTTP endpoints to create affinity groups are, as of this PR, still unimplemented.