Commit Graph

1868 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
3c4ae1c89a
Merge pull request #84606 from alculquicondor/test/priorities
Add benchmark test to compare EvenPodsSpreadPriority and SelectorSpreadingPriority
2019-11-05 22:18:10 -08:00
Kubernetes Prow Robot
042b17ef19
Merge pull request #83619 from damemi/cc-nilable
Change Scheduler ComponentConfig fields to nilable pointers
2019-11-05 22:17:13 -08:00
Wei Huang
019d7497a5
bazel files 2019-11-05 20:57:21 -08:00
Wei Huang
dd74205bcf
Move out const strings in pkg/scheduler/api/well_known_labels.go 2019-11-05 20:56:21 -08:00
Abdullah Gharaibeh
c33f217a5d tracking nodes with pod with affinity 2019-11-05 20:02:33 -05:00
Kubernetes Prow Robot
83b991a9c6
Merge pull request #84578 from denkensk/add-event-deleteandreject-podinwaiting
Update the event handler for deleting pods to reject the waiting pod
2019-11-05 15:31:18 -08:00
Mike Dame
9e2591f867 Change scheduler ComponentConfig fields to nilable
As part of graduating the scheduler's component config to beta, we require configurable fields to be nilable pointers (see https://github.com/kubernetes/kubernetes/issues/78109). This enables the ability to distinguish between default and unset values. We are only applying this change to external types, and reacting in our defaulting logic. This also reverts existing internal component config fields which were pointers to be non-pointers, for consistency.
2019-11-05 17:06:06 -05:00
Cong Liu
97d641b129 Aggregate mulitple NodePreference custom priorities to a single score plugin. 2019-11-05 16:25:19 -05:00
Kubernetes Prow Robot
75aca1fe03
Merge pull request #84795 from ahg-g/ahg-custom
Convert multiple node label predicates to be a single filter plugin
2019-11-05 11:45:11 -08:00
Abdullah Gharaibeh
134baa50b9 Convert multiple node label predicates to be a single filter plugin. 2019-11-05 10:34:51 -05:00
Alex Wang
83dce763ec add event to remove and reject waitingpods 2019-11-05 22:04:44 +08:00
Abdullah Gharaibeh
f8ae5cdaf8 expose PredicateMetadataProducer in generic scheduler 2019-11-05 05:17:47 -05:00
Aldo Culquicondor
75d5227225 Add benchmark test to compare EvenPodsSpreadPriority and SelectorSpreadPriority
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-11-04 13:29:17 -05:00
Cong Liu
b19f478b57 Validate custom priority policy config.
- Do not validate redeclartion of custom predicates.
- Validate no duplicate declaration of RequestedToCapacityRatio
- Validate the weights across multiple declarations of LabelPreference/ServiceAntiAffinity are the same.
2019-11-04 11:13:43 -05:00
Wei Huang
703a669db3
autogen files
- make generated_files
- update-bazel.sh & update-vendor.sh)
2019-11-01 14:38:09 -07:00
Wei Huang
c649666b4a
manual API changes and code refactoring
- add Policy API to pkg/scheduler/apis/config and staging/src/k8s.io/kube-scheduler/config/v1
- dual-register Policy as apiGroup "v1" and "kubescheduler.config.k8s.io
- move/merge pkg/scheduler/api to pkg/scheduler/apis/config/...
- alias schedulerapi to pkg/scheduler/apis/config
- alias legacyapi to pkg/scheduler/api
- eliminate latest.Codec; use scheme.Codecs instead
- unit tests to verify Policy YAML with version "v1" or "kubescheduler.config.k8s.io/v1" can be loaded properly
- update api/api-rules/violation_exceptions.list
2019-11-01 14:24:36 -07:00
SataQiu
89c3673a53 scheduler: improve some comments and validation messages 2019-11-01 18:30:54 +08:00
caiweidong
fd6983c70f simplify volume zone checker 2019-11-01 13:38:25 +08:00
Kubernetes Prow Robot
345ca19369
Merge pull request #84262 from Huang-Wei/eps-prio-migration
Migrate EvenPodsSpread priority implementation  as Score plugin with map/reduce style
2019-10-31 14:18:38 -07:00
draveness
b8a353a8a6 feat: make prioritizeNodes private function of genericScheduler 2019-10-31 19:43:53 +08:00
Wei Huang
90603728fb
Migrate EvenPodsSpread Priority as Score plugin in map/reduce style 2019-10-31 00:52:37 -07:00
Kubernetes Prow Robot
a381f7cb3e
Merge pull request #83508 from damemi/scheduler-cache-metric
Add scheduler cache size metrics
2019-10-30 16:55:36 -07:00
Mike Dame
828d6622a9 Update bazel 2019-10-30 15:33:29 -04:00
Mike Dame
4735011287 Add scheduler cache size metrics 2019-10-30 15:33:29 -04:00
Kubernetes Prow Robot
409b468734
Merge pull request #84520 from mrkm4ntr/migrate-requested-to-capacity-ratio
RequestedToCapacityRatio as score plugin
2019-10-30 10:32:54 -07:00
Shintaro Murakami
4b72af9f00 RequestedToCapacityRatio as score plugin 2019-10-30 22:00:20 +09:00
Abdullah Gharaibeh
0a29c06ba6 delete nodeinfo lister 2019-10-30 08:59:18 -04:00
Kubernetes Prow Robot
86dbdbeb53
Merge pull request #84190 from notpad/bug/84161
Apply feature gates in scheduler policy api compatibility test
2019-10-30 04:10:53 -07:00
Kubernetes Prow Robot
87c60f32ff
Merge pull request #84542 from Huang-Wei/priority-meta-signature
Expose filteredNodes to func PriorityMetadataProducer
2019-10-30 02:30:59 -07:00
Kubernetes Prow Robot
8d8a068486
Merge pull request #83963 from damemi/duplicate-policies
Add Scheduler validation check for redeclared policy configs
2019-10-29 23:14:53 -07:00
Wei Huang
a4305a356c
Expose filteredNodes to func PriorityMetadataProducer 2019-10-29 18:40:47 -07:00
Abdullah Gharaibeh
c6baa263a3 Update priorities to use SharedLister instead of using the snapshot directly 2019-10-29 16:22:00 -04:00
Kubernetes Prow Robot
5f900f6332
Merge pull request #84389 from ahg-g/ahg-interpod
Predicates use SharedLister interface instead of NodeInfo Map
2019-10-29 13:06:53 -07:00
Jun Gong
81b705960f Cancel context to make sure all plugins are cancelled when each schedule finishes 2019-10-29 22:37:59 +08:00
Jun Gong
b4c2b00690 Make sure score plugins are executed when no priority configured 2019-10-29 17:25:35 +08:00
Mike Dame
0f15705328 Add unit test for scheduler custom policy redeclaration validation 2019-10-28 16:26:13 -04:00
Kubernetes Prow Robot
badcd4af3f
Merge pull request #84084 from wojtek-t/migrate_scheduler_to_endpoints_lease_lock
Migrate components to EndpointsLeases leader election lock
2019-10-28 08:43:27 -07:00
wojtekt
ce499ac286 Migrate components to EndpointsLeases leader election lock 2019-10-28 09:09:03 +01:00
Jun Gong
2a85727ec5 When schedule begins, run snapshot before prefilter plugins 2019-10-28 14:59:42 +08:00
Kubernetes Prow Robot
41730db3f0
Merge pull request #84297 from liu-cong/custompred
Convert NodeLabelPresence custom predicate to filter plugin.
2019-10-26 09:57:23 -07:00
Kubernetes Prow Robot
d379ab2697
Merge pull request #84288 from wojtek-t/cleanup_conversions_registrations
Cleanup conversions registrations
2019-10-25 22:53:22 -07:00
Cong Liu
571cea0519 Convert NodeLabelPresence custom predicate to filter plugin. 2019-10-25 19:31:17 -04:00
notpad
f67ccbeee5 Apply feature gates in scheduler policy api compatibility test 2019-10-26 07:28:01 +08:00
Abdullah Gharaibeh
05cb382357 Update PredicateMetadataProducer to accept a scheduler SharedLister instead of nodeinfomap 2019-10-25 19:19:23 -04:00
Abdullah Gharaibeh
8ec56aeafb Change all scheduler's Node and Pod list/lookups to be from the snapshot rather than the cache. 2019-10-25 14:24:55 -04:00
Kubernetes Prow Robot
4ee1e7510f
Merge pull request #84328 from zouyee/renamefakelister
rename scheduler fake listers
2019-10-25 11:15:51 -07:00
zouyee
b86dbb97df rename scheduler fake listers
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-25 13:09:01 +08:00
Jordan Liggitt
0e2f2dde4d Feature-gate CSINode and CSIDriver informer starts 2019-10-24 17:44:25 -04:00
Kubernetes Prow Robot
09a251ce92
Merge pull request #84274 from liggitt/beta-gate-pdb-informers
Feature-gate PDB informer starts
2019-10-24 11:56:34 -07:00
Kubernetes Prow Robot
b0c0155c19
Merge pull request #84192 from zouyee/removewrapper
Remove wrappers around storage-related listers in the predicate
2019-10-24 11:56:10 -07:00
Kubernetes Prow Robot
4fdf582687
Merge pull request #84011 from liu-cong/permit
Add permit_wait_duration_seconds metric for scheduler.
2019-10-24 11:55:41 -07:00
wojtekt
7b6bcdf780 Autogenerated code 2019-10-24 20:21:00 +02:00
zouyee
3bfdcf56e6 Remove wrappers around storage-related listers in the predicate
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-24 23:26:15 +08:00
Kubernetes Prow Robot
c08161a781
Merge pull request #84268 from draveness/feature/remove-wait-for-cache-sync
feat: remove WaitForCacheSync from scheduler factory
2019-10-24 06:12:20 -07:00
Kubernetes Prow Robot
2905275a08
Merge pull request #84264 from ahg-g/ahg-antiaffinity
Optimize interpod affinity priority function
2019-10-24 00:47:20 -07:00
Jordan Liggitt
feac7a40f5 Feature-gate PDB informer starts 2019-10-24 01:17:39 -04:00
draveness
76a42fb29b feat: remove WaitForCacheSync from scheduler factory 2019-10-24 10:19:35 +08:00
Abdullah Gharaibeh
b213255bc8 interpod affinity prioritize 2019-10-23 21:03:02 -04:00
Mike Dame
5296650c1c Add Scheduler validation check for redeclared plugin configs 2019-10-23 17:07:55 -04:00
Abdullah Gharaibeh
373cf8c1b1 move nodeinfo/snapshot.go into its own package 2019-10-23 16:12:13 -04:00
Kubernetes Prow Robot
a90b9402c9
Merge pull request #84232 from ahg-g/ahg-tree2
fixed node search starting point
2019-10-23 12:52:16 -07:00
Kubernetes Prow Robot
4f63f61c36
Merge pull request #84193 from ahg-g/ahg-list
Separate scheduler listers into their own package
2019-10-23 12:51:30 -07:00
Cong Liu
f32d735b50 Add permit_wait_duration_seconds metric for scheduler. 2019-10-23 09:01:27 -04:00
Abdullah Gharaibeh
d17cf7ddff fixed node search starting point 2019-10-23 07:51:56 -04:00
Kubernetes Prow Robot
0c3424f53c
Merge pull request #83535 from wgliang/cleanup/scheduler_goroutines
Add a metric to track number of scheduler binding and prioritizing goroutines
2019-10-22 23:18:41 -07:00
Abdullah Gharaibeh
d393804237 separate listers into their own package 2019-10-22 18:11:02 -04:00
draveness
09f333940e feat: remove CheckNodeMemoryPressure/DiskPressure/PIDPressure/Condition predicates 2019-10-22 15:28:32 +08:00
Kubernetes Prow Robot
ffffd6b6f5
Merge pull request #84148 from gongguan/filter_plugin
[migration phase 1] Add filter plugin for cloud provider storage predicate
2019-10-21 21:12:19 -07:00
Kubernetes Prow Robot
899ca689ad
Merge pull request #83983 from phiremande/phk-kube-dev
Issue 83458:Changed the return check for GetNodeInfo
2019-10-21 21:11:58 -07:00
Kubernetes Prow Robot
8138e8d012
Merge pull request #83310 from SataQiu/clean-scheduler-20190930
scheduler: make getVolumeLimits a function instead of a method
2019-10-21 12:38:06 -07:00
Pradeep Hiremande
678b670f92 Issue 83458:Changed the return check for GetNodeInfo 2019-10-21 21:51:31 +05:30
louisgong
70ca08ec89 filter plugin for cloud provider storage predicate 2019-10-21 23:56:23 +08:00
Guoliang Wang
9d173852c1 Add a metric to track number of scheduler prioritizing goroutines 2019-10-21 16:38:14 +08:00
Guoliang Wang
08f7b22025 Add a metric to track number of scheduler binding goroutines 2019-10-21 16:38:12 +08:00
Kubernetes Prow Robot
ac6c77c440
Merge pull request #84121 from zouyee/renamefit
rename FilterPlugin NodeResources
2019-10-20 20:45:37 -07:00
Kubernetes Prow Robot
019b662ff5
Merge pull request #84017 from ahg-g/ahg-csi
Remove CSINode from scheduler cache.
2019-10-20 03:17:37 -07:00
zouyee
04340eaa34 rename FilterPlugin NodeResources
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-20 12:51:16 +08:00
Kubernetes Prow Robot
e1685b5b59
Merge pull request #84074 from zouyee/proirity
LeastRequestedPriority/MostRequestedPriority/BalancedResourceAllocation as Score plugins
2019-10-19 17:21:37 -07:00
Kubernetes Prow Robot
9c25b16d88
Merge pull request #84099 from draveness/feature/remove-lister-wrapper
feat(scheduler): replace several algorithm listers with client listers
2019-10-19 08:05:37 -07:00
zouyee
bd4167d149 remove unused meta and rename lablance_allocated
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-19 22:43:15 +08:00
Kubernetes Prow Robot
7e53c9d808
Merge pull request #83756 from hex108/permit
Refactor scheduler's framework permit API
2019-10-19 06:47:37 -07:00
zouyee
408c9da2a6 LeastRequestedPriority/MostRequestedPriority/BalancedResourceAllocation as Score plugins
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-19 20:49:05 +08:00
draveness
ce33fcc311 feat: remove FakePDBLister 2019-10-19 19:10:42 +08:00
draveness
00a12c787c feat: implement node unschedulable as a filter plugin 2019-10-19 17:29:25 +08:00
draveness
e1f86e3460 feat(scheduler): replace several algorithm listers with client listers 2019-10-19 17:26:32 +08:00
Jun Gong
38b7668bb3 Refactor scheduler's framework permit API 2019-10-19 16:22:39 +08:00
Kubernetes Prow Robot
2b79d284fd
Merge pull request #84066 from Huang-Wei/eps-migration
Migrate EvenPodsSpread Predicate to Filter plugin
2019-10-18 21:54:12 -07:00
Abdullah Gharaibeh
a772722660 Remove CSINode from scheduler cache. 2019-10-19 03:52:22 +00:00
Kubernetes Prow Robot
aab740ffc2
Merge pull request #82703 from draveness/feature/graduate-taint-nodes-by-condition-to-ga
feat: update taint nodes by condition to GA
2019-10-18 20:01:37 -07:00
draveness
1163a1d51e feat: update taint nodes by condition to GA 2019-10-19 09:17:41 +08:00
Kubernetes Prow Robot
98fcf2e6c7
Merge pull request #84034 from mrkm4ntr/use-informer-factory
Use frameworkHandle to get listers
2019-10-18 15:21:57 -07:00
Kubernetes Prow Robot
70f68062ad
Merge pull request #84014 from ahg-g/ahg-tree
Make node tree order part of the snapshot
2019-10-18 15:21:37 -07:00
Wei Huang
64ff958e69
migrate EvenPodsSpread Predicate to Filter plugin 2019-10-18 14:18:02 -07:00
Abdullah Gharaibeh
63d7733e98 create an ordered list of nodes instead of iterating over the tree 2019-10-18 12:51:46 -04:00
Shintaro Murakami
bf256bcb00 Use frameworkHandle to get listers 2019-10-19 01:29:05 +09:00
Kubernetes Prow Robot
27c679baca
Merge pull request #83982 from lichuqiang/frame_mig1
[migration phase 1] MatchInterPodAffinity as filter plugin
2019-10-18 09:23:58 -07:00
Kubernetes Prow Robot
422256110e
Merge pull request #84073 from draveness/feature/cleanup-framework-plugins
feat: several cleanups in the scheduling package
2019-10-18 04:43:57 -07:00
lichuqiang
671f7690fe [migration phase 1] MatchInterPodAffinity as filter plugin 2019-10-18 16:26:34 +08:00
Kubernetes Prow Robot
d1a79f136b
Merge pull request #84054 from ahg-g/ahg-gp
GeneralPredicate as framework plugin config
2019-10-17 21:19:58 -07:00
draveness
39af760930 feat: several cleanups in the scheduling package
+ Remove unused variable in tests.
+ Use more common statement for interface conformance check.
+ Fix several comments in the framework plugins.
2019-10-18 11:14:05 +08:00
Kubernetes Prow Robot
9bf2ba7369
Merge pull request #84015 from ahg-g/ahg-filters
cleanup unnecessary func parameters in genericScheduler methods
2019-10-17 19:50:56 -07:00
Kubernetes Prow Robot
91050062f9
Merge pull request #83894 from notpad/feature/migration_nodevolumelimit
[migration phase 1] CSIMaxVolumeLimitChecker as filter plugin
2019-10-17 19:50:41 -07:00
Abdullah Gharaibeh
517116921b GeneralPredicate as plugin config 2019-10-17 11:13:57 -04:00
Abdullah Gharaibeh
1293facf7b cleanup unnecessary func parameters in genericScheduler methods 2019-10-17 10:31:14 -04:00
notpad
f06925b0ee [migration phase 1] CSIMaxVolumeLimitChecker as filter plugin 2019-10-17 22:04:02 +08:00
draveness
3d74da4d53 feat(scheduler): implement node affinity as score plugin 2019-10-17 17:02:10 +08:00
Kubernetes Prow Robot
3719fcdffa
Merge pull request #82072 from draveness/feature/use-context-instead-of-channel
feat(scheduler): use context in scheduler package
2019-10-17 01:46:39 -07:00
Abdullah Gharaibeh
17a6a7914c make sure filters are executed when no predicates configured 2019-10-16 21:27:57 -04:00
draveness
47a6c5b693 feat(scheduler): use context in the scheduler package
+ Use context instead of stopCh
+ Add context to the scheduling framework interface
2019-10-17 09:03:55 +08:00
Kubernetes Prow Robot
f7091992c0
Merge pull request #83577 from liu-cong/queue-metrics
Add incoming pod metrics to scheduler queue.
2019-10-16 17:34:39 -07:00
Kubernetes Prow Robot
0e2383df15
Merge pull request #83893 from draveness/feature/node-prefer-avoid-pods
feat(scheduler): implement NodePreferAvoidPods as score plugin
2019-10-16 11:37:30 -07:00
Cong Liu
fc226e0670 Add incoming pod metrics to scheduler queue. 2019-10-16 14:26:16 -04:00
Kubernetes Prow Robot
99ad2f4303
Merge pull request #83921 from ahg-g/ahg-nodelist
Move scheduler cache ListNodes interface to snapshot
2019-10-16 09:35:09 -07:00
Kubernetes Prow Robot
1552ba6b00
Merge pull request #83569 from liu-cong/framework-metrics
Add metrics for scheduler framework.
2019-10-15 23:05:28 -07:00
Cong Liu
da30a00f9a Add metrics for scheduler framework. 2019-10-14 20:26:03 -04:00
Abdullah Gharaibeh
e073e56095 move scheduler cache ListNodes interface to snapshot 2019-10-14 17:47:42 -04:00
draveness
2d7044a556 feat(scheduler): implement NodePreferAvoidPods as score plugin 2019-10-14 21:21:24 +08:00
notpad
4ff7251026 [migration phase 1] VolumeZoneChecker as filter plugin 2019-10-14 07:45:40 +08:00
Kubernetes Prow Robot
5a427e8704
Merge pull request #83659 from wgliang/scheduler-v2/pod-fits-host-ports
[migration phase 1] PodFitsHostPorts as filter plugin
2019-10-13 11:18:35 -07:00
Kubernetes Prow Robot
dd5cb6426d
Merge pull request #83849 from draveness/feature/node-locality-as-score-plugin
feat: implement imagelocality as a score plugin
2019-10-13 06:36:35 -07:00
draveness
6f6618fc5d feat: implement imagelocality as a score plugin 2019-10-13 19:58:21 +08:00
Guoliang Wang
78be6a628d [migration phase 1] PodFitsHostPorts as filter plugin 2019-10-13 19:47:26 +08:00
Kubernetes Prow Robot
a78340410e
Merge pull request #83650 from wgliang/scheduler-v2/pod-fits-resources
[migration phase 1] PodFitsResources as framework plugin
2019-10-13 03:38:36 -07:00
Guoliang Wang
4ca3d9ca48 [migration phase 1] PodFitsResources as framework plugin 2019-10-13 12:02:24 +08:00
Ahmad Diaa
4448a1cea9 move factory package to scheduler 2019-10-12 23:03:07 +02:00
Kubernetes Prow Robot
aee99ce807
Merge pull request #83558 from hprateek43/sortable_list_package
Move Sortable List into its own package
2019-10-12 11:40:38 -07:00
Harsh Singh
589656108e Replaced sortable list with native golang slice. 2019-10-12 21:57:28 +05:30
Guoliang Wang
0a1808a570 [migration phase 1] PodMatchNodeSelector/NodAffinity as filter plugin 2019-10-12 14:49:55 +08:00
Kubernetes Prow Robot
a7a6ca80d8
Merge pull request #83731 from notpad/feature/migration_nodiskconflict
[migration phase 1] NoDiskConflict as filter plugin
2019-10-11 21:16:52 -07:00
Kubernetes Prow Robot
08ab271105
Merge pull request #83389 from ahmad-diaa/move-PodPreemptor-to-sched
Move PodPreemptor to Scheduler
2019-10-11 21:16:39 -07:00
notpad
9e426a6be1 [migration phase 1] NoDiskConflict as filter plugin 2019-10-12 08:00:44 +08:00
Kubernetes Prow Robot
1e5a9f3ff4
Merge pull request #83522 from draveness/feature/expand-node-score-range
feat(scheduler): expand node score range to [0, 100]
2019-10-11 16:20:38 -07:00
Ahmad Diaa
6bbc607d72 move PodPreemptor to scheduler 2019-10-11 22:57:39 +02:00
Kubernetes Prow Robot
54f089fa08
Merge pull request #83603 from Tabrizian/master
feat: change the `pod_preemption_victims` to Histogram
2019-10-11 10:53:43 -07:00
Kubernetes Prow Robot
77b86c4adf
Merge pull request #83764 from cofyc/fix83635
[migration phase 1] Implement CheckVolumeBinding as a filter plugin
2019-10-11 09:29:52 -07:00
Kubernetes Prow Robot
c980000176
Merge pull request #83663 from draveness/feature/add-shared-informers-factory
feat(scheduler): expose SharedInformerFactory to the framework handle
2019-10-11 09:29:40 -07:00
draveness
1f52bd80d1 feat(scheduler): expand node score range to [0, 100] 2019-10-11 23:43:09 +08:00
Kubernetes Prow Robot
d38f340e4f
Merge pull request #83539 from wgliang/cleanup/trace-steps-generic_scheduler
Add more tracing steps in generic_scheduler
2019-10-11 07:29:41 -07:00
Yecheng Fu
e8795562f9 [migration phase 1] Implement CheckVolumeBinding as a filter plugin 2019-10-11 20:35:11 +08:00
Guoliang Wang
b9167334ee [migration phase 1] PodFitsHost as filter plugin 2019-10-11 17:05:04 +08:00
Kubernetes Prow Robot
c1a735c642
Merge pull request #83601 from ahg-g/ahg-migration-priority
Implemented taints and tolerations priority function as a Score plugin
2019-10-11 00:05:50 -07:00
Guoliang Wang
d3e8f17987 Add more tracing steps in generic_scheduler 2019-10-11 10:39:41 +08:00
draveness
ee4dec65b5 feat(scheduler): expose SharedInformerFactory to the framework handle 2019-10-11 10:23:21 +08:00
Kubernetes Prow Robot
a5e6ac0a95
Merge pull request #83694 from ahg-g/ahg-adv-config
[migration phase 1] Make scheduler cache, volume binder and listers available when registering default plugins
2019-10-10 19:00:21 -07:00
Abdullah Gharaibeh
7429b0fe86 Implemented taints and tolerations priority function as a Score plugin 2019-10-10 17:49:40 -04:00
Cong Liu
085852160a Add per-pod metrics for scheduler. 2019-10-10 16:58:21 -04:00
Abdullah Gharaibeh
456df97745 made scheduler cache and volume binder available when instantiating factories for default plugins 2019-10-10 16:21:29 -04:00
Kubernetes Prow Robot
2d8b8703de
Merge pull request #83686 from ahg-g/ahg-noop
Remove the no-op plugin
2019-10-10 01:12:53 -07:00
Iman Tabrizian
451a535401 feat: feat: change the pod_preemption_victims to Histogram 2019-10-09 18:28:32 -04:00
Abdullah Gharaibeh
36a0f8a03f remove the no-op plugin that we used as an example plugin in default registry 2019-10-09 12:30:08 -04:00
draveness
9646afb1f5 feat: add pod initial/max backoff duration to config API 2019-10-09 19:48:28 +08:00
Kubernetes Prow Robot
e62ed95ecd
Merge pull request #83611 from RainbowMango/pr_refactor_scheduler_test_with_testutils
Refactor scheduler metric test with testutils
2019-10-08 20:00:25 -07:00
Kubernetes Prow Robot
0110db3a14
Merge pull request #83537 from ahg-g/ahg-metadata
Added PredicateMetadata and PriorityMetadata to framework's CycleState
2019-10-08 18:37:50 -07:00
Kubernetes Prow Robot
464952fcc8
Merge pull request #83286 from draveness/feature/refactor-predicate-metadata
feat(scheduler): refactor predicateMetadata into a collection of sub types
2019-10-08 15:42:42 -07:00
Abdullah Gharaibeh
1751c251d8 Addressed comments 2019-10-08 16:13:13 -04:00
Kubernetes Prow Robot
1501de6a56
Merge pull request #78461 from mysunshine92/correct-return-information-scheduler
correct the return information in scheduler.go
2019-10-08 09:37:13 -07:00
RainbowMango
c03b516d3a Deal with auto-generated files.
Update bazel by hack/update-bazel.sh;
Update vendor by hack/update-vendor.sh;
2019-10-08 15:55:12 +08:00
RainbowMango
832a4fbe99 Refactor metrics test from kube-schedule queue. 2019-10-08 15:39:30 +08:00
Abdullah Gharaibeh
bc550b0896 Added PredicateMetadata and PriorityMetadata as CycleState to the framework 2019-10-07 22:25:08 -04:00
draveness
9554276d17 feat(scheduler): create metadata and addPod/removePod for migration 2019-10-08 10:05:22 +08:00
draveness
ab3f55720b feat(scheduler): expose kubernetes client in framework handle 2019-10-06 10:31:49 +08:00
Kubernetes Prow Robot
1f81255070
Merge pull request #83460 from ahg-g/ahg-first-predicate
[migration phase 1] Implement PodToleratesNodeTaint as a filter plugin
2019-10-05 14:07:11 -07:00
Abdullah Gharaibeh
66386fdf49 Added the first predicate as a filter plugin: PodToleratesNodeTaints. 2019-10-05 08:43:17 -04:00
Kubernetes Prow Robot
9522fb09f9
Merge pull request #83233 from hprateek43/heapPackageMovement
Move heap into its own internal package
2019-10-05 03:15:23 -07:00
Kubernetes Prow Robot
4e1214c149
Merge pull request #83506 from alculquicondor/cleanup/framework_new
Cleanup reflection usage in framework creation
2019-10-04 16:31:44 -07:00
Harsh Singh
f462a31e9b Move heap into its own internal package 2019-10-05 01:24:36 +05:30
Abdullah Gharaibeh
043166f54b Modified the name of the Extensions method in the scheduler's framework. 2019-10-04 15:53:06 -04:00
Kubernetes Prow Robot
ca038117b2
Merge pull request #83490 from draveness/feature/scale-extender-output
feat(scheduler): scale the extender output in generic scheduler
2019-10-04 10:22:52 -07:00
Kubernetes Prow Robot
eba349b855
Merge pull request #83430 from draveness/feature/rename-plugincontext-to-cyclestate
feat(scheduler): rename PluginContext to CycleState
2019-10-04 10:22:32 -07:00
Kubernetes Prow Robot
6dde8daa76
Merge pull request #83030 from obitech/kube_scheduler_strict_serializer
Enable strict serializer in kube-scheduler
2019-10-04 10:22:04 -07:00
Aldo Culquicondor
984c4e8cc2 Cleanup reflection usage in framework creation
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-10-04 12:40:21 -04:00
draveness
27326e4f9a feat(scheduler): scale the extender output in generic scheduler 2019-10-04 17:32:34 +08:00
draveness
c73ff9749b feat(scheduler): rename PluginContext to CycleState 2019-10-04 17:30:36 +08:00
Kubernetes Prow Robot
3317805652
Merge pull request #83243 from draveness/feature/use-reflect-in-new-registry
feat(scheduler): use reflect to reduce the similar pattern
2019-10-03 14:39:54 -07:00
Kubernetes Prow Robot
0a17315e18
Merge pull request #83418 from ahg-g/ahg-first-priority
Refactor scheduler.New so that all framework-related parameters are options
2019-10-03 10:00:11 -07:00
Abdullah Gharaibeh
30e7016ccf Refactor scheduler.New so that all framework-related parameters are passed as options 2019-10-03 11:39:59 -04:00
Kubernetes Prow Robot
d8a5e489ea
Merge pull request #83342 from ahmad-diaa/move-PodConditionUpdater-to-sched
Move PodConditionUpdater to Scheduler
2019-10-03 02:04:14 -07:00
draveness
5e84257133 feat(scheduler): use reflect to reduce the similar pattern 2019-10-03 10:46:19 +08:00
Ahmad Diaa
6c75e1baa2 move PodConditionUpdater to scheduler 2019-10-02 23:29:49 +02:00
draveness
9769d49bb5 feat(scheduler): remove MaxPriority in the scheduler api 2019-10-02 11:24:25 +08:00
Kubernetes Prow Robot
dc0013a506
Merge pull request #83365 from notpad/feature/83244
A consistent interface for plugin extended functionality
2019-10-01 13:01:11 -07:00
Wei Huang
a01259ef6f
bazel and codegen files 2019-10-01 09:51:40 -07:00
Wei Huang
cbdb4e3fdb
refactor scheduler extender related API
- move extender related API from pkg/scheduler/api to pkg/scheduler/apis/extender/v1

- alias extenderv1 to pkg/scheduler/apis/extender/v1

- use NodeScore and NodeScoreList in non-extender logic
2019-10-01 09:51:24 -07:00
notpad
fc55e74741 A consistent interface for plugin extended functionality 2019-10-01 23:59:48 +08:00
Kubernetes Prow Robot
a87c1b2d72
Merge pull request #83099 from ahg-g/ahg-config-layer2
[migration] Mapping Layer - 2. Convert predicates/priorities configurations to a framework plugin one.
2019-09-30 08:57:38 -07:00
Abdullah Gharaibeh
6120fe9b11 Convert predicates/priorities configurations to a framework plugin configs. 2019-09-30 10:36:52 -04:00
SataQiu
92300eaadb scheduler: make getVolumeLimits a function instead of a method 2019-09-30 16:25:31 +08:00
mengyang02
a638431e4d complete pkg/scheduler/util unit tests 2019-09-30 10:58:11 +08:00
Kubernetes Prow Robot
14e5adfc85
Merge pull request #82683 from davidz627/fix/translationStruct
Refactor CSI Translation Library into a struct that is injected into various components to simplify unit testing
2019-09-29 10:11:37 -07:00
Kubernetes Prow Robot
654aa1d846
Merge pull request #83234 from SataQiu/scheduler-cleanup-20190927
scheduler: change PredicateMetadata.AddPod to use *v1.Node insead of rich *schedulernodeinfo.NodeInfo
2019-09-28 23:49:37 -07:00
SataQiu
bcaa991676 scheduler: code clean up for predicates/metadata 2019-09-29 10:11:53 +08:00
Kubernetes Prow Robot
29f23e6647
Merge pull request #83220 from RainbowMango/pr_remove_direct_reference_to_label
Remove direct reference to label
2019-09-28 11:47:38 -07:00
David Zhu
92cb06a2e7 Refactor CSI Translation Library into a struct that is injected into various components to simplify unit testing in future 2019-09-27 12:59:53 -07:00
SataQiu
20e3580066 scheduler: handle error of podSpreadCache.removePod method 2019-09-27 16:23:56 +08:00
RainbowMango
c0c1d8e985 Update bazel by hack/update-bazel.sh 2019-09-27 10:18:31 +08:00
RainbowMango
4cc175e8d8 Remove direct reference to prometheus.Label for scheduler 2019-09-27 10:16:31 +08:00
Kubernetes Prow Robot
5e4abfb946
Merge pull request #83042 from draveness/feature/remove-score-with-normalize-extension
feat(scheduler): consolidate ScoreWithNormalizePlugin into ScorePlugin
2019-09-26 10:49:20 -07:00
obitech
6acef2b94c Enable strict serializer with codec factory
- Enabling strict serializer will throw errors on e.g. duplicate
  or unknown fields in YAML configs
- Add test cases for duplicate and unknown fields
2019-09-26 17:41:07 +02:00
Kubernetes Prow Robot
67d750bb28
Merge pull request #81916 from hwdef/fix-typo-pkg
fix typo in pkg
2019-09-26 08:35:24 -07:00
Kubernetes Prow Robot
b34eede084
Merge pull request #83080 from ahg-g/ahg-config-layer
Mapping Layer - 1. A mapping from predicates/priorities to plugin configuration
2019-09-25 22:05:20 -07:00
draveness
314ec4e504 feat(scheduler): consolidate ScoreWithNormalizePlugin into ScorePlugin 2019-09-26 10:19:06 +08:00
Abdullah Gharaibeh
a57ac0725a A mapping from predicates/priorities to pluing configuration.
This PR only implements the mapping, but does not use it. A followup PR will use this mapping to produce a framework configuration that redirects mapped predicates/priorites to be exected as plugins.
2019-09-25 22:10:30 -04: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
Kubernetes Prow Robot
8274bec900
Merge pull request #82990 from SataQiu/cleanup-scheduler-20190922
Clean up code about scheduler algorithm
2019-09-24 13:37:38 -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
Kubernetes Prow Robot
7c09b0b1ec
Merge pull request #81911 from ahmad-diaa/use-scheduler-in-createConfiguratorArgsWithPodInformer
Use scheduler.New() Instead of factory.NewConfigFactory() in Integration Test scheduler_test.go
2019-09-24 08:57:28 -07:00
Kubernetes Prow Robot
aba654f96b
Merge pull request #81744 from praseodym/fix-staticcheck-pkg/scheduler
Fix staticcheck failures for pkg/scheduler/...
2019-09-24 00:25:27 -07:00
Kubernetes Prow Robot
05aaeac8b2
Merge pull request #82951 from ahg-g/ahg-context
Updated ContextData and PluginContext with Clone methods.
2019-09-23 14:55:49 -07:00
Mark Janssen
345e528c86 Fix staticcheck failures for pkg/scheduler/... 2019-09-23 22:49:59 +02:00
Abdullah Gharaibeh
641317bdde Updated ContextData and PluginContext with Clone methods.
This is necessary to be able to clone PluginContext during preemption.
2019-09-23 14:34:40 -04:00
SataQiu
7cb4850699 clean up code for scheduler 2019-09-23 12:50:15 +08:00
Kubernetes Prow Robot
6d58376baa
Merge pull request #82896 from ahg-g/ahg-config
Refactor the scheduler's configuration logic.
2019-09-20 16:17:46 -07:00
Kubernetes Prow Robot
40a8d9ebee
Merge pull request #82735 from ahmad-diaa/remove-NewConfigFactory-compatibility-test
Improve Scheduler Compatibility Test
2019-09-20 16:17:37 -07:00
Ahmad Diaa
bf6a70a1ce use scheduler.Option in initTestSchedulerWithOptions 2019-09-21 00:06:42 +02:00
Ahmad Diaa
fda4d41ee5 change compatibility_test struct, remove ExpectedPolicy 2019-09-20 21:43:40 +02:00
Ahmad Diaa
009ffaf803 validate scheduler policy instead of the decoded policy in compatibility_test 2019-09-20 21:42:12 +02:00
Ahmad Diaa
104e368860 remove factory.NewConfigFactory in compatibility test 2019-09-20 21:41:51 +02:00
Kubernetes Prow Robot
33adc7fafa
Merge pull request #82841 from Huang-Wei/sched-panic
Fixed a scheduler panic when using PodAffinity (k8s version >= 1.15)
2019-09-19 14:21:11 -07:00
Abdullah Gharaibeh
dc28cfca72 Refactor the scheduler's configuration logic.
This PR modifies the scheduler's configurator to allow for instantiating the framework at a later stage in the configuration. Specifically at the point where we know exactly which predicates/priorities need to be configured.

This is necessary to allow converting predicates/priorities configuration into a plugin configuration to facilitate framework migration.
2019-09-19 15:43:26 -04:00
Kubernetes Prow Robot
d05183be41
Merge pull request #82858 from hwdef/del-unused-var
delete unused var
2019-09-19 11:05:49 -07:00
Wei Huang
4c9312fa7e
Fixed a scheduler panic on PodAffinity 2019-09-19 10:52:03 -07:00
Wei Huang
e85473c2df
Benchmark test for PodAffinity 2019-09-19 10:52:03 -07:00
hwdef
4e7ef9ad36 delete unused var 2019-09-19 18:04:13 +08: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
Ahmad Diaa
b771490e88 remove unused variables in scheduler api types 2019-09-17 15:44:56 +02:00
Kubernetes Prow Robot
be68d68b2b
Merge pull request #82749 from xiaoanyunfei/cleanup/rm_unnecessary_return
rm unnecessary `return` at the end of function
2019-09-16 23:16:57 -07:00
Kubernetes Prow Robot
c41f21dff7
Merge pull request #82738 from yiyang5055/fix-error-packag-name
fix error package name
2019-09-16 23:16:47 -07:00
yiyang5055
bbc4931ab8 fix error package name and rename struct 2019-09-17 09:11:26 +08:00
sunxiaofei03
11383f4471 rm unnecessary return 2019-09-16 18:04:11 +08:00
RainbowMango
177eec76a3 Migrate prometheus bucket functionality to metrics stability framework. 2019-09-16 11:47:12 +08:00
Kubernetes Prow Robot
af88acc812
Merge pull request #82704 from ahg-g/ahg-default-registry
Resolved cycle dependency in framework plugins registration
2019-09-13 18:06:40 -07:00
Abdullah Gharaibeh
3174d9c847 Added a noop plugin to make sure we have the dependencies worked out for the default registry of the scheduler framework. 2019-09-13 13:36:35 -04:00
Kubernetes Prow Robot
e53a952fa4
Merge pull request #82283 from ahmad-diaa/fix-field-types-in-scheduler-api-types
Migrate scheduler api types to sized integers
2019-09-12 15:56:32 -07:00
Kubernetes Prow Robot
82f5531df3
Merge pull request #82119 from wgliang/fixbug/fix-scheudle-function-context
Take the context as the first argument of Schedule
2019-09-12 11:46:28 -07:00
Ahmad Diaa
801cc549be migrate scheduler api types to sized integers 2019-09-12 19:06:40 +02:00
Kubernetes Prow Robot
96201b5e57
Merge pull request #82156 from mrkm4ntr/fix-evaluated-nodes
Fix EvaluatedNodes in ScheduleResult
2019-09-11 22:52:39 -07:00
Kubernetes Prow Robot
3fd8962bd1
Merge pull request #82483 from everpeace/fix-scheduler-pluginconfig-initialization
The correct PluginConfig.Args is not passed to the corresponding PluginFactory in kube-scheduler when multiple PluginConfig items are defined
2019-09-11 21:22:49 -07:00
Kubernetes Prow Robot
59c276d512
Merge pull request #81647 from jfbai/test-node-has-no-mages
test: add cases to test that no images present in node status.
2019-09-11 20:04:23 -07:00
Kubernetes Prow Robot
1e70457df4
Merge pull request #82187 from ahg-g/ahg-prebind
Error out when Scheduler PreBind plugins return Unschedulable
2019-09-11 18:27:29 -07:00
Kubernetes Prow Robot
02433e0a72
Merge pull request #82209 from yutedz/gen-sched-err
Handle pod addition / removal errors
2019-09-11 15:24:34 -07:00
Abdullah Gharaibeh
54ac023a53 Scheduler PreBind plugins are currently allowed to return Unschedulable status, which should not according to the KEP and comments. 2019-09-11 14:03:18 -04:00
Kubernetes Prow Robot
001f2cd2b5
Merge pull request #82255 from cofyc/avoid-import-cycle
volume scheduling: move metrics to a separate package to avoid import cycle
2019-09-11 10:43:20 -07:00
Shintaro Murakami
bb94dfea1e Fix EvaluatedNodes in ScheduleResult 2019-09-11 22:01:25 +09:00
Shingo Omura
439a6825e7 need to use local variable so that pluginNameToConfig map can keep correct contents
because the type of PluginConfig.Args is not pointer.

It also fixed framework_test so that it can test PluginConfig initialization.
2019-09-11 16:56:22 +09:00
Jianfei Bai
60a27031b2 test: add cases to test that no images present on node or kubelet's NodeStatusMaxImages flag is set to 0. 2019-09-11 14:01:43 +08:00
Kubernetes Prow Robot
7351f1acd7
Merge pull request #81777 from mrkm4ntr/remove-pod-lister
Remove unnecessary factory layer
2019-09-10 14:32:15 -07:00
Ted Yu
89a70fa407 Handle pod addition / removal errors 2019-09-06 16:25:11 -07:00
Guoliang Wang
d84a75c140 Fix filter plugins are not been called during preemption 2019-09-06 09:59:01 +08:00
Yecheng Fu
8a7607a308 volume scheduling: move metrics code into a separate pkg 2019-09-03 14:38:26 +08:00
Kubernetes Prow Robot
b33968972b
Merge pull request #82034 from alculquicondor/feat/unschedulable_unresolvable
[Framework] Add UnschedulableAndUnresolvable status code
2019-08-30 11:20:57 -07:00
Guoliang Wang
008f4e2ddc Take the context as the first argument of Schedule 2019-08-29 17:47:49 +08:00
Aldo Culquicondor
3c1f8a8c4e [Framework] Add UnschedulableAndUnresolvable status code
The status can be used by (Pre)Filter plugins to indicate that
preemption wouldn't change the decision of the filter.

Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-08-28 10:10:47 -04:00
Han Kang
8da448dbe3 migrate scheduler metrics endpoint to metrics stability framework 2019-08-28 03:40:43 -07:00
Kubernetes Prow Robot
668bf42d11
Merge pull request #77688 from sudeshsh/extended_resource_bin_packing
Extending RequestedToCapacityRatio priority function to support resource bin packing of extended resources
2019-08-27 22:41:11 -07:00
Sudesh Shinde
9ae505930c extending RequestedToCapacityRatio priority function to support resource bin packing of extended resources 2019-08-27 10:41:32 -07:00
Kubernetes Prow Robot
9aa76b2c8a
Merge pull request #80696 from hex108/plugin_args
Add a helper function to decode scheduler plugin args
2019-08-27 09:24:56 -07:00
Kubernetes Prow Robot
ead8e0c24e
Merge pull request #80814 from xiaoanyunfei/cleanup/GeneralPredicates
Use iteration to make the GeneralPredicates code cleaner
2019-08-27 00:52:40 -07:00
Jun Gong
6324285f3b Add a helper function to decode scheduler plugin args 2019-08-27 13:11:52 +08:00
Kubernetes Prow Robot
e57bee7332
Merge pull request #81840 from draveness/feature/move-node-info-snapshot-to-framework
feat(scheduler): move node info snapshot out of internal package
2019-08-26 16:42:54 -07:00
hwdef
9b3f577b1d fix typo in pkg 2019-08-26 09:25:39 +08:00
Kubernetes Prow Robot
12e6930d8a
Merge pull request #81842 from verb/range-scheduler
Add test for HTTPExtender.IsInterested
2019-08-25 15:48:20 -07:00
Shintaro Murakami
a0c93b10c9 Remove unnecessary factory layer 2019-08-24 08:08:30 +09:00
Kubernetes Prow Robot
4680ec8fde
Merge pull request #81346 from mrkm4ntr/fits-on-node-fast-path
Add fast path to podFitsOnNode
2019-08-23 15:48:26 -07:00
Lee Verberne
cb03a332fd Add test for HTTPExtender.IsInterested 2019-08-23 17:07:34 +00: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
Shintaro Murakami
acd82613ef Add fast path to podFitsOnNode
Add test
2019-08-22 17:21:00 +09:00
Kubernetes Prow Robot
1a53325550
Merge pull request #80930 from liu-cong/normalizescore-api-change
Remove NormalizeScore plugin set from config API.
2019-08-21 14:52:33 -07:00
Kubernetes Prow Robot
90df64b75b
Merge pull request #81614 from liu-cong/score-refactor
Move RunNormalizeScorePlugins and ApplyScoreWeights into RunScorePlugins; Also add unit tests for RunScorePlugins.
2019-08-21 10:37:29 -07:00
Cong Liu
e50a24d64c Move RunNormalizeScorePlugins and ApplyScoreWeights into RunScorePlugins; Also add unit tests for RunScorePlugins. 2019-08-20 13:18:32 -04:00
Wei Huang
8f559ea53b
Optimize internal data structure of EvenPodsSpread
- Rename 'topologyPairsPodSpreadMap' to 'podSpreadCache'
- New struct `criticalPaths criticalPaths`
- Add unified method `*criticalPaths.update()` for:
    - regular update
    - addPod in preemption case
    - remotePod in preemption case
2019-08-20 09:26:41 -07:00
Wei Huang
7f1a3965fd
Add Benchmark test for EvenPodsSpread predicate
- go test k8s.io/kubernetes/pkg/scheduler/algorithm/predicates -benchmem -run=^$ -bench .
2019-08-20 09:25:01 -07:00
Ahmad Diaa
61ab77ef7a use factory.Config fields directly in scheduler struct 2019-08-16 15:21:28 +02:00
Kubernetes Prow Robot
a56e86a405
Merge pull request #79804 from yqwang-ms/yqwang/fix-bind-interest
Extender bind should respect IsInterested
2019-08-15 19:16:34 -07:00
Kubernetes Prow Robot
7a35f8c92d
Merge pull request #81015 from draveness/feature/update-normalize-score-extension-point
feat:  return error when score is out of range
2019-08-15 02:32:35 -07: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
draveness
d3cc73965a feat: use schedulerapi.MaxPriority instead of hard-coded int 2019-08-14 19:16:41 +08:00
draveness
9fb0df5096 feat(scheduler): return error when score is out of range 2019-08-14 19:16:41 +08: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
Kubernetes Prow Robot
2ad2795136
Merge pull request #79641 from yqwang-ms/yqwang/fix-ds-crash
Fix default scheduler crash if scheduler extender filter returns a not found node
2019-08-14 02:08:37 -07:00
Yuqi Wang
5927ec4f8b Fix default scheduler crash if scheduler extender filter returns a not found node 2019-08-14 10:38:42 +08:00
Kubernetes Prow Robot
f3c94c9c42
Merge pull request #81151 from mrkm4ntr/remove-node-lister
Remove algorithm.NodeLister from scheduler interface
2019-08-13 12:29:55 -07:00
Shintaro Murakami
11f043c784 Remove algorithm.NodeLister from scheduler interface
Will fixup
2019-08-13 10:30:30 +09:00
Kubernetes Prow Robot
3f6f3fc3f9
Merge pull request #80416 from mrkm4ntr/metrics-framework-returns-unschedulable
Record metrics when framework returns unschedulable error
2019-08-09 03:01:25 -07:00
Kubernetes Prow Robot
2bea7a371b
Merge pull request #80811 from liu-cong/loglevel
Lower verbosity level for some useful scheduler logs; Also add node resource info when pod is scheduled on node.
2019-08-08 17:57:38 -07:00
Guoliang Wang
ca61b79996 Fix two race issues in scheduling_queue_test 2019-08-09 07:50:02 +08:00
Kubernetes Prow Robot
5257266e9b
Merge pull request #79631 from Huang-Wei/sched-q-flake
Fixed a racing issue in scheduler UT
2019-08-08 10:03:19 -07:00
draveness
aa5f9fda52 feat: use named array instead of score array in normalizing score 2019-08-08 08:19:49 +08:00
Cong Liu
df0ade56c4 Lower verbosity level for some useful scheduler logs; Also add node resource info when pod is scheduled on node. 2019-08-07 16:20:40 -04:00
Wei Huang
b6b2838a95
Fix a racing issue in FakeFilterPlugin
Filter() is called simultaneously, so the member of its (fake) implementation
cannot be written without lock.

The issue can be triggered by:

go test k8s.io/kubernetes/pkg/scheduler/core --race --count=50
2019-08-07 10:33:44 -07:00
Kubernetes Prow Robot
aa6a077cfd
Merge pull request #80681 from ricky1993/customize_resource_name_and_namespace
add options for name and namespace of leaderelection object
2019-08-07 01:36:51 -07:00
Kubernetes Prow Robot
1a01d10f5f
Merge pull request #80590 from alculquicondor/refactor/configurator-pod
Remove Configurator interface
2019-08-06 21:05:31 -07:00
Kubernetes Prow Robot
a07992436d
Merge pull request #80412 from hex108/concurrent_read_write
Add doc that plugins in bind cycle should not use scheduler NodeInfoSnapshot
2019-08-06 21:05:18 -07:00
Kubernetes Prow Robot
a197cc6174
Merge pull request #78610 from jpbetz/admission-trace
Add trace to webhook invocations
2019-08-06 21:04:52 -07: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
Kubernetes Prow Robot
7c23e1a4ac
Merge pull request #80885 from draveness/feature/update-framework-logger
fix: Use %q instead of %v in the scheduling framework
2019-08-06 08:15:55 -07:00
Kubernetes Prow Robot
decdf8891f
Merge pull request #80460 from mrkm4ntr/pvc-class-name
Use v1helper.GetPersistentVolumeClaimClass for compatibility
2019-08-05 15:08:30 -07:00
Joe Betz
46a04d50af Replace string concatination with trace fields 2019-08-05 12:18:57 -07:00
draveness
22bac3084a fix: use %q instead of %v in scheduling framework 2019-08-06 00:01:25 +08:00
Kubernetes Prow Robot
cc270c138d
Merge pull request #78097 from draveness/feature/post-filter-extension-point
feat: implement "post-filter" extension point for scheduling framework
2019-08-03 09:43:51 -07:00
chenyixiang
41a435a812 migrate scheduler options to resourceName & resourceNamespace
Change-Id: I743eda488320c97c123b49018d7efcc57525b152
2019-08-03 11:42:47 +08:00
Cong Liu
95b1bc1774 Remove NormalizeScore plugin set from config API. 2019-08-02 16:49:25 -04:00
Kubernetes Prow Robot
73b1bcba0f
Merge pull request #80084 from bertinatto/cache_csinode
Add separate cache for CSINode
2019-08-02 04:53:52 -07:00
draveness
859cac0595 fix: update run filter plugin for consistency 2019-08-02 10:23:43 +08:00
draveness
feb64858aa feat: implement "post-filter" extension point for scheduling framework 2019-08-02 10:12:54 +08:00
Kubernetes Prow Robot
e857ae090c
Merge pull request #80011 from Huang-Wei/eps-int-test
Even Pods Spread - 6. Integration Test
2019-08-01 17:19:51 -07:00
Kubernetes Prow Robot
a8d20287bd
Merge pull request #80846 from tedyu/apply-wght-early
Return early in ApplyScoreWeights if there are no scores
2019-08-01 13:38:54 -07:00
Kubernetes Prow Robot
aaad4c4afa
Merge pull request #80533 from alculquicondor/refactor/find_nodes
Query nodes in Schedule only when there are no predicates
2019-08-01 13:38:28 -07:00
Wei Huang
caab8b74ba
EvenPodsSpread: integration test 2019-08-01 10:42:27 -07:00
Aldo Culquicondor
d935b1054c Remove Configurator interface
The Configurator has been used as a holder for listers that tests need,
which is not its purpose. By making the tests obtain listers from more
appropriate places, such as informers, there is no need for various
accessors to the Configurator.

Also, FakeConfigurator is not being used anymore, so there's no need for
an interface instead of a plain pointer.

Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-08-01 08:36:38 -04:00
Ted Yu
5efeda3718 Return early in ApplyScoreWeights if there are no scores 2019-08-01 04:59:18 -07:00
Fabio Bertinatto
c5d9af2bda Update predicates to use cached CSINode in scheduler 2019-08-01 10:15:20 +02:00
Fabio Bertinatto
09d2cdf384 Add independent cache for CSINode in scheduler 2019-08-01 10:08:51 +02:00
Kubernetes Prow Robot
ac1cde5577
Merge pull request #78009 from hainesc/develop
Use reservoir sampling to select one host from priority list
2019-08-01 00:52:15 -07:00
Kubernetes Prow Robot
7a7f5f1e83
Merge pull request #80360 from bertinatto/fix_old_predicate
Don't count unrelated volumes in scheduler predicate
2019-07-31 22:36:26 -07:00
Kubernetes Prow Robot
fb46ec8455
Merge pull request #80383 from liu-cong/normalizescore
Add NormalizeScore extension point for scheduler framework.
2019-07-31 20:08:24 -07:00
Kubernetes Prow Robot
a6dca16d99
Merge pull request #80144 from Huang-Wei/stateless-ApplyFeatureGates
scheduler: make ApplyFeatureGates() stateless
2019-07-31 20:08:14 -07:00
Kubernetes Prow Robot
fc46a2f59c
Merge pull request #80736 from cofyc/log-error-when-api-requst-fails
Log an error when kube-scheduler fails to update the condition of the pod
2019-07-31 13:48:15 -07:00
xiaofei.sun
bff9ad44f9 clean GeneralPredicates code 2019-07-31 23:06:46 +08:00
Fabio Bertinatto
6e9112b7fe When PVC is invalid, don't count volumes in scheduler predicate 2019-07-31 12:56:28 +02:00
Fabio Bertinatto
ee7b48b7c5 Don't count unrelated volumes in scheduler predicate 2019-07-31 12:56:28 +02:00
Cong Liu
34373662d3 Add NormalizeScore extension point for scheduler framework. 2019-07-30 20:02:13 -04:00
Wei Huang
eb3ed24853
scheduler: make ApplyFeatureGates() stateless 2019-07-30 11:41:57 -07:00
Kubernetes Prow Robot
1f1c1e2ad0
Merge pull request #80588 from liu-cong/errch
Use ErrorChannel to communicate errors during parallel execution in interpod_afiinity
2019-07-30 08:53:03 -07:00
Kubernetes Prow Robot
d248bd099d
Merge pull request #80233 from alculquicondor/refactor/configurator
Remove NodeLister from Scheduler Configurator
2019-07-30 05:33:17 -07:00
Kubernetes Prow Robot
70bb26f96e
Merge pull request #78632 from NickrenREN/delete-pod-if-add-succeeds
Delete the pods from unschedulable queue only when Add succeeds
2019-07-30 01:58:50 -07:00
Yecheng Fu
00afede30d Log an error when kube-scheduler fails to update the condition of the pod. 2019-07-30 10:05:20 +08:00
Cong Liu
9663c33747 Use ErrorChannel to communicate errors during parallel execution in interpod_afiinity. 2019-07-29 20:44:50 -04:00
NickrenREN
315f34bb51 delete the pods from unschedulable queue only when Add succeeds 2019-07-28 11:24:11 +08:00
Wei Huang
755a3112d8
[eps-priority] auto-gen files 2019-07-26 20:49:12 -07:00
Wei Huang
762a7113a7
EvenPodsSpread: optimize Priority logic 2019-07-26 20:49:12 -07:00
Wei Huang
26a45b2bd3
EvenPodsSpread: Benchmarking Priority function 2019-07-26 20:49:12 -07:00
Wei Huang
0bff4c27d6
EvenPodsSpread: weigh constraints individually
- update logic to weigh each constraint individually
- address comments and misc fixes
2019-07-26 20:48:05 -07:00
Wei Huang
3638fd5353
EvenPodsSpread: minor enhancement on printing out priority score 2019-07-26 20:48:05 -07:00
Wei Huang
821446ed70
EvenPodsSpread: Make some funcs in predicates pkg as public 2019-07-26 20:48:05 -07:00
Wei Huang
f25cc921e1
EvenPodsSpread: Core Priority logic 2019-07-26 20:48:05 -07:00
Wei Huang
eefc18a763
EvenPodsSpread: Define a new Priority 2019-07-26 20:48:05 -07:00
Kubernetes Prow Robot
bc8ca12c87
Merge pull request #80448 from tedyu/node-info-key
Check error return from GetPodKey
2019-07-26 20:16:23 -07:00
Kubernetes Prow Robot
7075853a70
Merge pull request #80254 from hex108/preempt_with_permit
Send a reject message to permit plugin when preempting a WaitingPod
2019-07-26 20:16:11 -07:00
Ted Yu
47ccb69907 Check error return from GetPodKey 2019-07-26 11:53:43 -07:00
Kubernetes Prow Robot
50a0d38e3a
Merge pull request #80503 from tedyu/spread-constaints
Refactor nested loop in getTPMapMatchingSpreadConstraints
2019-07-25 20:48:11 -07:00
Kubernetes Prow Robot
7fd8537564
Merge pull request #79062 from Huang-Wei/eps-preemption
Even Pods Spread - 4. Preemption Support
2019-07-25 14:33:45 -07:00
Ted Yu
89818d8d09 Refactor nested loop in getTPMapMatchingSpreadConstraints 2019-07-25 07:15:14 -07:00
Aldo Culquicondor
0e35ac8f1e Update TODO
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-07-25 10:09:42 -04:00
Aldo Culquicondor
e703226522 Optimize Schedule by querying nodes only when needed.
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-07-25 08:24:05 -04:00
Kubernetes Prow Robot
dc515bb12e
Merge pull request #80469 from draveness/feature/add-unit-tests-to-framework-status
fix: return empty string when status is nil
2019-07-24 18:08:05 -07:00
Wei Huang
794847967c
EvenPodsSpread: update addPod() logic to match individual constraint
- also add TODO items for potential perf optimization
2019-07-24 15:27:55 -07:00
Wei Huang
fe7072a482
fixup: address comments 2019-07-24 15:27:55 -07:00
Wei Huang
2027525abf
EvenPodsSpread: Preemption UT on generic_scheduler 2019-07-24 15:27:55 -07:00
Wei Huang
ff831c3df2
EvenPodsSpread: Supports Preemption (addPod)
- add addPod() for podSpreadMap
2019-07-24 15:27:55 -07:00
Wei Huang
9e9808d0ab
EvenPodsSpread: Supports Preemption (removePod)
- add removePod() for podSpreadMap
2019-07-24 15:27:54 -07:00
Kubernetes Prow Robot
acd597dbac
Merge pull request #80305 from hex108/cleanup_score_plugin
Precheck score plugins' weight when initializing
2019-07-24 15:20:05 -07:00
Kubernetes Prow Robot
d83cf5f274
Merge pull request #77828 from Huang-Wei/eps-pred-core
Even Pods Spread - 3. Predicates Core
2019-07-24 15:19:52 -07:00
Aldo Culquicondor
8e9af0185d Remove NodeLister from Scheduler Configurator
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-07-24 17:16:30 -04:00
Kubernetes Prow Robot
cbae6ed036
Merge pull request #80220 from alculquicondor/refactor/scheduler-cache
Use scheduler cache in affinity priority functions
2019-07-24 13:50:06 -07:00
Wei Huang
1822085088
EvenPodsSpread: update 'selfMatch' logic 2019-07-24 10:28:46 -07:00
Wei Huang
39e459ae9a
fixup: address comments 2019-07-24 10:28:46 -07:00
Wei Huang
b99fb9187b
EvenPodsSpread: UT on genericScheduler.Schedule() 2019-07-24 10:28:46 -07:00
Wei Huang
e0e3889d74
EvenPodsSpread: Core Predicate logic 2019-07-24 10:28:46 -07:00
Wei Huang
08e7b3bacb
EvenPodsSpread: Define a new Predicate 2019-07-24 10:28:46 -07:00
draveness
7549c53a38 fix: return empty string when status is nil 2019-07-24 20:55:11 +08:00
Aldo Culquicondor
f58abdf966 Use scheduler cache in affinity priority functions
Make the cache implement NodeLister and expose it to the priority
functions. This way, the priority functions make use of a single cache,
the scheduler's, instead of mixing it with the lister's caches.

Signed-off-by: Aldo Culquicondor <acondor@google.com>
2019-07-23 22:10:49 -04:00
Shintaro Murakami
c94e800008 Use v1helper.GetPersistentVolumeClaimClass for compatibility 2019-07-24 10:35:00 +09:00
Jun Gong
a3ed664246 Add doc that plugins in binding cycle should not use NodeInfoSnapshot() 2019-07-23 20:25:39 +08:00
Jun Gong
df14adf474 Send a reject message to permit plugin when preempting a WaitingPod 2019-07-23 10:23:54 +08:00
Wei Huang
f822487f05
EvenPodsSpread: match selector of each constraint independently
- see more discussion at https://github.com/kubernetes/kubernetes/pull/77760#discussion_r305107973
2019-07-22 17:51:23 -07:00
Wei Huang
c23aef40f2
[eps-pred-meta] auto-gen files 2019-07-22 17:34:56 -07:00
Wei Huang
249752cc1f
fixup: fix comments and use a channel to pass err 2019-07-22 17:34:56 -07:00
Wei Huang
dce6686c9a
EvenPodsSpread: refactor "chained" utils
- move "chanined" utils to pkg/scheduler/testing/utils.go so as to be re-used by all scheduler tests
2019-07-22 17:34:56 -07:00
Wei Huang
3dbef991a3
EvenPodsSpread: refactor topologyPairsPodSpreadMap
- update minMatchMap from []int32 to map[string]int32
2019-07-22 17:34:56 -07:00
Wei Huang
a242e376ac
EvenPodsSpread: PredicateMetadata initilization
- build a new `topologyPairsPodSpreadMap` into PredicateMetadata
- update ShallowCopy()
- unit tests
2019-07-22 17:34:56 -07:00
Kubernetes Prow Robot
f31d786927
Merge pull request #78477 from YoubingLi/filter
Fixes 78001 The implementation of Filter extension for the new framework
2019-07-22 16:48:53 -07:00
Shintaro Murakami
169537499c Record metrics when framework returns unschedulable error 2019-07-22 16:01:22 +09:00
Chun Chen
1f3bc52eab Calling Unreserve plugin before recordSchedulingFailure in case of binding failure
Calling recordSchedulingFailure puts the pod back to scheduling queue in another
goroutine so pod may get a chance to be bond again before unreseve plugin cleaning
state about it.
2019-07-19 10:55:06 +08:00
Jun Gong
2dc5cf8c43 Set score plugin's weight to 1 if it is not set 2019-07-18 22:35:34 +08:00
Jun Gong
66347b516c Precheck score plugins' weight when initializing 2019-07-18 21:19:21 +08:00
Kubernetes Prow Robot
ce80aeaac5
Merge pull request #78319 from egernst/scheduler-changes
Scheduler changes to introduce alpha support for Pod Overhead
2019-07-18 01:52:11 -07:00
Youbing Li
7f9dd949e0 The implementation of Filter extension for the new framework 2019-07-17 03:28:30 -04:00
Eric Ernst
9babbf8bd7 pod-overhead: autogenerated code for scheduling changes
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-07-16 12:56:19 -07:00
Eric Ernst
62e9717386 scheduler: add pod Overhead support for requests
Signed-off-by: Eric Ernst <eric.ernst@intel.com>
2019-07-16 12:56:19 -07:00
Abdullah Gharaibeh
a80425bd23 Fixed build files. 2019-07-16 10:24:10 -04:00
Abdullah Gharaibeh
73704f1b8e Use error channel to capture first error. 2019-07-16 10:00:42 -04:00
Abdullah Gharaibeh
c54c4d1962 Score plugin for the scheduling framework. 2019-07-16 09:38:37 -04:00
Kubernetes Prow Robot
a155f3b0e9
Merge pull request #80132 from draveness/feature/rename-register-priority-function
fix: rename RegisterPriorityFunction2 to RegisterPriorityMapReduceFunction
2019-07-15 20:27:48 -07:00
Kubernetes Prow Robot
5a32bea904
Merge pull request #79777 from draveness/feature/refactor-scheduling-predicates
feat: use channel instead of mutex in scheduling predicates
2019-07-15 20:27:35 -07:00
Chun Chen
e04f03d3cb Fix flaky test TestBindPlugin 2019-07-15 23:36:06 +08: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
a4618d6790 fix: rename RegisterPriorityFunction2 to RegisterPriorityMapReduceFunction 2019-07-15 08:17:52 +08:00
Kubernetes Prow Robot
7285829b83
Merge pull request #78263 from misterikkit/nonZeroDocs
Add documentation about "non-zero requests"
2019-07-14 13:19:07 -07:00
draveness
fab1948a1b feat: use channel instead of mutex in scheduling predicates 2019-07-13 09:11:52 +08:00
Yassine TIJANI
08522f8e5a move scheduler to use v1beta1.events
Signed-off-by: Yassine TIJANI <ytijani@vmware.com>
2019-07-12 11:39:01 +02:00
jingxueli
6a1bbff60c keep processing other nodes for the nil node error 2019-07-11 15:34:40 +08:00
Kubernetes Prow Robot
b7757ffbb9
Merge pull request #78280 from sevensees/master
Trace step should be at the end of calls rather than the begin.
2019-07-10 21:39:07 -07:00
Kubernetes Prow Robot
79564ebff7
Merge pull request #79877 from draveness/feature/use-scheduler-cache-instead
fix: use schedulerCache instead of podlister in config factory
2019-07-10 16:24:40 -07:00
Kubernetes Prow Robot
9e5018ba20
Merge pull request #79453 from chendave/short-circuit
Short-circuit the evaluation of `cpuFraction` and `memoryFraction`
2019-07-10 16:24:27 -07:00
shiyan2016
c329d5117d cancel process node if error occurs 2019-07-09 19:50:48 -07:00
Kubernetes Prow Robot
6653a490fb
Merge pull request #79532 from snowplayfire/update-errMsg
improve error msg for predicate meta data
2019-07-09 13:46:37 -07:00
Jianfei Bai
95bd52cfe9 Trace step should be at the end of calls rather than the begin. 2019-07-08 16:54:04 +08:00
draveness
2fe0d4da27 fix: use schedulerCache instead of podlister in config factory 2019-07-08 14:35:30 +08:00
Kubernetes Prow Robot
3a009af5c2
Merge pull request #79098 from chendave/update_comments
Update the comments on how to check disk conflict
2019-07-04 08:18:36 -07:00
Yuqi Wang
848293ba29 Extender bind should respect IsInterested 2019-07-04 23:02:18 +08:00
Kubernetes Prow Robot
a9b3d7d821
Merge pull request #79639 from danielqsj/unr
call unreserve plugin before record event
2019-07-03 13:52:39 -07:00
Pingan2017
e94d7b3802 clean up redundant conditiontype OutOfDisk 2019-07-03 14:34:52 +08:00
danielqsj
d4ea78ea39 call unreserve plugin before record event 2019-07-03 11:34:52 +08:00
Ted Yu
acdc4d2001 Omit obtaining the lock when adding Nodes in newNodeTree 2019-07-02 23:16:08 +08:00
Kubernetes Prow Robot
dcd57c9e5e
Merge pull request #79076 from draveness/feature/read-nodes-from-scheduler-cache
fix: predicates read nodes from scheduler cache
2019-07-01 15:09:33 -07:00
Kubernetes Prow Robot
b4e3bd381b
Merge pull request #79524 from bertinatto/add_missing_informer
Add missing CSINodeInformer when creating ConfigFactoryArgs
2019-07-01 12:53:33 -07:00
jingxueli
6196f7274e improve error msg for predicate meta data 2019-06-30 03:32:02 +08:00
draveness
30b0f8bf3b fix: predicates read nodes from scheduler cache 2019-06-29 02:34:08 +08:00
Kubernetes Prow Robot
fa65154a58
Merge pull request #78412 from draveness/feature/assign=start-time-for-test-pod
fix: assign default value for pod.Status.StartTime in TestSelectNodes…
2019-06-28 08:05:39 -07:00
Fabio Bertinatto
dfc78caa21 Add missing CSINodeInformer when creating ConfigFactoryArgs 2019-06-28 13:32:03 +02:00
Dave Chen
a9d3a5f40d Short-circuit the evaluation of cpuFraction and memoryFraction
Signed-off-by: Dave Chen <dave.chen@arm.com>
2019-06-27 13:56:48 +08:00
Hemant Kumar
6abc04d059 Add unit tests for CSI predicate 2019-06-25 16:30:54 +02:00
Fabio Bertinatto
00b0ab86af Update scheduler to use volume limits from CSINode 2019-06-25 16:30:54 +02:00
draveness
ca6003bc75 feat: cleanup PodPriority features gate 2019-06-23 11:57:24 +08:00
Dave Chen
a9aea022ce Update the comments on how to check disk conflict
Signed-off-by: Dave Chen <dave.chen@arm.com>
2019-06-17 17:47:16 +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
ahg-g
ece3e3cdba
Revert "Faster scheduler" 2019-06-06 22:34:18 -04:00
Dan Winship
78ea7b7fd8 Fix spelling of test name 2019-06-05 16:04:22 -04:00
wangqingcan
52f3380ef3 change preempting to PreemptionPolicy 2019-05-31 12:42:05 +08:00
wangqingcan
5c9438c691 non-preempting-priorityclass
Co-authored-by: Vallery Lancey <vallery@zeitgeistlabs.io>
Co-authored-by: Tan shanshan <tan.shanshan@zte.com.cn>
2019-05-31 12:37:07 +08:00
Kubernetes Prow Robot
bb475c4a64
Merge pull request #77567 from wgliang/features/scheduling-framework-post-bind
Add Post-bind extension point to the scheduling framework
2019-05-29 17:24:20 -07:00
draveness
196a6d65c7 fix: assign default value for pod.Status.StartTime in TestSelectNodesForPreemption 2019-05-29 20:18:54 +08:00
yameiwang
7a380ebce9 correct the return information in scheduler.go 2019-05-29 18:41:18 +08:00
Haines Chan
f977863f70 Use reservoir sampling to select one host from priority list 2019-05-27 22:25:58 +08:00
JieJhih Jhang
823111c0fe use iota instead assign value to constants 2019-05-24 18:45:01 +08:00
Ted Yu
3d07221507 Put non-ignorable extenders ahead of ignorable extenders
Signed-off-by: Ted Yu <yute@vmware.com>
2019-05-23 13:50:25 -07:00
Jonathan Basseri
66d359eb23 Add documentation about "non-zero requests" 2019-05-23 12:36:19 -07:00
Guoliang Wang
20f9c9940e Add Post-bind extension point to the scheduling framework 2019-05-19 18:12:16 +08:00
Kubernetes Prow Robot
89031553ce
Merge pull request #77845 from draveness/bugfix/resource-allocation-priority
fix: verify metadata is non-nil in resource allocation
2019-05-18 23:11:12 -07:00
Kubernetes Prow Robot
df4f033a4f
Merge pull request #77501 from JieJhih/scheduling/plugin
add scheduling framework configuration
2019-05-18 03:39:12 -07:00
draveness
73367250a3 fix: verify metadata is non-nil in resource allocation 2019-05-18 10:05:44 +08:00
JieJhih Jhang
0734d1debb handle nil extension points 2019-05-18 07:24:27 +08:00
JieJhih Jhang
2cd5fc54a1 add scheduling framework configuration
update bazel build

fix get plugin config method

initialize only needed plugins

fix unit test

fix import duplicate package

update bazel

add docstrings

add weight field to plugin

add plugin to v1alpha1

add plugins at appropriate extension points

remove todo statement

fix import package file path

set plugin json schema

add plugin unit test to option

initial plugin in test integration

initialize only needed plugins

update bazel

rename func

change plugins needed logic

remove v1 alias

change the comment

fix alias shorter

remove blank line

change docstrings

fix map bool to struct

add some docstrings

add unreserve plugin

fix docstrings

move variable inside the for loop

make if else statement cleaner

remove plugin config from reserve plugin unit test

add plugin config and reduce unnecessary options for unit test

update bazel

fix race condition

fix permit plugin integration

change plugins to be pointer

change weight to int32

fix package alias

initial queue sort plugin

rename unreserve plugin

redesign plugin struct

update docstrings

check queue sort plugin amount

fix error message

fix condition

change plugin struct

add disabled plugin for unit test

fix docstrings

handle nil plugin set
2019-05-18 06:30:28 +08:00
Wei Huang
29195faa69
supplemental logic to ensure nominatedPodMap.update() is still stateless 2019-05-17 07:44:05 -07:00
Wei Huang
115fe94b6f
scheduler: fix flaky test TestPreemptionRaces
In some cases, an Update event with no "NominatedNode" present is received right
after a node("NominatedNode") is reserved for this pod in memory.
If we go updating (delete and add) it, it actually un-reserves the node since
the newPod doesn't carry sped.status.nominatedNode.
In this case, during this time other low-priority pods have chances to take space which
was reserved for the nominatedPod.
2019-05-17 07:44:04 -07:00
Kubernetes Prow Robot
796ecb9391
Merge pull request #77529 from draveness/feature/add-queuesort-extension-point
feat: implement "queue-sort" extension point for scheduling framework
2019-05-16 01:09:42 -07:00
draveness
d60bccc6a4 feat: implement "queue-sort" extension point for scheduling framework 2019-05-15 09:40:15 +08:00
draveness
cd3aac34ea feat: cache pod limits as part of metadata in priority functions 2019-05-14 21:36:09 +08:00
Abdullah Gharaibeh
98de316436 Implement the permit extension point in scheduler. 2019-05-10 12:42:04 -04:00
Kubernetes Prow Robot
b9ccdd2824
Merge pull request #77598 from danielqsj/unreserve
Add Un-reserve extension point for the scheduling framework
2019-05-09 23:37:57 -07:00
danielqsj
997648a923 Add Un-reserve extension point for the scheduling framework 2019-05-10 13:19:22 +08:00
Kubernetes Prow Robot
e45f92fc0a
Merge pull request #77626 from ahg-g/ahg-mutex
Make thread-safe the prebind callback of stateful plugin in scheduler…
2019-05-09 14:14:27 -07:00
Abdullah Gharaibeh
7b127311a4 Make thread-safe the prebind callback of stateful plugin in scheduler framework. 2019-05-08 22:19:21 -04:00
Wei Huang
c4df3a2c44
prevent predicatesOrdering from escaping from UT
- sets `predicatesOrdering` back to original value in UT
2019-05-08 18:05:34 -07:00
Kubernetes Prow Robot
baa2030683
Merge pull request #77509 from ahg-g/faster_scheduler
Faster scheduler
2019-05-08 17:15:00 -07:00
Andrew Kim
c919139245 update import of generic featuregate code from k8s.io/apiserver/pkg/util/feature -> k8s.io/component-base/featuregate 2019-05-08 10:01:50 -04:00
Abdullah Gharaibeh
e660e84459 Faster scheduler. 2019-05-08 09:49:01 -04:00
Han Kang
51992d61a0 Revert "Add Un-reserve extension point for the scheduling framework"
This reverts commit 8b5182581a.
2019-05-07 21:17:29 -07:00
Kubernetes Prow Robot
1ce103a41f
Merge pull request #77457 from danielqsj/un-reserve
Add Un-reserve extension point for the scheduling framework
2019-05-07 17:52:45 -07:00
Kubernetes Prow Robot
a1588cfe34
Merge pull request #77478 from draveness/feature/remove-log-in-scheduler
feat: remove klog in AddUnschedulableIfNotPresent
2019-05-07 01:45:49 -07:00
danielqsj
8b5182581a Add Un-reserve extension point for the scheduling framework 2019-05-07 14:51:58 +08:00
draveness
6382595221 feat: move klog from AddUnschedulableIfNotPresent into the call site 2019-05-07 00:40:25 +08:00
Kubernetes Prow Robot
ea5be337dd
Merge pull request #76698 from WanLinghao/scheduler_duplicate_import
Remove duplicate package import
2019-05-06 02:19:36 -07:00
Kubernetes Prow Robot
ef550e6989
Merge pull request #75434 from cofyc/fix56098
Refactor PV scheduling library into a separate package
2019-05-03 22:17:38 -07:00
Onur Satici
1fccb933c6 make example plugins conform with the PluginFactory type 2019-05-03 21:05:52 +01:00
Onur Satici
78f7027f66 fix scheduler plugin example 2019-05-03 11:56:00 +01:00
Yecheng Fu
214ea1a9d3 Update scheduler to use new volume scheduling library
To fix scheme issue, use k8s.io/client-go/kubernetes/scheme instead of
legacyscheme.
2019-05-02 14:57:47 +08:00
Bobby (Babak) Salamat
83828bcb2d autogenerated files 2019-04-29 16:40:56 -07:00
Bobby (Babak) Salamat
77824f5135 Change scheduler constructors to receive a plugin registry. 2019-04-29 16:40:56 -07:00
Bobby (Babak) Salamat
54afaf2326 Add framework and registry for the scheduling framework 2019-04-29 16:40:56 -07:00
Bobby (Babak) Salamat
404dc1ed79 Update scheduler framework plugins to align with the latest changes to the framework design 2019-04-29 16:40:56 -07:00
Kubernetes Prow Robot
a0d8278346
Merge pull request #76301 from xiuqiaoli/master
Remove FIFO scheduling queue and old pod backoff logic
2019-04-24 19:36:44 -07:00
xiuqiao
36effb4700 Remove FIFO scheduling queue and old pod backoff logic 2019-04-25 07:35:22 +08:00
Wei Huang
492b970d73
lazy/dynamic initilization on the int64 pointers of inter-podaffinity priority 2019-04-24 08:13:24 -07:00
Wei Huang
854a266e94
Revert "Revert "scheduler: performance improvement on PodAffinity""
This reverts commit 6d89279115.
2019-04-24 08:13:24 -07:00
Kubernetes Prow Robot
71d064040f
Merge pull request #76883 from hex108/cancel
Cancel processing node if error occurs when getting affinity and anti…
2019-04-24 02:44:17 -07:00
Kubernetes Prow Robot
5f3152e29b
Merge pull request #76777 from cwdsuzhou/useless_caller
Change some code place to void useless caller
2019-04-24 02:44:05 -07:00
Jun Gong
5ad4cd6b72 Cancel processing node if error occurs when getting affinity and antiaffinity 2019-04-22 11:35:23 +08:00
Davanum Srinivas
7b8c9acc09
remove unused code
Change-Id: If821920ec8872e326b7d85437ad8d2620807799d
2019-04-19 08:36:31 -04:00
caiweidong
4486021837 Avoid useless caller 2019-04-19 00:18:54 +08:00
WanLinghao
baf371a188 Remove duplicate package import 2019-04-17 16:37:36 +08:00
Kubernetes Prow Robot
a670e85ad8
Merge pull request #76536 from cwdsuzhou/remove_unused_lock
Remove unused lock in scheduler
2019-04-16 17:48:19 -07:00
Kubernetes Prow Robot
2347da833c
Merge pull request #76378 from cwdsuzhou/clean_up_codes_in_scheduler
clean up unused code in scheduler
2019-04-16 12:29:07 -07:00
PingWang
a82749999d Delete unused struct, nodeEnumerator
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2019-04-16 17:57:22 +08:00
shinytang6
6d11926709 clean up comments 2019-04-14 20:03:39 +08:00
Wei Huang
6d89279115
Revert "scheduler: performance improvement on PodAffinity"
This reverts commit 28730919a6.
2019-04-13 09:09:22 -07:00
caiweidong
4038a5e3db Remove unused lock in scheduler 2019-04-13 13:27:16 +08:00
Wei Huang
6e10f0ce2f
scheduler: rename metric name of pending pods 2019-04-11 14:16:10 -07:00
Kubernetes Prow Robot
ad17bf05d9
Merge pull request #76410 from hex108/priority
Save pod priority to avoid repeated calculation
2019-04-11 00:00:22 -07:00
Kubernetes Prow Robot
98cf84ff86
Merge pull request #76256 from tedyu/master
Use RWMutex for accessing scheduler factory obj
2019-04-10 22:42:08 -07:00
Jun Gong
49832cf887 Save pod priority to avoid repeated calculation 2019-04-11 11:09:47 +08:00
Kubernetes Prow Robot
df5bff927f
Merge pull request #76349 from tedyu/master
Return from loop in removeZone when zone is found
2019-04-10 18:46:09 -07:00
caiweidong
4c12c76a90 clean up unused code 2019-04-10 19:12:40 +08:00
Kubernetes Prow Robot
8a9ed4c91a
Merge pull request #76243 from Huang-Wei/perf-podaffinity
scheduler: performance improvement on PodAffinity
2019-04-09 18:36:12 -07:00
Ted Yu
cd3a30047f Return from loop in removeZone when zone is found 2019-04-09 14:42:44 -07:00
Kubernetes Prow Robot
fdeedf4431
Merge pull request #75911 from marsno1/fix-forloop-in-preemption
Improve for-loop in nodesWherePreemptionMightHelp function
2019-04-09 11:21:01 -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
madianjun
d84a8c563e Improve for-loop in nodesWherePreemptionMightHelp function 2019-04-09 15:24:50 +08:00
Kubernetes Prow Robot
db1ab237bf
Merge pull request #76252 from goodluckbot/pod-backoff-rwmutex
Change Mutex to RWMutex for pod backoff
2019-04-08 22:31:04 -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
Ted Yu
02e0f9c5fd Produce map according to the shorter array in haveOverlap 2019-04-08 13:22:30 -07:00
Ted Yu
22d19be4ca Use RWMutex for accessing plugins 2019-04-08 01:03:20 -07:00
goodluckbot
b92b0eb7c2 Change Mutex to RWMutex for pod backoff 2019-04-08 15:31:48 +08:00
Wei Huang
8f87f580e5
scheduler: tweak scheduler factory mutex 2019-04-07 16:35:06 -07:00
Wei Huang
28730919a6
scheduler: performance improvement on PodAffinity
- replace unnecessary Lock/Unlock with atomic AddInt64
2019-04-07 14:34:22 -07: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
PingWang
b43a9d6ad1 Delete unused struct
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2019-04-03 17:43:42 +08:00
Kubernetes Prow Robot
1ac4cc7980
Merge pull request #75703 from tedyu/master
Simplify the loop for latest start time in pickOneNodeForPreemption
2019-04-01 13:18:58 -07:00
Kubernetes Prow Robot
76b1d83517
Merge pull request #73863 from gnufied/fix-attach-limit-delayed
Fix code to handle delayed binding volumes
2019-04-01 13:18:35 -07:00
Kubernetes Prow Robot
2792f1a24e
Merge pull request #75857 from danielqsj/sc1
support both JSON and YAML for scheduler configuration
2019-03-31 12:36:31 -07:00
danielqsj
412adb8ca9 add unit test for initPolicyFromFile 2019-03-31 21:23:24 +08:00
Kubernetes Prow Robot
e9c42a15f7
Merge pull request #73672 from WanLinghao/failure_domain_remove
Remove dead code about failure-domains option in kube-scheduler
2019-03-30 18:22:33 -07:00
Kubernetes Prow Robot
9a5b7b84df
Merge pull request #75861 from shinytang6/enhance/cleanup-scheduler
scheduler: handle err and remove useless assignment
2019-03-29 17:33:45 -07:00
Kubernetes Prow Robot
a9584a27a7
Merge pull request #75754 from denkensk/cleanup-podtimestamp
clean up func podTimestamp in queue
2019-03-29 17:33:20 -07:00
shinytang6
86515d8b9e scheduler: handle missing err 2019-03-29 19:20:15 +08:00
danielqsj
697ed2cc2a support both JSON and YAML for scheduler configuration 2019-03-29 09:42:58 +08:00
Kubernetes Prow Robot
da7af5897c
Merge pull request #75510 from hex108/starttime
Pick pods for preemption based on StartTime of pods when priorities a…
2019-03-27 18:40:43 -07:00
wangqingcan
8fd45d8300 clean up func podTimestamp 2019-03-27 11:05:19 +08:00
Wei Huang
6897fda878
scheduler: correct dated comments on pod preemption
- correct wordings related with annotations - which hasn't been used since alpha version
2019-03-26 12:10:46 -07:00
Jun Gong
042b83ba73 Pick pods for preemption based on StartTime of pods when priorities are equal 2019-03-26 09:04:50 +08:00
Ted Yu
dbdc782412 Simplify the loop for latest start time in pickOneNodeForPreemption 2019-03-25 15:53:03 -07:00
Kubernetes Prow Robot
231e372d0c
Merge pull request #75620 from misterikkit/logcleanup
Scheduler: Logging cleanup in predicates.go.
2019-03-25 00:03:04 -07:00
Jonathan Basseri
1b447e8d19 Scheduler: Logging cleanup in predicates.go.
This is some light cleanup of logs in predicates.go. In particular, some
log lines have details clarified that will make debugging easier.

I have not touched any VLOG messages, since those usually have plenty of
detail.
2019-03-22 17:33:18 -07:00
Kubernetes Prow Robot
057ad6d4ce
Merge pull request #75571 from Huang-Wei/shorten-alias
shorten scheduler package alias for better readability
2019-03-22 02:34:17 -07:00
Kubernetes Prow Robot
efaf4f3bdb
Merge pull request #75507 from hex108/skip
Avoid unnecessary sort for some cases in selectVictimsOnNode
2019-03-22 00:04:44 -07:00
Wei Huang
49346c1e04
shorten scheduler package alias for better readability
- schedulerinternalcache -> internalcache
2019-03-21 18:14:19 -07:00
Kubernetes Prow Robot
79b0fcc703
Merge pull request #75397 from WanLinghao/equivalence_clean
Clean empty package import by #69504
2019-03-20 13:31:25 -07:00
Kubernetes Prow Robot
9feb23e5f5
Merge pull request #75343 from Huang-Wei/scheduler-cleanup
scheduler: cleanup unused parameters in unschedulableQ
2019-03-20 11:08:27 -07:00
Jun Gong
2755373470 Avoid unnecessary sort for some cases in selectVictimsOnNode 2019-03-20 17:52:37 +08:00
Kubernetes Prow Robot
11ee8244ff
Merge pull request #75150 from qingsenLi/k8s190308-fix-faild
fix typo 'Faild'
2019-03-20 00:54:35 -07:00
Kubernetes Prow Robot
8592098e60
Merge pull request #74974 from goodluckbot/pick-node-preempt-start-time
Pick node for preemption based on start time of pods
2019-03-19 21:26:49 -07:00
WanLinghao
f510f49955 Remove dead code about failure-domains option in kube-scheduler 2019-03-18 14:25:04 +08:00
WanLinghao
a0a8ea4829 Clean empty package import by #69504 2019-03-15 14:32:20 +08:00
Hemant Kumar
a3a93c560b Add more volume types and unbound pvcs etc 2019-03-14 17:07:36 -04:00
Wei Huang
2b554b4286
scheduler: cleanup unused parameters in unschedulableQ 2019-03-13 11:54:16 -07:00
goodluckbot
8d991e6ee2 Pick node for preemption based on start time of pods 2019-03-12 12:30:15 +08:00
qingsenLi
1fdd67f330 fix typo 'faild' 2019-03-08 16:56:16 +08:00
Kubernetes Prow Robot
d5e4973a32
Merge pull request #74544 from gnufied/deprecate-cloudprovider-predicates
Deprecate cloudprovider specific volume limit predicates
2019-03-07 21:20:11 -08: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
Bobby (Babak) Salamat
a1b8777d42 Revert "Merge pull request #73934 from bsalamat/num_cpu"
This reverts commit cfe4ca8012, reversing
changes made to f16035600a.
2019-03-04 13:14:25 -08:00
Kubernetes Prow Robot
cfe4ca8012
Merge pull request #73934 from bsalamat/num_cpu
Use runtime.NumCPU() instead of a fixed value for parallel scheduler threads
2019-03-01 23:04:17 -08:00
Kubernetes Prow Robot
ced9e30990
Merge pull request #74576 from datuanmac/trivial_fix_typos
Trivial fix typo
2019-03-01 19:14:03 -08: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
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
Kubernetes Prow Robot
02bd660ad8
Merge pull request #74573 from m3ngyang/comments-typo
fix some comment typos
2019-02-27 03:23:58 -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
Tuan Do Anh
8c505ccab8 Trivial fix typo
Although it is spelling mistakes, it might make an effect while reading.
2019-02-26 15:48:40 +07:00
m3ngyang
5fbdde4b4a fix some comment typos 2019-02-26 16:00:20 +08:00
Hemant Kumar
8c537b4693 Deprecate cloudprovider specific volume limit predicates
Fixes https://github.com/kubernetes/kubernetes/issues/72920
2019-02-25 16:24:29 -05:00
Xiang Dai
36065c6dd7 delete all duplicate empty blanks
Signed-off-by: Xiang Dai <764524258@qq.com>
2019-02-23 10:28:04 +08:00
danielqsj
489dd27268 add comments for new const 2019-02-23 07:57:05 +08:00
danielqsj
f7b437cae0 convert latency in mertics name to duration 2019-02-22 21:40:13 +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
Nguyen Quang Huy
dad04530df Fix some typos in scheduler
Corect some words for reading more easily.
2019-02-20 14:33:16 +07:00
Kubernetes Prow Robot
97f526665b
Merge pull request #74050 from huynq0911/fix_error_collide_package
Fix error collides with imported package name and log warning
2019-02-15 05:28:11 -08:00
Kubernetes Prow Robot
808f2cf0ef
Merge pull request #72525 from justinsb/owners_should_not_be_executable
Remove executable file permission from OWNERS files
2019-02-14 23:55:45 -08:00
Nguyen Quang Huy
7c923b64d8 Fix error collides with imported package name
Fix error collides with imported package name for plugins.go
- Fix variable 'preds' collides with imported package name
- Fix warning in initializing variables, error string log be capitalized
2019-02-14 09:17:54 +07:00
Kubernetes Prow Robot
2aedcbc7ca
Merge pull request #73761 from andrewsykim/remove-cloud-provider-volume-deps
remove cloud provider dependencies to pkg/volume
2019-02-12 18:45:24 -08:00
Bobby (Babak) Salamat
ec0739bd03 Fix races in scheduling queue tests 2019-02-11 16:38:26 -08:00
Bobby (Babak) Salamat
d0ebeefbc4 Use runtime.NumCPU() instead of a fixed value for parallel scheduler threads. 2019-02-11 13:37:30 -08:00
Andrew Kim
ca6a051b00 remove cloud provider dependencies to pkg/volume
Co-authored-by: Weibin Lin <linweibin1@huawei.com>
2019-02-09 01:16:55 -05:00
Hemant Kumar
b3cc469997 Fix code to handle delayed binding volumes 2019-02-08 17:27:50 -05:00
Kubernetes Prow Robot
54a578d3a1
Merge pull request #72012 from yeya24/patch-1
fix typos lable -> label
2019-02-08 10:36:05 -08:00
Kubernetes Prow Robot
b50c643be0
Merge pull request #73540 from rlenferink/patch-5
Updated OWNERS files to include link to docs
2019-02-08 09:05:56 -08:00
Davanum Srinivas
274c9976d2
DefaultFailureDomains does not need to be global
Change-Id: I5ccfe8b836133b0db402a37a6974fc011aa6335e
2019-02-05 13:39:07 -05: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
Roy Lenferink
b43c04452f Updated OWNERS files to include link to docs 2019-02-04 22:33:12 +01:00
Bobby (Babak) Salamat
a20a243380 Add a PVC to pod spec in volume binding tests to ensure that the predicate runs 2019-02-02 15:01:55 -08:00
Bobby (Babak) Salamat
eb59bc605c Short circuit volume checker if the pod is not requesting any volumes 2019-02-01 22:02:30 -08:00
Kubernetes Prow Robot
2e01637f86
Merge pull request #69504 from krmayankk/refactor-sched1
Move informer event handlers to scheduler
2019-02-01 06:31:39 -08:00
Kubernetes Prow Robot
9388a27212
Merge pull request #73309 from cofyc/fix73216-receivedMoveRequest
Should move all unscheduable pods when we received move request to active queue
2019-01-30 22:03:13 -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
Mayank Kumar
e0a7d96632 Move informer event handlers to Scheduler 2019-01-29 17:53:20 -08:00
yanghaichao12
31a139966c Fix typos 2019-01-26 09:40:09 -05:00
Andrew Kim
93b086f6ea replace k8s.io/apiserver/pkg/util/trace with k8s.io/utils/trace 2019-01-24 15:34:21 -05:00
Kubernetes Prow Robot
4cd759dbe0
Merge pull request #73001 from shivnagarajan/remove_deprecated_taints
remove remaining deprecated taints from 1.9
2019-01-24 05:18:57 -08:00
Kubernetes Prow Robot
2076662733
Merge pull request #72614 from xiaoanyunfei/cleanup/MakeDefaultErrorFunc
Change `MakeDefaultErrorFunc` from method to function
2019-01-23 12:20:05 -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
Shiv Nagarajan
36ee154243 remove deprecated taints from 1.9 2019-01-16 21:20:57 -05: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
Kubernetes Prow Robot
d6b7409103
Merge pull request #72980 from gnufied/cinder-pod-volumes
Add Cinder Max Volume Limit
2019-01-16 13:32:32 -08:00
Hemant Kumar
727b3097f9 Do not make Cinder Max volume predicate a default 2019-01-16 15:17:05 -05:00
Mike McRill
a88d1d3dcc Add Cinder Max Volume Limit
Also add place holder support for reporting limits from node.
2019-01-16 13:46:28 -05:00
wangqingcan
de8cfdcd79 add goroutine to move unschedulablepods to activeq regularly 2019-01-16 12:08:19 +08:00
Bobby (Babak) Salamat
fa6d17f400 Cleanup todo 2019-01-15 17:03:59 -08:00
Kubernetes Prow Robot
14b2014c4a
Merge pull request #72079 from sonasingh46/cleanup
refactor(scheduler): Move priority types to priorities package
2019-01-15 09:24:15 -08:00
Kubernetes Prow Robot
148248353b
Merge pull request #72895 from bsalamat/no_refresh_preemption
Do not snapshot scheduler cache before starting preemption
2019-01-14 22:06:14 -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
9661abeb46
Merge pull request #72801 from Ramyak/ramya/match-all-selectors
Disable matching on few selectors. Remove duplicates.
2019-01-14 19:49:13 -08:00
Bobby (Babak) Salamat
127321296c Fix and improve preemption test to work with the new logic 2019-01-14 14:27:16 -08:00
Bobby (Babak) Salamat
e3f4e1e378 Do not snapshot scheduler cache before starting preemption 2019-01-14 12:07:50 -08:00
sunxiaofei03
fc8a84bb56 Change from method to function 2019-01-14 09:05:44 +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
Ramya Krishnan
339ce0e804 Fix SelectorSpreadPriority scheduler to match all selectors. 2019-01-11 17:15:55 -08:00
Justin SB
dd19b923b7
Remove executable file permission from OWNERS files 2019-01-11 16:42:59 -08:00
Kubernetes Prow Robot
97d7795070
Merge pull request #71504 from ping035627/k8s-181128
Perfect some logs description
2019-01-09 19:28:10 -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
Kubernetes Prow Robot
bd8edc27db
Merge pull request #72615 from xiaoanyunfei/cleanup/getBinderFunc
Change `getBinderFunc` from method to function
2019-01-09 05:33:22 -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
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
sunxiaofei03
cf4eacfdc7 Change from method to function 2019-01-09 09:11:12 +08:00
Guoliang Wang
3c24c99b08 Move users of factory.NewConfigFactory to scheduler.New 2019-01-09 06:40:30 +08:00
sonasingh46
1fe7ce21bc refactor(scheduler): Move priority types to priorities package
This moves the priority types from the algorithm package
to priorities package.
Idea is to move the type to the packages where it is
implemented. This will ease the future refactor process.
2019-01-09 02:39:11 +05:30
Kubernetes Prow Robot
1b28775db1
Merge pull request #72569 from luxas/component_base_init
Create the k8s.io/component-base staging repo
2019-01-08 03:18:35 -08:00
danielqsj
0f516f751d Mark deprecated in related scheduler metrics 2019-01-08 13:07:16 +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
danielqsj
8dc1e83946 Add func comment for MakeNextPodFunc 2019-01-08 11:07:47 +08:00
Kubernetes Prow Robot
80afde7ca7
Merge pull request #70026 from bertinatto/only_schedule_pod_if_pv_requirements_are_met
Check PV requirements before scheduling
2019-01-07 03:46:21 -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
Lucas Käldström
1edd2723f8
autogenerated files 2019-01-06 15:48:53 +02:00
Lucas Käldström
0140c82c16
Updated references from k8s.io/{apiserver,apimachinery} to the new k8s.io/component-base repo. Co-authored-by @Klaven 2019-01-06 14:01:26 +02:00
Kubernetes Prow Robot
dd53c82d7c
Merge pull request #72554 from misterikkit/cachecompare
Move CacheDebugger signal handling into the package.
2019-01-04 16:20:42 -08:00
Fabio Bertinatto
bb4fcddd1b Check PV requirements before scheduling pod 2019-01-04 12:33:18 +01:00
Kubernetes Prow Robot
2a1560061e
Merge pull request #65546 from ravigadde/ext-api
Add missing json tags to extender config
2019-01-04 01:08:29 -08: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
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
Ravi Gadde
4fcc712cc9 Add missing json tags to extender config 2019-01-03 14:20:24 -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
Yecheng Fu
fa88bcc154 Update comments for PriorityQueue.
Log condition reason which is useful for debugging.
2019-01-03 09:25:05 +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
Kubernetes Prow Robot
cd06791709
Merge pull request #72396 from y-taka-23/register-plugins
Register plugins with the scheduling framework properly
2018-12-28 16:59:51 -08:00
Kubernetes Prow Robot
d6e0d5a9e8
Merge pull request #71929 from tanshanshan/schedulerlittle10
add description about namespace for  pod in log
2018-12-28 10:52:12 -08:00
TAKAHASHI Yuto
ec6a9881a4 Register plugins with the scheduling framework properly 2018-12-28 19:10:01 +09:00
Jordan Liggitt
73dcfe12da Stop checking VolumeScheduling feature gate 2018-12-27 17:45:45 -05: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
Bhavin Gandhi
ca46c1da15
[scheduler] Move predicate & priority registration to separate file
- Maintain list of default predicates and priorities in defaults.go
  and move the registration to separate files

Signed-off-by: Bhavin Gandhi <bhavin7392@gmail.com>
2018-12-22 19:30:34 +05:30
Kubernetes Prow Robot
37dc6789d7
Merge pull request #71978 from denkensk/move-predicate-types
Move predicate types from algorithm to predicates
2018-12-21 19:05:29 -08:00
Kubernetes Prow Robot
aaa4faba39
Merge pull request #72081 from denkensk/make-scheduleinternalcache-podFilter-public
Make PodFilter as part of public API
2018-12-21 12:37:39 -08:00
wangqingcan
000aa06912 Make scheduleinternalcache.PodFilter as public 2018-12-21 23:09:56 +08:00
wangqingcan
b82a1d4600 Move predicate types from algorithm to predicates 2018-12-21 22:26:47 +08:00
PingWang
a9154b1a91 Perfect some logs description
Signed-off-by: PingWang <wang.ping5@zte.com.cn>
2018-12-21 17:29:47 +08:00
Kubernetes Prow Robot
d257ee9bfd
Merge pull request #72014 from huynq0911/scheduler-cleanup-71867-move-compatibility-test
[Fix issue scheduler cleanup 71867]: Move compatibility_test.go to pkg/scheduler/api
2018-12-20 22:39:09 -08:00
Kubernetes Prow Robot
0d63cf9caa
Merge pull request #67037 from Huang-Wei/cleanup-ood
cleanup logic related with OutOfDisk
2018-12-20 17:30:27 -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
Nguyen Quang Huy
b2ceccec57 Fix issue scheduler cleanup 71867
Move compatibility_test.go to pkg/scheduler/api
2018-12-20 13:04:58 +07:00
Guoliang Wang
6515c4e09b Set percentage of nodes scored in each cycle dynamically based on the cluster size 2018-12-20 11:20:00 +08:00
Wei Huang
8f87e71e0c
cleanup logic related with OutOfDisk
- cleanup OOD logic in scheduling and node controller
- update comments and testcases
2018-12-18 11:28:02 -08:00
Harry Zhang
797601d99d Fixed outdated bazel 2018-12-17 17:05:49 -08: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
Kubernetes Prow Robot
a521285b7c
Merge pull request #72073 from misterikkit/cleanup
Minor cleanup in scheduler/PriorityQueue
2018-12-14 23:23:19 -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
Jonathan Basseri
8e25361320 Move ScheduleAlgorithm to the core package.
This moves the type `ScheduleAlgorithm` from `pkg/scheduler/algorithm`
to `pkg/scheduler/core`. The reason for this move is to fix our import
dependency graph and allow predicate & priority types to be moved into
their appropriate packages.

The new location makes sense because `core` is the only package that
exports an implementation of this type.
2018-12-13 15:08:38 -08:00
yeya24
16acbc84ce fix typos lable -> label 2018-12-13 17:52:13 +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
tanshanshan
a26074802f add description about namespace for pod in log 2018-12-11 10:42:27 +08:00
mlmhl
2fe9b1438c activate unschedulable pods only if the node became more schedulable 2018-12-10 09:48:23 +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
Kubernetes Prow Robot
f62b530f4d
Merge pull request #57057 from greghaynes/reschedule-with-backoff
Reschedule with backoff
2018-12-07 21:13:57 -08:00
Gregory Haynes
73710f06db Check for shutdown in TryBackoffAndWait 2018-12-06 16:57:20 +00: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
Kubernetes Prow Robot
720c10282c
Merge pull request #71722 from bsalamat/fix_priorityconfig
Avoid copying PriorityConfig and SchedulerExtender structs for every node while running priority functions
2018-12-05 20:31:51 -08:00
Bobby (Babak) Salamat
ece8f42ea2 Run old-style priority functions in parallel to the map-reduce style ones 2018-12-04 17:58:28 -08:00
Bobby (Babak) Salamat
76591db7d4 Avoid copying Extender struct while running priority functions 2018-12-04 13:50:59 -08:00
Bobby (Babak) Salamat
70f923ed05 Avoid copying PriorityConfig struct while running priority functions 2018-12-04 11:28:25 -08:00
Gregory Haynes
082b48240a Implement scheduler.util.backoff as a queue
We are going to use PodBackoff for controlling backoff when adding
unschedulable pods back to the active scheduling queue. In order to do
this more easily, limit the interface for PodBackoff to only this struct
(rather than exposing BackoffEntry) and change the backing expiry
implementation to be queue based.
2018-12-04 18:01:43 +00:00
Gregory Haynes
c821f2ed2f Move scheduling Heap in to scheduler.core.utils
The Heap data structure is useful for our backoff system in addition to
scheduling queue. Move it to somewhere it can be consumed by both
systems and properly export needed names. Also adding unit tests
from client-go/tools/cache/heap.go.
2018-12-04 18:01:42 +00:00
Jonathan Basseri
b864a5a808 Remove scheduler "TestGroup" utility.
This util was used to fake certain aspects of apiserver behavior, such
as resource paths and JSON encoding. Our unit tests have been refactored
so they don't rely on the REST or JSON aspects of apiserver. This util
is no longer needed.
2018-12-03 16:28:21 -08:00
Kubernetes Prow Robot
2c322a2ff5
Merge pull request #70227 from bsalamat/reserve
Add plugin interfaces for reserve and prebind extension points of the scheduling framework
2018-12-01 05:25:12 -08:00
Kubernetes Prow Robot
82abbdc11a
Merge pull request #71488 from bsalamat/queue-sort
Change sort function of the scheduling queue to avoid starvation
2018-12-01 03:59:51 -08:00
Bobby (Babak) Salamat
e60f510e38 Autogenerated files 2018-11-30 16:03:47 -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
Bobby (Babak) Salamat
f6f81fb1f3 Add Context as a mechanism to pass data between plugins. 2018-11-30 16:02:09 -08:00
Bobby (Babak) Salamat
7221589dde Add "reserve" and "prebind" plugin interfaces for the scheduling framework. 2018-11-30 16:02:09 -08:00
k8s-ci-robot
79e5cb2cb7
Merge pull request #71302 from liggitt/verify-unit-test-feature-gates
Split mutable and read-only access to feature gates, limit tests to readonly access
2018-11-29 21:45:12 -08:00
k8s-ci-robot
527d1c34cc
Merge pull request #70947 from Adirio/nodetree-thread-safety
Scheduler internal NodeTree thread-safe NumNodes
2018-11-29 07:36:48 -08:00
k8s-ci-robot
6d87c074e2
Merge pull request #63664 from xchapter7x/pkg-scheduler-api-validation
use subtest for table units (pkg/scheduler/api/validation)
2018-11-29 02:00:43 -08:00
Bobby (Babak) Salamat
36f8859fa0 autogenerated files 2018-11-27 17:08:58 -08:00
Bobby (Babak) Salamat
554acf2b38 Change sort function of the scheduling queue to avoid starvation 2018-11-27 17:08:40 -08:00
Jordan Liggitt
2498ca7606 drop VerifyFeatureGatesUnchanged 2018-11-21 11:51:33 -05:00
Yecheng Fu
8fc00ebda6 Clear pod binding cache. 2018-11-21 11:24:53 +08:00
k8s-ci-robot
7e621ccb08
Merge pull request #71063 from Huang-Wei/nodeinfo-clone-panic
fix a scheduler panic due to internal cache inconsistency
2018-11-16 20:27:44 -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
Wei Huang
a86ba8b3c4
fix a scheduler panic due to internal cache inconsistency 2018-11-16 13:02:13 -08:00
Jordan Liggitt
733dd9dfd7 Add tests to ensure feature gate changes don't escape kubelet/scheduler packages 2018-11-16 10:52:53 -05:00
Jordan Liggitt
de8bf9b63d fix scheduler and kubelet unit tests leaking feature flag changes 2018-11-16 10:52:53 -05:00
Jordan Liggitt
358c092abe fix storage unit tests leaking feature flag changes 2018-11-16 10:52:52 -05: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
Adrián Orive
c7cba7370f Scheduler internal NodeTree thread-safe NumNodes
Signed-off-by: Adrián Orive <adrian.orive.oneca@gmail.com>
2018-11-13 08:40:48 +01: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
k8s-ci-robot
b8fece50f5
Merge pull request #70892 from mikedanese/schedrace
Fix a race in the scheduler.
2018-11-09 23:01:15 -08:00
Mike Danese
62c3ec969d Fix a race in the scheduler.
Loop over priorityConfigs seperately. The node loop can only safely
modify result[i][index]. Before this change it sometimes modified
result[i] concurrently with other loops.

Fixes: 7164967662

==================== Test output for //pkg/scheduler/core:go_default_test:
==================
WARNING: DATA RACE
Read at 0x00c0005e8ed0 by goroutine 22:
  k8s.io/kubernetes/pkg/scheduler/core.PrioritizeNodes.func2()
      pkg/scheduler/core/generic_scheduler.go:667 +0x2ea
  k8s.io/kubernetes/vendor/k8s.io/client-go/util/workqueue.ParallelizeUntil.func1()
      staging/src/k8s.io/client-go/util/workqueue/parallelizer.go:65 +0x9e

Previous write at 0x00c0005e8ed0 by goroutine 21:
  k8s.io/kubernetes/pkg/scheduler/core.PrioritizeNodes.func2()
      pkg/scheduler/core/generic_scheduler.go:668 +0x450
  k8s.io/kubernetes/vendor/k8s.io/client-go/util/workqueue.ParallelizeUntil.func1()
      staging/src/k8s.io/client-go/util/workqueue/parallelizer.go:65 +0x9e

Goroutine 22 (running) created at:
  k8s.io/kubernetes/vendor/k8s.io/client-go/util/workqueue.ParallelizeUntil()
      staging/src/k8s.io/client-go/util/workqueue/parallelizer.go:57 +0x1a3
  k8s.io/kubernetes/pkg/scheduler/core.PrioritizeNodes()
      pkg/scheduler/core/generic_scheduler.go:682 +0x592
  k8s.io/kubernetes/pkg/scheduler/core.(*genericScheduler).Schedule()
      pkg/scheduler/core/generic_scheduler.go:186 +0x77d
  k8s.io/kubernetes/pkg/scheduler/core.TestGenericScheduler.func1()
      pkg/scheduler/core/generic_scheduler_test.go:464 +0x91f
  testing.tRunner()
      GOROOT/src/testing/testing.go:827 +0x162

Goroutine 21 (running) created at:
  k8s.io/kubernetes/vendor/k8s.io/client-go/util/workqueue.ParallelizeUntil()
      staging/src/k8s.io/client-go/util/workqueue/parallelizer.go:57 +0x1a3
  k8s.io/kubernetes/pkg/scheduler/core.PrioritizeNodes()
      pkg/scheduler/core/generic_scheduler.go:682 +0x592
  k8s.io/kubernetes/pkg/scheduler/core.(*genericScheduler).Schedule()
      pkg/scheduler/core/generic_scheduler.go:186 +0x77d
  k8s.io/kubernetes/pkg/scheduler/core.TestGenericScheduler.func1()
      pkg/scheduler/core/generic_scheduler_test.go:464 +0x91f
  testing.tRunner()
      GOROOT/src/testing/testing.go:827 +0x162
==================
--- FAIL: TestGenericScheduler (0.01s)
    --- FAIL: TestGenericScheduler/test_6 (0.00s)
        testing.go:771: race detected during execution of test
    testing.go:771: race detected during execution of test
FAIL
2018-11-09 15:21:22 -08:00
Babak "Bobby" Salamat
a2c0958428
Revert "Hold mutex lock shorter when processing inter-pod affinity/anti-affin…" 2018-11-08 18:26:26 -08:00
k8s-ci-robot
be800e623a
Merge pull request #69663 from sttts/sttts-scheduler-secure-serving
scheduler: enable secure port and authn/z
2018-11-08 17:36:14 -08:00