wilfred-s commented on code in PR #745:
URL: https://github.com/apache/yunikorn-core/pull/745#discussion_r1418042106


##########
pkg/scheduler/objects/application.go:
##########
@@ -936,6 +938,8 @@ func (sa *Application) tryAllocate(headRoom 
*resources.Resource, allowPreemption
        userHeadroom := ugm.GetUserManager().Headroom(sa.queuePath, 
sa.ApplicationID, sa.user)
        // get all the requests from the app sorted in order
        for _, request := range sa.sortedRequests {
+               request.SetSchedulingAttempted(true)
+

Review Comment:
   Can we postpone setting this to a later point in the cycle?
   At the point that we now check we have not done some fits and we do not want 
to trigger scale up if it does not fit in the users quota as it will not be 
able to run.
   A replacement during gang scheduling should also not trigger scale up.



##########
pkg/scheduler/objects/application.go:
##########
@@ -898,13 +898,15 @@ func (sa *Application) getOutstandingRequests(headRoom 
*resources.Resource, user
                return
        }
        for _, request := range sa.sortedRequests {
-               if request.GetPendingAskRepeat() == 0 {
+               if request.GetPendingAskRepeat() == 0 || 
!request.IsSchedulingAttempted() {
                        continue
                }
                // ignore nil checks resource function calls are nil safe
                if headRoom.FitInMaxUndef(request.GetAllocatedResource()) && 
userHeadRoom.FitInMaxUndef(request.GetAllocatedResource()) {
-                       // if headroom is still enough for the resources
-                       *total = append(*total, request)
+                       if !request.HasTriggeredScaleUp() {

Review Comment:
   Should we handle daemon set pods here too?
   Daemonset pods will not be helped by autoscaling. The Daemonset controller 
only creates a pod for an existing node.



-- 
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]

Reply via email to