Commit Graph

258 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
ae40c62c49
Merge pull request #100286 from tanjing2020/skip_updates_assumed_pods
Scheduler: skip updates of assumed pods
2021-04-08 20:29:29 -07:00
Kubernetes Prow Robot
7cd73076a2
Merge pull request #100049 from Huang-Wei/basic-check-prior-to-enq
sched: support PreEnqueueChecks prior to moving Pods
2021-04-08 17:11:04 -07:00
tanjing2020
d4465b995e Scheduler: skip updates of assumed pods 2021-03-24 10:01:22 +08:00
Kubernetes Prow Robot
5bed8d355f
Merge pull request #98829 from NickrenREN/scheduler-queue-update
fix scheduler queue update logic
2021-03-16 09:08:36 -07:00
Wei Huang
6384f397b4
sched: support PreEnqueueChecks prior to moving Pods 2021-03-11 12:31:50 -08:00
renyuquan
53ee08a40e fix scheduler queue update logic 2021-03-10 15:48:18 +08:00
drfish
c2ceb21a3e Make parallelism as part of schedulerOptions 2021-03-09 23:25:55 +08:00
Kubernetes Prow Robot
9067b5691d
Merge pull request #97818 from damemi/remove-util-node-dep
Scheduler: remove direct dependency for k8s.io/kubernetes/pkg/util/node
2021-03-05 04:06:32 -08:00
Mike Dame
af045087d9 Move GetZoneKey function to component-helpers 2021-03-04 10:32:38 -05:00
Abdullah Gharaibeh
c7fef196b6 Implements pod affinity NamespaceSelector feature 2021-03-04 07:30:24 -05:00
Wei Huang
6fdb1a8439
sched: add a benchmark test for MoveAllToActiveOrBackoffQueue 2021-03-03 07:20:08 -08:00
Wei Huang
f322019d7a
Store a cluster event to plugin map in SchedulerQueue 2021-03-03 07:20:07 -08:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
drfish
bc2df9de72 Use PodInfo instead of Pod for nominatedPods and QueuedPodInfo 2021-02-22 22:00:23 +08:00
Kubernetes Prow Robot
d69d228a2c
Merge pull request #99211 from deepakiam/master
Substituting bool maps with String sets
2021-02-19 00:20:57 -08:00
Kubernetes Prow Robot
320aaf4859
Merge pull request #98358 from tanjing2020/scheduling_queue.go
migrate scheduling_queue.go to structured logging
2021-02-19 00:20:24 -08:00
Deepak Nair
49a9e28dd8 Substitute boolean maps with String sets 2021-02-18 20:59:32 -08:00
tanjing2020
d0eecbd0a9 migrate scheduling_queue.go to structured logging 2021-02-18 09:56:31 +08:00
Wei Huang
04a40d1f18
sched: remove Unknown queuing literal 2021-02-10 11:03:07 -08:00
drfish
ebb6fb5b0c Organize scheduler unit tests into subtests 2021-02-02 21:41:20 +08:00
chymy
ed6475ae48 migrate pkg/scheduler/internal/cache/debugger/comparer.go to structured logs
Signed-off-by: chymy <chang.min1@zte.com.cn>
2021-02-01 11:20:05 +08:00
Justin SB
8797738c02 Fix spelling typos: scheduable -> schedulable
Bulk fix of a common typo.
2021-01-09 12:59:33 -05:00
jinde.zgm
17b084938a
fix gofmt bug 2020-12-15 20:07:47 +08:00
jindezgm
5e6177897d
Refresh Timestamp when pod is not present in the three sub-queues
The pInfo.Timestamp is refreshed but the sort in activeQ or podBackoffQ is not be updated when pod  is already present in the backoff or active queue.
AddUnschedulableIfNotPresent() return error if pod is already present in the backoff or active queue, and there is no re-add.
So  refresh  pInfo.Timestamp when  the pod is not present in the three sub-queues, otherwise need to update the order of the pod in the active or backoff queue, for example p.activeQ.Update(pInfo)
2020-12-14 22:39:08 +08:00
Tim Hockin
4068402459 Change trivial topology labels
In these cases the actual label key is incidental.
2020-11-12 11:21:37 -08:00
Kubernetes Prow Robot
bd95fb101d
Merge pull request #94814 from adtac/preemption2
optimise defaultpreemption: enumerate fewer candidates
2020-11-05 21:18:50 -08:00
Tim Hockin
819ff9b087
Use topology labels instead of old beta names (#96033)
* Rename const for topology.../zone

* Rename const for topology.../region

* Rename const for failure-domain.../zone

* Rename const for failure-domain.../region

* Restore old names for compat
2020-11-05 20:26:50 -08:00
Kubernetes Prow Robot
43a0007fae
Merge pull request #96062 from Huang-Wei/sched-aware-of-nodes
Ensure created nodes are present in scheduler cache before scheduling
2020-11-05 13:13:05 -08:00
Adhityaa Chandrasekar
a3d94b53ca optimise defaultpreemption: enumerate fewer candidates
Signed-off-by: Adhityaa Chandrasekar <adtac@google.com>
2020-11-04 22:39:58 +00:00
Wei Huang
f054765762
Add a function to ensure created nodes are present in scheduler cache 2020-11-03 15:25:44 -08:00
lixiaobing1
03cfd30ee2 fix n to nodeInfo easy to understand 2020-11-03 08:44:55 +08:00
Harsh Singh
1763688d71 Added config parameter for CPU threads 2020-10-29 12:16:10 +05:30
Ali
09b2e8f638 Move scheduler interface to pkg/scheduler/framework 2020-10-13 13:13:27 +11:00
Kubernetes Prow Robot
3a987d5b85
Merge pull request #95130 from alculquicondor/fix-snapshot
Fix UpdateSnapshot when Node is partially removed
2020-09-28 21:31:38 -07:00
Aldo Culquicondor
d6f09f7dfb Fix UpdateSnapshot when Node is partially removed
Change-Id: I5b459e9ea67020183c87d1ce0a2380efb8cc3e05
2020-09-28 17:50:41 -04:00
Aldo Culquicondor
290bdf3f08 Fix test name TestDump
Change-Id: If885303b86060aed7a3e2aa20450cadd1f30752c
2020-09-28 15:30:05 -04:00
Kubernetes Prow Robot
a576196076
Merge pull request #94413 from chendave/flake
Enhancement on the testcase to cover more possibilities
2020-09-22 12:23:20 -07:00
Kubernetes Prow Robot
d239cdfbc0
Merge pull request #94059 from ahg-g/ahg-anti-affinity
Track pods with required anti-affinity
2020-09-08 04:54:12 -07:00
Dave Chen
4b2c054e59 Enhancement on the testcase to cover more possibilities
This change enriches the testcase of `TestPriorityQueue_MoveAllToActiveOrBackoffQueue`
to cover the case that pods in the unschedulableQ could be moved to activeQ after the
backing off.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2020-09-03 14:04:03 +08:00
Abdullah Gharaibeh
a8873e1a43 Track pods with required anti-affinity
This is a performance optimization that reduces the overhead of inter-pod affinity PreFilter calculaitons. Basically
eliminates that overhead when no pods in the cluster use required pod anti-affinity. This offered 20% improvement on 5k clusters for preferred anti-affinity benchmarks.
2020-08-21 10:09:21 -04:00
maelk
fc5edb8c12
Change nodeInfolist building logic in scheduler
This commit transforms the next() function of the scheduler node
tree into a listNodes() function that directly returns a list of
nodes, going through the zones in a round-robin fashion. This
removes the flawed logic of the next() function.
2020-08-18 11:35:14 +03:00
Aldo Culquicondor
dfe9e413d9 Keep track of remaining pods when a node is deleted.
The apiserver is expected to send pod deletion events that might arrive at a different time. However, sometimes a node could be recreated without its pods being deleted.

Partial revert of https://github.com/kubernetes/kubernetes/pull/86964

Signed-off-by: Aldo Culquicondor <acondor@google.com>
Change-Id: I51f683e5f05689b711c81ebff34e7118b5337571
2020-08-13 14:24:01 -04:00
Aldo Culquicondor
16d7ecfa45 Remove direct accesses to cache's node map
Signed-off-by: Aldo Culquicondor <acondor@google.com>
Change-Id: Iebb22fc816926aaa1ddd1e4b2e52f335a275ffaa
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-08-13 14:22:06 -04:00
He Jie Xu
33a7e94b6a Create new slices to avoid modify original fake data
When create fake data for the nodeTree unittests, The 'append' is invoked
on the common fake data set. That makes the unittests is running with unexpected
fake data after that.
2020-07-29 11:36:47 +08:00
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