craigcondit commented on a change in pull request #336:
URL: 
https://github.com/apache/incubator-yunikorn-k8shim/pull/336#discussion_r783259033



##########
File path: pkg/cache/task.go
##########
@@ -440,6 +460,23 @@ func (task *Task) beforeTaskAllocated(event *fsm.Event) {
 }
 
 func (task *Task) postTaskBound(event *fsm.Event) {
+       if task.pluginMode {
+               // when the pod is scheduling by yunikorn, it is moved to the 
default-scheduler's
+               // unschedulable queue, if nothing changes, the pod will be 
staying in the unschedulable
+               // queue for unschedulableQTimeInterval long (default 1 
minute). hence, we are updating
+               // the pod status explicitly, when there is a status change, 
the default scheduler will
+               // move the pod back to the active queue immediately.
+               podCopy := task.pod.DeepCopy()

Review comment:
       This cost is negligible, because the copy happens very infrequently 
(typically once per pod), when YuniKorn has decided to allocate the pod. We 
update the pod status once at this point to force the default scheduler logic 
to re-consider the pod for scheduling. It will very shortly call PreFilter() / 
Filter() and push the Pod through the scheduling cycle.




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