You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func (ji*JobInfo) GetMinResources() *Resource {
ifji.PodGroup.Spec.MinResources==nil {
// a function to sum up minMember's tasks' reqeust resourcereturnji.CalMinResources()
}
returnNewResource(*ji.PodGroup.Spec.MinResources)
}
Why is this needed:
As elastic resource define in queueAttr, it is some of job's elastic resource, which equals to job.allocated - job.minAvailable.
But when cal the min resource for job, it return empty when ji.PodGroup.Spec.MinResources == nil . This is not corresponding with code in controller:
typequeueAttrstruct {
// elastic represents the sum of job's elastic resource, job's elastic = job.allocated - job.minAvailableelastic*api.Resource
}
// 2. elastic sums up queue's jobs' elastic resourceattr.elastic.Add(job.GetElasticResources())
// 3. Here, when MinResources is nil, shall we calculate it by minMember according to task priority?// so that it can be corresponde with function at pkg/controllers/job/job_controller_actions.go#L686// GetMinResources return the min resources of podgroup.func (ji*JobInfo) GetMinResources() *Resource {
ifji.PodGroup.Spec.MinResources==nil {
returnEmptyResource()
}
returnNewResource(*ji.PodGroup.Spec.MinResources)
}
func (ji*JobInfo) GetElasticResources() *Resource {
ifji.Allocated.LessEqualPartly(ji.GetMinResources(), Zero) {
returnEmptyResource()
}
returnji.Allocated.Clone().Sub(ji.GetMinResources())
}
The text was updated successfully, but these errors were encountered:
lowang-bh
changed the title
May be job's min resource need to considering minMember or min avainable number of each role ?
Maybe job's min resource need to considering minMember or min avainable number of each role ?
Apr 15, 2023
What's more, let admission webhook or controller to calculate the minResource for normal podgroups when it is submit, like what's done in vcjob controller
What would you like to be added:
Why is this needed:
As elastic resource define in
queueAttr
, it is some of job's elastic resource, which equals tojob.allocated - job.minAvailable
.But when cal the min resource for job, it return empty when
ji.PodGroup.Spec.MinResources == nil
. This is not corresponding with code in controller:volcano/pkg/controllers/job/job_controller_actions.go
Line 686 in 31b47aa
The text was updated successfully, but these errors were encountered: