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

[Placement Group] Add support for soft anti affinity #148

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

bgriddaluru
Copy link

  1. Add support for soft anti affinity
    • To determine if FC supports SoftAntiAffinity, check if SoftAntiAffinity property is present in Affinity Rule class
  2. For containers, fix issue where wrong volume is matched due to partial prefix match.

mkatturu
mkatturu previously approved these changes Nov 23, 2024
@@ -97,3 +98,45 @@ func GetAffinityRule(whost *host.WmiHost, affinityRuleName string) (caffinityRul
caffinityRule = &AffinityRule{wmiafRule}
return
}

// SetAffinityRule updates an existing affinity rule

Choose a reason for hiding this comment

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

you couldn't merge it in existing 'CreateAffinityRule' method (rather than creating another function)?

Copy link
Author

Choose a reason for hiding this comment

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

Just to be consistent with current code, added a simple wrapper on WMI method and have specific logic in moc-pkg layer. I will update as suggested

return
}

softAntiAffinitySupported := false

Choose a reason for hiding this comment

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

do this only for rule=anti-affinity, softAntiAffinity=true?

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.

3 participants