manirajv06 commented on code in PR #1096:
URL: https://github.com/apache/yunikorn-core/pull/1096#discussion_r3620722581
##########
pkg/scheduler/objects/application.go:
##########
@@ -1448,7 +1487,24 @@ func (sa *Application) tryReservedAllocate(headRoom
*resources.Resource, nodeIte
}
}
// check allocation possibility
- // we don't care about predicate error messages here
+ skipReservedNode := false
+ feasibleNodes, predicatesResult :=
ask.preAllocateConditions(true)
+ if predicatesResult {
+ // Is this node suitable to run the pod?
+ if len(feasibleNodes) > 0 {
+ if _, ok := feasibleNodes[reserve.node.NodeID];
!ok {
+ skipReservedNode = true
+ }
+ }
+ } else {
+ skipReservedNode = true
+ }
+ if skipReservedNode {
+ getRateLimitedAppLog().Info("skipping reserved node as
it is not feasible to run the pod",
+ zap.String("allocationKey",
ask.GetAllocationKey()),
+ zap.String("reserved node",
reserve.node.NodeID))
+ continue
+ }
Review Comment:
Earlier Prefilter run was based on `reservation` filters before doing the
reservation in `tryAllocate` cycle. Now, here in `tryReservedAllocate` cycle,
we are processing the reservations happened (`tryAllocate` cycle) earlier to
take it forward. So, we are running PreFilter based on `allocation` filters
this time.
Since `tryNodesNoReserve()` is about trying "other" nodes, we run prefilter
checks. so, yes correct
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]