parent
75664faf7c
commit
d31c85ef8c
|
|
@ -153,7 +153,7 @@ func (enqueue *Action) Execute(ssn *framework.Session) {
|
|||
klog.V(4).Infof("Start to deal with Target Job")
|
||||
minReq := api.NewResource(*targetJob.PodGroup.Spec.MinResources)
|
||||
idle = idle.Add(lockedNodesIdle)
|
||||
if minReq.LessEqual(idle) {
|
||||
if ssn.JobEnqueueable(targetJob) && minReq.LessEqual(idle) {
|
||||
klog.V(3).Infof("Turn Target Job phase to Inqueue")
|
||||
targetJob.PodGroup.Status.Phase = scheduling.PodGroupInqueue
|
||||
ssn.Jobs[targetJob.UID] = targetJob
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ func (alloc *Action) Execute(ssn *framework.Session) {
|
|||
|
||||
if !util.Reservation.TargetJob.Ready() {
|
||||
ssn.ReservedNodes()
|
||||
return
|
||||
} else {
|
||||
klog.V(3).Infof("Target Job has been scheduled. Reset target job")
|
||||
util.Reservation.TargetJob = nil
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ func (rp *reservationPlugin) getUnlockedNodesWithMaxIdle(ssn *framework.Session)
|
|||
break
|
||||
}
|
||||
}
|
||||
if !hasLocked && (maxIdleNode == nil || maxIdleNode.Idle.Less(node.Idle)) {
|
||||
if !hasLocked && (maxIdleNode == nil || maxIdleNode.Idle.LessEqual(node.Idle)) {
|
||||
maxIdleNode = node
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue