Commit Graph

57 Commits

Author SHA1 Message Date
RainbowMango
832a4fbe99 Refactor metrics test from kube-schedule queue. 2019-10-08 15:39:30 +08:00
draveness
ab3f55720b feat(scheduler): expose kubernetes client in framework handle 2019-10-06 10:31:49 +08:00
Abdullah Gharaibeh
66386fdf49 Added the first predicate as a filter plugin: PodToleratesNodeTaints. 2019-10-05 08:43:17 -04:00
draveness
c73ff9749b feat(scheduler): rename PluginContext to CycleState 2019-10-04 17:30:36 +08:00
notpad
fc55e74741 A consistent interface for plugin extended functionality 2019-10-01 23:59:48 +08:00
Kubernetes Prow Robot
0b4cccc9d1
Merge pull request #82912 from ahg-g/ahg-prefilter-update
An interface that allows pre-filter plugins to update their pre-calculated status
2019-09-25 11:06:40 -07:00
Kubernetes Prow Robot
8ad1aba7f5
Merge pull request #82465 from hprateek43/MoveGetPodPriority
Move GetPodPriority from /scheduler/util to /api/pod
2019-09-25 11:06:00 -07:00
Abdullah Gharaibeh
37b9e6d1ea An interface that allows pre-filter plugins to update their pre-calculated.
This is needed to allow efficient preemption simulations: during preemption, we remove/add pods from each node before running the filter plugins again to evaluate whether removing/adding specific pods will allow the incoming pod to be scheduled on the node. Instead of calling prefilter again, we should allow the plugin to do incremental update to its pre-computed state.
2019-09-24 13:01:50 -04:00
Harsh Singh
6a9ef7f04f Move GetPodPriority from /scheduler/util to /api/pod 2019-09-24 22:02:13 +05:30
Mark Janssen
345e528c86 Fix staticcheck failures for pkg/scheduler/... 2019-09-23 22:49:59 +02:00
Abdullah Gharaibeh
89f936f6ac Modified the Filter interface to pass in nodeinfo instead of node name.
This is necessary to support preemption, which relies on passing modified nodeinfo objects to the filters to simulate evicting lower-priority pods.
2019-09-18 17:27:33 -04:00
Han Kang
8da448dbe3 migrate scheduler metrics endpoint to metrics stability framework 2019-08-28 03:40:43 -07:00
draveness
ffef11f768 feat(scheduler): move node info snapshot out of internal package 2019-08-23 22:32:16 +08:00
draveness
af2e0428f6 feat: use PreBind instead of Prebind in the scheduling framework 2019-08-23 02:09:19 +08:00
draveness
03f0934c80 feat: use PostBind instead of Postbind in the scheduling framework 2019-08-23 02:09:12 +08:00
draveness
f3816fb757 feat: use PreFilter instead of Prefilter in the scheduling framework 2019-08-23 02:09:00 +08:00
Cong Liu
e50a24d64c Move RunNormalizeScorePlugins and ApplyScoreWeights into RunScorePlugins; Also add unit tests for RunScorePlugins. 2019-08-20 13:18:32 -04:00
Kubernetes Prow Robot
8c6c94bad2
Merge pull request #81148 from wgliang/bugfix/scheduler-heap-race
Fix two race issues in schedule_queue
2019-08-14 16:52:36 -07:00
Kubernetes Prow Robot
1906650d92
Merge pull request #80901 from draveness/feature/use-map-instead-of-array
feat: use named array instead of array in normalizing score
2019-08-14 03:28:25 -07:00
Guoliang Wang
ca61b79996 Fix two race issues in scheduling_queue_test 2019-08-09 07:50:02 +08:00
draveness
aa5f9fda52 feat: use named array instead of score array in normalizing score 2019-08-08 08:19:49 +08:00
Wei Huang
139d9a1b1e
Fixed a racing issue in scheduler UT
pkg/scheduler/internal/queue/scheduling_queue_test.go#TestPriorityQueue_AddUnschedulableIfNotPresent_Backoff has racing issue.
2019-08-06 12:04:21 -07:00
draveness
feb64858aa feat: implement "post-filter" extension point for scheduling framework 2019-08-02 10:12:54 +08:00
Cong Liu
34373662d3 Add NormalizeScore extension point for scheduler framework. 2019-07-30 20:02:13 -04:00
Youbing Li
7f9dd949e0 The implementation of Filter extension for the new framework 2019-07-17 03:28:30 -04:00
Abdullah Gharaibeh
c54c4d1962 Score plugin for the scheduling framework. 2019-07-16 09:38:37 -04:00
Chun Chen
3bb1a081ab Revert "Revert "Add Bind extension point of the scheduling framework""
This reverts commit b8950dab50.
2019-07-15 23:36:02 +08:00
draveness
b8950dab50 Revert "Add Bind extension point of the scheduling framework" 2019-06-22 22:52:57 +08:00
Chun Chen
b339c0a8bf Add Bind extension point of the scheduling framework 2019-06-20 15:56:01 +08:00
Kubernetes Prow Robot
3b146147e8
Merge pull request #78746 from danwinship/test-name-typo
Fix spelling of test name
2019-06-14 15:25:56 -07:00
Abdullah Gharaibeh
a61a437ef2 prefilter extension point implementation. 2019-06-10 17:01:50 -04:00
Dan Winship
78ea7b7fd8 Fix spelling of test name 2019-06-05 16:04:22 -04:00
Guoliang Wang
20f9c9940e Add Post-bind extension point to the scheduling framework 2019-05-19 18:12:16 +08:00
draveness
d60bccc6a4 feat: implement "queue-sort" extension point for scheduling framework 2019-05-15 09:40:15 +08:00
xiuqiao
36effb4700 Remove FIFO scheduling queue and old pod backoff logic 2019-04-25 07:35:22 +08: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
Wei Huang
2b554b4286
scheduler: cleanup unused parameters in unschedulableQ 2019-03-13 11:54:16 -07: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
wangqingcan
ea9e1a4118 not updae timestamp for each scheduling attempt 2019-02-22 09:46:18 +08:00
Bobby (Babak) Salamat
ec0739bd03 Fix races in scheduling queue tests 2019-02-11 16:38:26 -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
wangqingcan
28e6bbc175 acquire lock before operating unschedulablepodsmap 2019-01-18 04:24:18 +08:00
wangqingcan
de8cfdcd79 add goroutine to move unschedulablepods to activeq regularly 2019-01-16 12:08: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
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
Bobby (Babak) Salamat
7044145920 Fix race in setting nominated node 2018-12-29 22:54:15 -08:00