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

[nexus] Apply limits to affinity group memberships #7858

Open
wants to merge 4 commits into
base: groups-for-instance
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions common/src/api/external/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1339,10 +1339,16 @@ pub enum FailureDomain {
///
/// Membership in a group is not exclusive - members may belong to multiple
/// affinity / anti-affinity groups.
///
/// Affinity Groups can contain up to 32 members.
// See: AFFINITY_GROUP_MAX_MEMBERS
#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(tag = "type", content = "value", rename_all = "snake_case")]
pub enum AffinityGroupMember {
/// An instance belonging to this group
///
/// Instances can belong to up to 16 affinity groups.
// See: INSTANCE_MAX_AFFINITY_GROUPS
Instance { id: InstanceUuid, name: Name, run_state: InstanceState },
}

Expand All @@ -1364,10 +1370,16 @@ impl SimpleIdentityOrName for AffinityGroupMember {
///
/// Membership in a group is not exclusive - members may belong to multiple
/// affinity / anti-affinity groups.
///
/// Anti-Affinity Groups can contain up to 32 members.
// See: ANTI_AFFINITY_GROUP_MAX_MEMBERS
#[derive(Clone, Debug, Deserialize, Serialize, JsonSchema, PartialEq)]
#[serde(tag = "type", content = "value", rename_all = "snake_case")]
pub enum AntiAffinityGroupMember {
/// An instance belonging to this group
///
/// Instances can belong to up to 16 anti-affinity groups.
// See: INSTANCE_MAX_ANTI_AFFINITY_GROUPS
Instance { id: InstanceUuid, name: Name, run_state: InstanceState },
}

Expand Down
Loading
Loading