manirajv06 commented on code in PR #1096:
URL: https://github.com/apache/yunikorn-core/pull/1096#discussion_r3595897062
##########
pkg/scheduler/objects/node.go:
##########
@@ -487,6 +488,23 @@ func (sn *Node) preAllocateConditions(ask *Allocation)
error {
// Checking pre-conditions in the shim for a reservation.
func (sn *Node) preReserveConditions(ask *Allocation) error {
+ // run predicates for this pod before in hand and fetch feasible nodes
Review Comment:
> Specially the case in the tryNodes() we reserve a node that has been found
in the iteration over all the nodes. If the node was not feasible it would not
have been chosen.
First PreFilter call was made for "Allocate" attempt and second one is for
"reserve" attempt. In addition, in case of any errors in first PreFilter call
we don' t do any feasible nodes checks at all. Since K8s pre filter plugins
used for "Allocate" and "Reservation" process differs, result also might
differ. Also, Traversing all the nodes itself in earlier node iterator in very
large clusters setup consumption time also need to be account and things could
change very quickly in rapidly changing environments. So, I think we still need
to make a second call.
> For the tryPlaceholderAllocate() case we might want to even special case
that call and just pass in a single node into the check to lighten the load.
PreFilter request doesn't required `nodeID` as an input at all. I am just
managing with the existing `*si.PredicateArgs` itself. Ideally, we need to
define a new one to not include `nodeID` as an input. Need to file a follow up
for this.
Yes, it is single node only but still we need to ensure it is available in
feasible nodes or not. Again, duration between ph allocation and real
allocation replacement may take upto 15 minutes and things could change very
quickly in rapidly changing environments.
--
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]