-
Notifications
You must be signed in to change notification settings - Fork 972
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
feat(sheduler): take resource quota into consideration during pod group enqueue procedure #1100
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: YuxiJin-tobeyjin 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 |
…up enqueue procedure Signed-off-by: jinyuxi <jinyuxi@cambricon.com>
88cdb06
to
685ee39
Compare
/assign @kevin-wangzefeng |
if _, ok := resourceMap[job.Namespace]; ok { | ||
klog.V(3).Infof("For job <%s/%s>, ResourceQuota: %t", job.Namespace, job.Name, minReq.LessEqual(resourceMap[job.Namespace])) | ||
if minReq.LessEqual(resourceMap[job.Namespace]) { | ||
resourceMap[job.Namespace].Sub(minReq) |
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.
l think its better to put idle.Sub(minReq); inqueue = true
here so that the following else
clause can be removed :)
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.
Actually idle.Sub(minReq);inqueue = true
doesn't belong to this if
branch;
If we put it here, idle.Sub
will not be calculated under circumstances when there is no resourceQuota in the namespace but ssn.JobEnqueueable(job) && minReq.LessEqual(idle)
is satisfied.
@@ -114,7 +118,23 @@ func (enqueue *Action) Execute(ssn *framework.Session) { | |||
inqueue = true |
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.
And l think even though job.PodGroup.Spec.MinResources == nil, resourceQuota should also be checked?
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.
Considering minResources is nil, the pods of this podgroup won't consume any resoureQuota, so we don't need it to be checked? WDYT
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Please resolve the conflictions |
Please fix the conflictions and bugs |
Okay, I will try to handle the conflicts. Would you please give me some clues about bugs,tks. |
Can y please resolve the conflicts, l think the original code is almost ready |
Since enqueue structure has been changed in master and there are some logic defects in this design, we will give a new proposal with a plugin realization in the near future. This PR can be closed. |
Try to solve: #1014
For example you can set your resource quota as follows, then your podGroup will stay in pending state if the resource request plus usage is more than quota