Move unschedulable Pod to internal schedulingQ synchronously

- use in-cache Pod instead of real-time Pod (by calling API server) to mark it as unschedulable
  in internal schedulingQ
- remove the backoff logic as now we don't call API server
- the whole logic is changed to a synchronous call
This commit is contained in:
Wei Huang
2020-04-30 15:51:25 -07:00
parent 938875582b
commit 133a02540f
4 changed files with 150 additions and 190 deletions

View File

@@ -563,7 +563,7 @@ func (p *PriorityQueue) NominatedPodsForNode(nodeName string) []*v1.Pod {
func (p *PriorityQueue) PendingPods() []*v1.Pod {
p.lock.RLock()
defer p.lock.RUnlock()
result := []*v1.Pod{}
var result []*v1.Pod
for _, pInfo := range p.activeQ.List() {
result = append(result, pInfo.(*framework.QueuedPodInfo).Pod)
}