Commit Graph

74 Commits (3ebb8ddd8a21b4b8eca05c0e4a01c91617bd245f)

Author SHA1 Message Date
Davanum Srinivas 7b8c9acc09
remove unused code
Change-Id: If821920ec8872e326b7d85437ad8d2620807799d
2019-04-19 08:36:31 -04:00
Ted Yu cd3a30047f Return from loop in removeZone when zone is found 2019-04-09 14:42:44 -07:00
Kubernetes Prow Robot a93f803f8e
Merge pull request #75501 from Huang-Wei/scheduler-metrics
scheduler: add metrics to record number of pending pods in different queues
2019-04-09 01:09:05 -07:00
Wei Huang 63c3a617cd
auto-generated files 2019-04-08 17:51:08 -07:00
Wei Huang 54218a7988
scheduler: add unit test for pending pods metrics 2019-04-08 17:51:08 -07:00
Wei Huang 0806ef2c11
scheduler: refactor testing structures for better reusability 2019-04-08 17:51:08 -07:00
Wei Huang 7afbd68730
add metrics to record number of pending pods in different queues 2019-04-08 17:51:07 -07:00
goodluckbot b92b0eb7c2 Change Mutex to RWMutex for pod backoff 2019-04-08 15:31:48 +08:00
Ted Yu 4b4c20be7c Use read lock for PendingPods 2019-04-06 13:48:51 -07:00
Kubernetes Prow Robot 52ec2a0009
Merge pull request #75497 from goodluckbot/remove-backoff-util
Integrate backoff mechanism into the scheduling queue and remove the …
2019-04-05 18:06:41 -07:00
goodluckbot 151649df4c Integrate backoff mechanism into the scheduling queue and remove the Backoff util 2019-04-06 00:15:00 +08:00
wangqingcan 8fd45d8300 clean up func podTimestamp 2019-03-27 11:05:19 +08:00
Wei Huang 49346c1e04
shorten scheduler package alias for better readability
- schedulerinternalcache -> internalcache
2019-03-21 18:14:19 -07:00
Wei Huang 2b554b4286
scheduler: cleanup unused parameters in unschedulableQ 2019-03-13 11:54:16 -07:00
Kubernetes Prow Robot 7bcdbc5a51
Merge pull request #74446 from yanghaichao12/comm0223
Fix typos
2019-03-05 23:24:00 -08:00
yanghaichao12 b475cdf7fc Fix typos
change SupportsPreemption

change comment again
2019-03-05 02:12:55 -05:00
Kubernetes Prow Robot f6d05d6315
Merge pull request #74611 from denkensk/fix-unable-find-backoff-value
fix the flake in scheduling_queue_test
2019-02-28 16:06:57 -08:00
wangqingcan 471679f8d2 fix the flake in scheduling_queue_test 2019-02-28 07:23:27 +08:00
Jonathan Basseri df4d65d2e1 Ensure that pods obey backoff timers.
The function AddUnschedulableIfNotPresent is responsible for
initializing or updating backoff timers for pods that could not be
scheduled. The helper function backoffPod does that work, but was not
being called in all cases.

This moves that call to be (mostly) unconditional, while cleaning up
comments and error handling.
2019-02-26 10:21:18 -08:00
Kubernetes Prow Robot bf3b5e5563
Merge pull request #73700 from denkensk/no-updae-timestamp-each-scheduling-attempt
Don't update the Pod object after each scheduling attempt
2019-02-22 01:47:48 -08:00
wangqingcan ea9e1a4118 not updae timestamp for each scheduling attempt 2019-02-22 09:46:18 +08:00
Bobby (Babak) Salamat 337cb7036c Add tests for the new cache snapshotting mechanism. 2019-02-20 13:38:37 -08:00
Bobby (Babak) Salamat e0ad271891 Optimize scheduler cache snapshotting using an MRU structure. 2019-02-20 13:38:37 -08:00
Bobby (Babak) Salamat ec0739bd03 Fix races in scheduling queue tests 2019-02-11 16:38:26 -08:00
Davanum Srinivas b975573385
move pkg/kubelet/apis/well_known_labels.go to staging/src/k8s.io/api/core/v1/
Co-Authored-By: Weibin Lin <linweibin1@huawei.com>

Change-Id: I163b2f2833e6b8767f72e2c815dcacd0f4e504ea
2019-02-05 13:39:07 -05:00
Ted Yu f63f772867 Presize map with proper capacity in cache 2019-02-04 17:00:05 -08:00
Yecheng Fu ba47beffd2 Fix weakness of current receivedMoveRequest
- add incremental scheduling cycle
- instead of set a flag on move reqeust, we cache current scheduling
cycle in moveRequestCycle
- when unschedulable pods are added back, compare its cycle with
moveRequestCycle to decide whether it should be added into active queue
or not
2019-01-30 10:13:49 +08:00
Wei Huang 02cdc24cd3
enforce unscheduable pod has proper chance to be retried 2019-01-22 09:23:51 +08:00
wangqingcan 28e6bbc175 acquire lock before operating unschedulablepodsmap 2019-01-18 04:24:18 +08:00
Kubernetes Prow Robot d857790d36
Merge pull request #72558 from denkensk/add-goroutine-move-unschedulablepods-to-activeq
Move unschedulable pods to the active queue if they are not retried for more than 1 minute
2019-01-16 17:15:16 -08:00
wangqingcan de8cfdcd79 add goroutine to move unschedulablepods to activeq regularly 2019-01-16 12:08:19 +08:00
Kubernetes Prow Robot db60e4f20c
Merge pull request #72632 from danielqsj/sch_pod
Move getNextPod to closure
2019-01-08 19:22:19 -08:00
Kubernetes Prow Robot 5a708017e9
Merge pull request #72619 from everpeace/fix-starvation-by-sorting-queue-with-last-probe-time
change sort function of scheduling queue to avoid starvation when a lot of unscheduleable pods are in the queue
2019-01-07 20:24:24 -08:00
danielqsj 8dc1e83946 Add func comment for MakeNextPodFunc 2019-01-08 11:07:47 +08:00
danielqsj 554ad383e3 Move getNextPod to closure 2019-01-07 17:54:49 +08:00
Shingo Omura 22079a79d4 change sort function of scheduling queue to avoid starvation when unschedulable pods are in the queue
When starvation heppens:
- a lot of unschedulable pods exists in the head of queue
- because condition.LastTransitionTime is updated only when condition.Status changed
- (this means that once a pod is marked unschedulable, the field never updated until the pod successfuly scheduled.)

What was changed:
- condition.LastProbeTime is updated everytime when pod is determined
unschedulable.
- changed sort function so to use LastProbeTime to avoid starvation
described above

Consideration:
- This changes increases k8s API server load because it updates Pod.status whenever scheduler decides it as
unschedulable.

Signed-off-by: Shingo Omura <everpeace@gmail.com>
2019-01-07 11:05:45 +09:00
Jonathan Basseri 95254d5457 Move CacheDebugger signal handling into the package.
This moves the signal handling for CacheDebugger from the factory
package into the CacheDebugger's package. That makes it easier to reuse
from packages other than factory.
2019-01-03 18:15:51 -08:00
Kubernetes Prow Robot 222d7837a8
Merge pull request #72303 from cofyc/fix72013-cleanup-scheduler
Update comments to reflect current logic
2019-01-03 15:51:34 -08:00
Yecheng Fu fa88bcc154 Update comments for PriorityQueue.
Log condition reason which is useful for debugging.
2019-01-03 09:25:05 +08:00
Bobby (Babak) Salamat 7044145920 Fix race in setting nominated node 2018-12-29 22:54:15 -08:00
Kubernetes Prow Robot aee1ab34ab
Merge pull request #72260 from bsalamat/fix_waiting_pods
Add pods in the backoff queue to the list of pending pods
2018-12-27 00:03:18 -08:00
wangqingcan 000aa06912 Make scheduleinternalcache.PodFilter as public 2018-12-21 23:09:56 +08:00
Bobby (Babak) Salamat 48b6f75829 Add pods in the backoff queue to the list of pending pods 2018-12-20 17:28:23 -08:00
Jonathan Basseri d27d28a44e Flatten nominated pod logic in PriorityQueue.
This replaces deeply nested ifs & fors with early returns & continues.
2018-12-14 18:11:12 -08:00
Jonathan Basseri fae4f69d36 Fix return value of PriorityQueue.Add.
This function was returning a non-nil error for the common, non-failure
case. The fix is to properly scope local error values and add early
returns.
2018-12-14 16:44:21 -08:00
Kubernetes Prow Robot 05183bffe5
Merge pull request #71872 from yuexiao-wang/scheduler-nodeinfo
[scheduler cleanup phase 2]: Rename `pkg/scheduler/cache` to `pkg/scheduler/nodeinfo`
2018-12-12 08:08:33 -08:00
yuexiao-wang 7b6f60f085 modify BUILD
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-12-11 11:22:06 +08:00
yuexiao-wang f3353c358d [scheduler cleanup phase 2]: Rename to
Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>
2018-12-11 11:21:12 +08:00
mlmhl 2fe9b1438c activate unschedulable pods only if the node became more schedulable 2018-12-10 09:48:23 +08:00
Gregory Haynes 5e4ccede4c Reschedule with backoff
With the alpha scheduling queue we move pods from unschedulable to
active on certain events without a backoff. As a result we can cause
starvation issues if high priority pods are in the unschedulable queue.
Implement a backoff mechanism for pods being moved to active.

Closes #56721
2018-12-06 16:38:34 +00:00