Commit Graph

214 Commits

Author SHA1 Message Date
Maël Kimmerlin
c2ec8bedbc
Fix scheduler issue with nodetree additions
When nodes are added in multiple zones at once, the nodeTree next
function does not return a correct list of nodes but repeats some
This commit resets the index before starting to call next() to
prevent this issue

Special thanks to igraecao for the help in finding the bug

Co-authored-by: igraecao <matvej.yolli@outlook.com>
2020-07-24 09:42:53 +03:00
Gaurav Singh
00f28747b3 TestSchedulingQueue_Close: Remove struct tests and the corresponding for loop
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

TestSchedulingQueue_Close: Remove for loop

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

remove the tests slice

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

Remove struct

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

Remove t.Run()

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

Add function name

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

Remove nested function

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>

Replace expectedErr with wantErr

Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
2020-06-11 11:19:14 -04:00
Wei Huang
f4b726237a
Add function NominatedPodsForNode to PodNominator interface.
- replace SchedulingQueue with PodNominator in genericScheduler.
2020-05-20 14:05:18 -07:00
Wei Huang
bd184035c4
Extract logic related with scheduler nominatedPods to an interface
- rename `UpdateNominatedPodForNode` to `AddNominatedPod`
- promote `update` to `UpdateNominatedPod`
- anonymous lock in nominatedMap
- pass PodNominator as an option to NewFramework
2020-05-18 10:29:08 -07:00
Kubernetes Prow Robot
d4ce66fe0b
Merge pull request #90660 from Huang-Wei/synced-sched-err-call
Move unschedulable Pod to internal schedulingQ synchronously
2020-05-16 19:00:06 -07:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Wei Huang
133a02540f
Move unschedulable Pod to internal schedulingQ synchronously
- use in-cache Pod instead of real-time Pod (by calling API server) to mark it as unschedulable
  in internal schedulingQ
- remove the backoff logic as now we don't call API server
- the whole logic is changed to a synchronous call
2020-05-15 19:27:28 -07:00
Abdullah Gharaibeh
5e0211c72d Added pre-processed required affinity terms to scheduler's PodInfo type. 2020-05-14 10:30:42 -04:00
Wei Huang
8c2a540cdc
Refine schedulerQueue test to avoid unneeded locks
- revert PR 88331
- remove createAndRunPriorityQueue()
- PriorityQueue is created and not run by default
- flushXYZ() is called on demand by manipulating FakeClock and Step()
2020-05-05 00:11:04 -07:00
lixiang
5844bc3b9f There's no need to set moveRequestCycle and do broadcast twice. 2020-04-28 00:43:58 +08:00
Kubernetes Prow Robot
29e4e66b59
Merge pull request #90371 from ahg-g/ahg-pinfo
Deprecate scheduler's PodLister interface
2020-04-22 23:09:58 -07:00
Abdullah Gharaibeh
57585640e8 change scheduler's framework PodLister to PodInfoLister 2020-04-22 19:25:27 -04:00
Kubernetes Prow Robot
9066ee9906
Merge pull request #90330 from cwdsuzhou/April/log_level
Increase log level to avoid print binding messages in framework too frequently
2020-04-22 14:03:46 -07:00
caiweidong
171a242e1e Increase log level to avoid print binding messages in framework too frequently 2020-04-22 11:37:35 +08:00
Abdullah Gharaibeh
a151682887 Split scheduler's PodInfo into two types, PodInfo and PodQueueInfo 2020-04-21 21:45:20 -04:00
Abdullah Gharaibeh
2c51c13620 Scheduler NodeInfo cleanup 2020-04-09 19:03:51 -04:00
Kubernetes Prow Robot
0c9245a29f
Merge pull request #89974 from ahg-g/ahg-info
scheduler's NodeInfo tracks PodInfos instead of Pods
2020-04-09 09:19:58 -07:00
Abdullah Gharaibeh
b8ddd00312 scheduler's NodeInfo tracks PodInfos instead of Pods 2020-04-08 17:53:20 -04:00
Kubernetes Prow Robot
1edbfe1745
Merge pull request #89908 from alculquicondor/fix_cache
Skip updating scheduler cache on pod update if the node was deleted
2020-04-07 16:46:06 -07:00
Aldo Culquicondor
e75b5dcfe4 Skip updating cache on pod update if the node was deleted
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-04-07 13:24:42 -04:00
Abdullah Gharaibeh
a5d8172715 move nodeinfo type to framework pkg 2020-04-07 10:25:24 -04:00
Harsh Singh
015d06bf41 Internal channels for scheduler 2020-04-04 02:30:16 +05:30
Abdullah Gharaibeh
ed3fe054df move scheduler nodeinfo to pkg/scheduler/types 2020-03-31 21:02:09 -04:00
Aldo Culquicondor
e902e70d0d Use sqrt(n) chunk size in pod affinity and core scheduler 2020-03-24 10:29:59 -04:00
Aldo Culquicondor
c048858471 Support multiple scheduling profiles in a single scheduler
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-25 11:31:20 -05:00
skilxn-go
74718adf10 fix data races for other usage of Q 2020-02-20 00:50:13 +08:00
skilxn-go
7e33feec57 fix data races in scheduler unit tests 2020-02-19 22:27:40 +08:00
Kubernetes Prow Robot
bde718d100
Merge pull request #87948 from notpad/feature/pod_backoff
Remove PodBackoffMap
2020-02-14 13:11:28 -08:00
notpad
a4e4a99435 Remove PodBackoffMap 2020-02-14 08:31:07 +08:00
Aldo Culquicondor
60c972098c Add defaults to pod affinity args
And remove pod affinity parameter from algorithm provider registry

Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-03 14:58:28 -05:00
Aldo Culquicondor
9d2786c383 Fix back off when scheduling cycle is delayed
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-29 13:15:13 -05:00
Haosdent Huang
50d511d4b8 Deprecate scheduler's framework.plugins.RegistryArgs 2020-01-21 23:50:58 +08:00
Aldo Culquicondor
7a39e1396a Remove unnecessary slow binding test
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-20 11:49:45 -05:00
Aldo Culquicondor
f53d7e55df Move Snapshot from nodeinfo/snapshot to internal/cache
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-17 13:29:41 -05:00
Aldo Culquicondor
6a14203658 Rename cache's Snapshot to Dump
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-17 11:28:08 -05:00
Wei Huang
c712230ac1
Implement default queue sort logic as a scheduler plugin 2020-01-16 19:10:43 -08:00
Wei Huang
b2159b5d66
Remove scheduler/algorithm/priorities/util package 2020-01-09 20:16:05 -08:00
Aldo Culquicondor
afe3b907a1 Remove nodes from cache immediately on delete events
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-09 12:58:12 -05:00
Kubernetes Prow Robot
edad4bbfc8
Merge pull request #86940 from skilxn-go/master
Add VolumeBinder to FrameworkHandle interface
2020-01-09 03:01:45 -08:00
skilxn-go
5def91d778 Add VolumeBinder to FrameworkHandle interface 2020-01-09 10:29:35 +08:00
Abdullah Gharaibeh
f3c7a4c823 Update scheduler's RunFilterPlugins to return a plugin to status map 2020-01-08 16:44:51 -05:00
Abdullah Gharaibeh
591b870691 fix how we check for node info list consistency 2020-01-07 11:45:25 -05:00
Kubernetes Prow Robot
862c8bf818
Merge pull request #85561 from cwdsuzhou/Nov/return_when_failed
Return when removePod failed
2020-01-05 06:23:40 -08:00
caiweidong
02e217759e update comments of some funs in scheduling_queue 2020-01-02 23:35:12 +08:00
caiweidong
6410ac3173 Return when removePod failed 2019-12-31 10:11:12 +08:00
Abdullah Gharaibeh
429448cb40 move inter pod affinity predicate logic to its Filter plugin 2019-12-20 16:58:36 -05:00
Kubernetes Prow Robot
ca7ad98d60
Merge pull request #85470 from cwdsuzhou/add_pod_info
add pod info when failing to add pod to unschedulableQ
2019-12-03 18:35:10 -08:00
Abdullah Gharaibeh
f388534082 make scheduling queue start before the scheduler starts and stops after the scheduler stops 2019-12-02 14:35:09 -05:00
Abdullah Gharaibeh
5ea43f20cb optimize scheduler's UpdateNodeInfoSnapshot 2019-11-29 15:06:13 -05:00