-
Notifications
You must be signed in to change notification settings - Fork 111
fix: exclusive topology only affect inside LWS instance #540
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
base: main
Are you sure you want to change the base?
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: panpan0000 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Deploy Preview for kubernetes-sigs-lws canceled.
|
|
Hi @panpan0000. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Signed-off-by: Peter Pan <[email protected]>
|
/ok-to-test |
|
/hold |
@Edwinhr716 Thank you for your review, I wrote down the explanation carefully as below: Sample Use caseassuming we have 2 nodes and 1 zones
Assuming LWS-A request CPU only, and LWS-B request GPU LWS-A as below LWS-B as below Current Situation
Expectation :
Conclusion:For each Leader, to be away from other group-leaders who belong to the same LWS Set instance: Previous condition is reference: So for above previous condition, If there's already any LWS pod on zone-x who has different LWS-Set-Name, the later LWS pods will not be scheduled to zone-x. My current PR condition is to anti-affinity with : (NOTE: the logic calculation will cancel out currently my PR PR still retain and use below code for above condition in "[ ]" brackets: But I think changing it to below will be more clear , What do. you think ? |
How are you setting the OR here? If a pod has multiple pod anti-affinities they will be treated as AND no? |
Oops, you found a typo @Edwinhr716 I tried to keep the original code so my PR just adds a Let me explain the The PR result again (below are mathematical logic operation calculation): // because "GroupID-Key = NS + LWSName + GroupID", so Derivation begins below: make it shorter : So the result is Aha... with the That's why I asked your experts opinion: if we can remove
|
In shortthe code logic can work, but very very obscure . When if we abandon the GroupIDKeyit will be easier to understand like below, what do you think if we abandon GroupKey and change the code like this ? If yes, I could rework this PR? If you agree, I've another PR for this fix method no.2 : |
|
Thanks for the thorough explanation, now it makes sense to me what happens if they have diff group ID. One last question, what happens if LWS A and LWS B both request the same type of resource? Then exclusive placement won't be respected in that case correct? |
Good point , @Edwinhr716 . let's assume LWS A & B both request GPU: Case #1 ( no conflict )
Case #2: ( with conflict )
So, Do you think it's acceptable ? |
|
So in the case of 2, we are no longer guaranteeing exclusive placement, even if the flag is set. |
hmm...yes. Do you think is there any way to statify both case 1 and 2? or case2 should wait gang being implemented? |
|
I don't think we should break existing functionality for the purpose of adding new one. @kerthcet @ahg-g @ardaguclu @yankay thoughts? |
|
@Edwinhr716 Or we add another policy field as a flag ? |
|
We can do that with a parameter, perhaps call it
|
|
Adding a new field sounds good to me, though we should add a disclaimer that using the feature can cause a deadlock |
|
I was on holiday before, quote my comments here #539 (comment): Not objecting the idea but I would defer this until we see other requests.
What do you mean deadlock, if so, I would say we should avoid it. |
See
|
|
Got it, we should defer this until gang supports at least. |
copy my reply from #539 to here : I would say the existing implementation combines topology-aware with exclusive together and kind of mixing up. But actually, it would be better that topology-aware as a major function, and exclusive as a flag of sub-function, like So what's your suggestion ? @Edwinhr716 @ahg-g @kerthcet ? (1) should we split the topology and exclusive semantic apart , like above yaml ? or (2) adding a flag
|
|
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
|
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |

What type of PR is this?
/kind bug
What this PR does / why we need it
say, we have two LWS instance on the same nodes,
LWS-1 requires CPU
LWS-2 requires GPU
they should share the same topology , and the exclusive policy should apply inside LWS-1 and LWS-2 respectively.
But now, if LWS-1 occupied the nodes, the LWS-2 will be pending
Which issue(s) this PR fixes
Fixes #539
Special notes for your reviewer
Does this PR introduce a user-facing change?