-
Notifications
You must be signed in to change notification settings - Fork 39.2k
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
Fix inter-pod anti-affinity check to consider a pod a match when all the anti-affinity terms match #62715
Fix inter-pod anti-affinity check to consider a pod a match when all the anti-affinity terms match #62715
Conversation
… any of the terms matched (as opposed to all terms matched)
cc @wackxu |
@bsalamat IIUC I think this PR could be combined with #62591, which is aimed to the similar issue and easy to be cherry-picked. They are both fixing pod affinity/anti-affinity issues. One is in raw affinity/anti-affinity terms and the other is in topology terms, which will match all the affinity/anti-affinity terms in topology side. Also the description/title of this PR is misleading. This PR is focusing more on topology side. |
PR #62591 was targeting a different, but similar problem. That PR was intended to fix self-affinity issue, although I also fixed the anti-affinity issue in our slow path as well. This PR cannot be back-ported as it touches code that is mostly added in #62211. We could possibly back-port #62591, but even that one cannot be back-ported verbatim and needs changes.
This PR actually fixes the issue mentioned in the title. The anti-affinity matching algorithm had a bug. The bug was not in checking topology; it was in how we combined the results of multiple anti-affinity terms. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bsalamat, dixudx The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Automatic merge from submit-queue (batch tested with PRs 62761, 62715). If you want to cherry-pick this change to another branch, please follow the instructions here. |
What this PR does / why we need it:
Inter-pod anti-affinity check used to incorrectly consider a pod a match when any of the anti-affinity terms matched the pod. This PR fixes the logic to consider a pod a match when all the terms match the pod.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #62567
Special notes for your reviewer:
Release note:
/sig scheduling