-
Notifications
You must be signed in to change notification settings - Fork 286
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
WIP: add preemptBasedOnFlavorOrder #730
WIP: add preemptBasedOnFlavorOrder #730
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: KunWuLuan 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-kueue ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Hi @KunWuLuan. 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/test-infra repository. |
I will add test in another commit later. |
/ok-to-test |
Unrelated to the PR: what's your username in the k8s slack? |
@alculquicondor Hi, aldo. I just joined the Kubernetes slack. My username is KunWuLuan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/retitle WIP: add preemptBasedOnFlavorOrder
@@ -272,6 +272,9 @@ type ClusterQueuePreemption struct { | |||
// +kubebuilder:default=Never | |||
// +kubebuilder:validation:Enum=Never;LowerPriority | |||
WithinClusterQueue PreemptionPolicy `json:"withinClusterQueue,omitempty"` | |||
|
|||
// +kubebuilder:default="flase" | |||
PreemptBasedOnFlavorOrder bool `json:"preemptBasedOnFlavorOrder"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, booleans might not be the best API https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#primitive-types
For example:
flavorFungibility: NextFlavorBeforePreemption | PreemptionBeforeNexFlavor
I don't really like the names I'm proposing, but I'll leave it to you to come up with other ideas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about
PreemptionTiming: BeforeNextFlavor | AfterAllFlavors
@@ -368,6 +368,9 @@ func (a *Assignment) findFlavorForResourceGroup( | |||
} | |||
} | |||
|
|||
if cq.Preemption.PreemptBasedOnFlavorOrder && representativeMode == Preempt { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea should be that if preemption is not possible, we proceed to the next flavor. But the flavor assigner doesn't really know about whether preemption is possible.
We might need to change the implementation of framework assigner to return a list of assignments that the scheduler and preemption algorithm. Or maybe we need to add tighter dependencies between the flavorAssigner and the preemption algorithms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can just keep track in-memory of whether preemption was possible. If it was not, we put the workload back into the head of the queue to try the next flavor in the next iteration. And once we have passed through all the flavors, we requeue the workload as inadmissible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your time and help. I will continue to improve this submission. 😸
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider writing a design for this feature, following this template https://github.com/kubernetes-sigs/kueue/tree/main/keps/NNNN-template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem, I will submit a proposal in next week
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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/test-infra repository. |
2d998f4
to
ba16983
Compare
@alculquicondor @mortent Hi, I have submited a kep for this feature. If you have time, could you take a look and give me your opinions? Thank you! |
@KunWuLuan Thank you for submitting a KEP. |
@tenzen-y OK, I will create a separate RP to track the KEP, thanks |
I have created a new PR #810 to track the kep |
PR needs rebase. 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/test-infra repository. |
@KunWuLuan: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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/test-infra repository. I understand the commands that are listed here. |
@KunWuLuan I think the other approach is better. Can we close this? |
the other approach is better #849 |
to #582