Commit Graph

72 Commits (152f0a150e891fa1bede03450fffa0b6942eb64d)

Author SHA1 Message Date
Wei Huang 49346c1e04
shorten scheduler package alias for better readability
- schedulerinternalcache -> internalcache
2019-03-21 18:14:19 -07:00
Kubernetes Prow Robot 9b8c58644a
Merge pull request #74418 from danielqsj/duration
convert latency/latencies in metrics name to duration
2019-03-01 17:58:12 -08:00
danielqsj f7b437cae0 convert latency in mertics name to duration 2019-02-22 21:40:13 +08:00
wangqingcan ea9e1a4118 not updae timestamp for each scheduling attempt 2019-02-22 09:46:18 +08:00
Mayank Kumar e0a7d96632 Move informer event handlers to Scheduler 2019-01-29 17:53:20 -08:00
Kubernetes Prow Robot b91cbf7b4e
Merge pull request #72332 from danielqsj/ks
Change scheduler metrics to conform metrics guidelines
2019-01-14 22:05:52 -08:00
Kubernetes Prow Robot ccb1e1f26d
Merge pull request #72045 from cofyc/fix71928
Make volume binder resilient to races
2019-01-11 17:42:32 -08:00
Kubernetes Prow Robot 2c8b571d57
Merge pull request #71875 from wgliang/cleanup/remove-newfrom-functions
Move users of `factory.NewConfigFactory` to `scheduler.New`
2019-01-09 13:55:51 -08:00
Yecheng Fu cfc8ef51d1 Make volume binder resilient to races: scheduler change
There is no need to clear stale pod binding cache in scheduling, because
it will be recreated at beginning of each schedule loop, and will be
cleared when pod is removed from scheduling queue.
2019-01-09 10:50:07 +08:00
Guoliang Wang 3c24c99b08 Move users of `factory.NewConfigFactory` to `scheduler.New` 2019-01-09 06:40:30 +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 5b42a84cde Change scheduler metrics to conform guideline 2019-01-08 11:16:01 +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
Kubernetes Prow Robot 1c2624effc
Merge pull request #71926 from wgliang/feature/modify-scheduler-result-and-add-log
[scheduler] Modify the scheduling result struct and improve logging f…
2019-01-03 14:37:50 -08:00
Guoliang Wang 3e69638772 [scheduler] Modify the scheduling result struct and improve logging for successful binding 2019-01-03 11:00:35 +08:00
Kubernetes Prow Robot 65f87b5a4a
Merge pull request #72259 from bsalamat/fix_nominated_node
Fix a race in setting nominated node and the scheduling cycle after it.
2018-12-30 00:01:26 -08:00
Bobby (Babak) Salamat 7044145920 Fix race in setting nominated node 2018-12-29 22:54:15 -08:00
Jordan Liggitt 73dcfe12da Stop checking VolumeScheduling feature gate 2018-12-27 17:45:45 -05:00
wangqingcan 1081e919e3 Eclass Task 1: clean up old equiv class code
Co-authored-by: Harry Zhang <resouer@gmail.com>
Co-authored-by: Wang Qingcan <wangqingcan@baidu.com>
2018-12-17 17:05:49 -08:00
Kubernetes Prow Robot 1d59ab05fa
Merge pull request #71118 from ping035627/k8s-181115
Add some exception handling of Preempt
2018-12-17 12:10:31 -08:00
PingWang 98f852a441 Add some exception handling of Preempt
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

revert options

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update returns for Preempt

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

revert Preempt returns

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

go fmt

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update the preempt

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

move preemptionStartTime := time.Now() from line 496 to the else block.

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2018-12-10 08:44:10 +08:00
Bobby (Babak) Salamat f74b30868c Add plugin invocation for 'reserve' and 'prebind' plugins to the scheduler. 2018-11-30 16:03:47 -08:00
Yecheng Fu 8fc00ebda6 Clear pod binding cache. 2018-11-21 11:24:53 +08:00
k8s-ci-robot 1f3057b7fb
Merge pull request #70898 from Huang-Wei/preemption-issue
ensure scheduler preemptor behaves in an efficient/correct path
2018-11-16 20:27:35 -08:00
Wei Huang b4fd11512a
ensure scheduler preemptor behaves in an efficient/correct path
- don't update nominatedMap cache when Pop() an element from activeQ
- instead, delete the nominated info from cache when it's "assumed"
- unit test behavior adjusted
- expose SchedulingQueue in factory.Config
2018-11-16 14:22:15 -08:00
PingWang 9e760732c3 Refactor New function
Signed-off-by: PingWang <wang.ping5@zte.com.cn>

add comments for InitPolicyFromFile

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

make the methods package private

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2018-11-15 14:30:19 +08:00
Davanum Srinivas 954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Dr. Stefan Schimanski d91feb6d18 kube-scheduler: move stopCh creation out of scheduler factory code
Enforces clean ownership of the channel.
2018-11-08 16:43:59 +01:00
wangqingcan 608911d5ac add test for new constructor 2018-10-10 17:15:10 +08:00
wangqingcan a74fd15e62 create a new scheduler constructor 2018-10-10 17:10:10 +08:00
Guoliang Wang 187e2e01c9 Move scheduler cache interface and implementation to pkg/scheduler/internal/cache 2018-10-06 20:48:59 +08:00
k8s-ci-robot 14949b302f
Merge pull request #68724 from krmayankk/sched1
scheduler: improve readability of bind function
2018-10-01 18:04:04 -07:00
Mayank Kumar 1ae12337db scheduler: add error handling for bind 2018-09-28 21:13:21 -07:00
Wei Huang 9da576f03c
move SchedulingQueue to pkg/scheduler/internal/queue 2018-09-28 11:51:02 -07:00
k8s-ci-robot db1d1c8674
Merge pull request #68700 from Huang-Wei/schedulingQ-graceful-shutdown
shutdown schedulingQueue gracefully
2018-09-28 00:46:14 -07:00
Wei Huang be661fddb4
shutdown schedulingQueue gracefully
- add Close() to interface SchedulingQueue
- implement Close() for FIFO and PriorityQueue
- add unit test
2018-09-27 14:32:58 -07:00
k8s-ci-robot 823530d4db
Merge pull request #68917 from zhangmingld/fixwordserr
Fix some typo err
2018-09-26 22:59:32 -07:00
k8s-ci-robot 28d86ac47d
Merge pull request #67308 from cofyc/fix67260
Use monotonically increasing generation to prevent equivalence cache race
2018-09-25 00:18:00 -07:00
Jonathan Basseri b0a8dbbc9d Add scheduler throughput metric.
This adds a counter to the scheduler that can be used to calculate
throughput and error ratio. Pods which fail to schedule are not counted
as errors, but can still be tracked separately from successes.

We already measure scheduler latency, but throughput was missing. This
should be considered a key metric for the scheduler.
2018-09-24 14:38:39 -07:00
Yecheng Fu b3f1e1200b Update notes to document why invalidation order is important. 2018-09-22 12:09:24 +08:00
zhangmingld 6aaeb209eb fix some typo 2018-09-21 10:19:35 +08:00
Michelle Au 01d83fa104 Scheduler changes to assume volume and pod together, and then bind
volume and pod asynchronously afterwards. This will also make it easier
to migrate to the scheduler framework.
2018-09-04 16:30:14 -07:00
Łukasz Osipiuk fa39053412 Add back predicate related accessors to scheduler.Configurator 2018-09-03 19:12:01 +02:00
Klaus Ma 26142e614c Wait for Scheduler cache empty.
Signed-off-by: Klaus Ma <klaus1982.cn@gmail.com>
2018-08-31 19:42:10 +08:00
Jonathan Basseri fbf3d2b84c Delete dead code in pkg/scheduler.
This deletes some unused functions from the `Configurator` interface.
2018-08-15 17:14:38 -07:00
foxyriver 3b4f250c4a fix error log 2018-07-26 19:48:48 +08:00
Avesh Agarwal c0cffb8a34 Increase glog level of some scheduling errors. 2018-06-28 23:34:29 -04:00
Shyam Jeedigunta b9ae20c99e Split scheduler latency metric to fine-grained steps 2018-06-21 14:19:39 +02:00
Jonathan Basseri b571065bc4 Clean up names in equivalence package.
Remove stutter from names and provide more idiomatic patterns.

This makes call sites that use equivalence cache easier to read.
2018-06-20 10:52:33 -07:00
Jonathan Basseri 31c746d960 Move equivalence cache into new package.
This moves the equivalence cache implementation out of the 'core'
package and into k8s.io/kubernetes/pkg/scheduler/core/equivalence.

Separating the equiv. cache from the genericScheduler implementation
make their interaction points easier to follow, and prevents us from
accidentally accessing unexported fields.
2018-06-20 10:52:32 -07:00