Commit Graph

48 Commits

Author SHA1 Message Date
kidddddddddddddddddddddd
f5a69ffda9
feature(scheduler): won't run Score if PreScore returned a Skip status (#115652)
* allow preScore to return skip status to skip running the corresponding score extension

* add test case for all skipped

* add test case for select host

* update plugin status

* skip score when all plugins are skipped

* update
2023-02-13 14:53:29 -08:00
Kubernetes Prow Robot
c549b59983
Merge pull request #114125 from sanposhiho/skip-reimplementation
feature(scheduler): won't run Filter if PreFilter returned a Skip status
2023-01-06 02:25:59 -08:00
Kensei Nakada
e5b536755f feature(scheduler): won't run Filter if PreFilter returned a Skip status 2023-01-06 07:38:15 +00:00
Kante Yin
2c205e291d Distinguish unschedulable with unresolvable in scheduler
Before, in RunPostFilterPlugins, we didn't distinguish between unschedulable and unresolvable
because we only have one postFilterPlugin by default, now, we have at least two, we should
make sure that once a postFilterPlugin returns unresolvable, we'll return directly

Signed-off-by: Kante Yin <kerthcet@gmail.com>
2023-01-05 16:59:19 +08:00
Kante Yin
49e7e80999 Modify the return type of RunFilterPlugins to *Status
Before, the return type of RunFilterPlugins is a Map, but considering we'll return immediately
once we met unsuccessful status, this is not necessary.

Signed-off-by: Kante Yin <kerthcet@gmail.com>
2023-01-03 14:33:58 +08:00
Kubernetes Prow Robot
70c28f3e12
Merge pull request #114486 from kerthcet/cleanup/make-preemption-more-readable
Make handling scheduleResult more readable
2022-12-21 15:01:25 -08:00
Kante Yin
c8908716ee Make handling scheduleResult more readable
Signed-off-by: Kante Yin <kerthcet@gmail.com>
2022-12-22 01:22:34 +08:00
kidddddddddddddddddddddd
e789beb213 errMsg 2022-12-19 23:52:06 +08:00
kidddddddddddddddddddddd
6ca62eb2cb refactor 2022-12-13 11:36:12 +08:00
Kensei Nakada
f3868abfed Revert "feature(scheduler): won't run Filter if PreFilter returned a Skip status"
This reverts commit 786be73b4b.
2022-11-09 11:55:33 +00:00
Kubernetes Prow Robot
2b7b5245ea
Merge pull request #112637 from sanposhiho/pre-filter-skip
feature(scheduler): won't run Filter if PreFilter returned a Skip status
2022-11-08 06:16:37 -08:00
Kensei Nakada
786be73b4b feature(scheduler): won't run Filter if PreFilter returned a Skip status 2022-11-07 23:47:48 +00:00
Wei Huang
0b27f25252
PreEnqueue implementation
- Add PreEnqueuePlugin to Scheduler Framework
- Implement PreEnqueuePlugin in scheduler queue
- Implementation of SchedulingGates plugin
- Metrics
2022-11-07 14:02:58 -08:00
Kubernetes Prow Robot
8305358630
Merge pull request #108494 from sanposhiho/RunScorePlugins-return-type
change framework.RunScorePlugins to return slice organized by node
2022-10-20 08:57:02 -07:00
sanposhiho
cbf1ea5e68 change framework.RunScorePlugins to return slice organized by node 2022-10-20 01:04:38 +00:00
Yuan Chen
7297f48f12 Add profile level percentageOfNodesToScore
Fix conversion errors

Changed the order

update

update

fix manaul coversions

keep the global parameter for backward compatibility

Address Wei's comments

Fix an error

Fix issues

Add unit tests for validation

Fix a comment

Address comments

Update comments

fix verifiation errors

Add tests for scheme_test.go

Convert percentageOfNodesToScore to pointer

Fix errors

Resolve conflicts

Fix testing errors

Address Wei's comments

Revert IntPtr to Int changes

Address comments

Not overrite percentageOfNodesToScore

Fix a bug

Fix a bug

change errs to err

Fix a nit

Remove duplication

Address comments

Fix lint warning

Fix an issue

Update comments

Clean up

Address comments

Revert changes to defaults

fix unit test error

Update

Fix tests

Use default PluginConfigs
2022-10-14 13:01:06 -07:00
Kante Yin
096dafe757
Feat: unify the status handle when return in bindingCycle (#112103)
Signed-off-by: kerthcet <kerthcet@gmail.com>

Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-09-09 08:31:23 -07:00
BinacsLee
14731ae1a7 cleanup: use sets.Clone() to avoid interim slice 2022-07-20 10:55:25 +08:00
HaoJie Liu
d8702cc369
fix: update comment for related updated func
Signed-off-by: HaoJie Liu <liuhaojie@beyondcent.com>
2022-07-14 10:20:48 +08:00
kerthcet
41e46a1bb4 cleanup: remove unnecessary codes
Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-05-11 16:07:12 +08:00
shinta
22984402ab impl 'IsWait' functions
Co-authored-by: Alex Wang <453102040@qq.com>
2022-05-04 12:36:13 +09:00
Alex Wang
8a5df1302a rename unschedulableQ to unschedulablePods
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2022-03-24 17:38:49 +08:00
Abdullah Gharaibeh
5b20b68bc9 Updated the scheduler framework's PreFilter interface to return a PreFilterResult 2022-03-14 15:36:52 -04:00
Wei Huang
2433b083a9
clear pod's .status.nominatedNodeName when necessary 2021-12-16 10:55:13 -08:00
sanposhiho
9dc0489c1a Fix: move parallelize package to non-internal file 2021-10-21 02:39:23 +09:00
zzchun
3ad158d62c fix typo in framework interface
Signed-off-by: zzchun <zzchun@zju.edu.cn>
2021-09-10 10:14:21 +08:00
Wei Huang
dc079acc2b
sched: retry unschedule pods immediately after a waiting pod's deletion 2021-08-06 19:08:37 -07:00
Kubernetes Prow Robot
33778cb2ba
Merge pull request #103757 from sanposhiho/fix/scheduler/framework/add-doc-on-status-reason
Add: specify that reason is a field to record the reason why failed
2021-08-04 22:12:46 -07:00
sanposhiho
6680368958 Add: specify that reason is a field to record the reason why failed 2021-07-20 20:33:40 +09:00
kerthcet
d1e9da9f8a update comment with EnqueueExtensions
Signed-off-by: kerthcet <kerthcet@gmail.com>

update comment with EnqueueExtensions

Signed-off-by: kerthcet <kerthcet@gmail.com>

update comment with EnqueueExtensions

Signed-off-by: kerthcet <kerthcet@gmail.com>

update comment with EnqueueExtensions

Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-07-16 09:56:26 +08:00
Wei Huang
fb9cafc99b
sched: provide an option for plugin developers to move pods to activeQ 2021-07-07 12:50:12 -07:00
Abdullah Gharaibeh
265ef1741f Move scheduler plugin set and configuration defaulting to component config 2021-06-16 10:15:29 -04:00
Wei Huang
36eaa11d50
cleanup usage of NewPodNominator
- replace NewPodNominator() with NewSafePodNominator()
- rename nominatedPodMap to nominator
2021-06-10 14:01:07 -07:00
Aldo Culquicondor
673352dbd2 Cleanup Framework interface
remove repeated methods
2021-06-01 20:43:32 +00:00
Wei Huang
e7f67b1a63
Surface kube config in scheduler framework handle 2021-03-30 11:54:59 -07:00
drfish
c2ceb21a3e Make parallelism as part of schedulerOptions 2021-03-09 23:25:55 +08:00
Wei Huang
f322019d7a
Store a cluster event to plugin map in SchedulerQueue 2021-03-03 07:20:07 -08:00
drfish
38ad860c2f Unroll PreemptHandle to Handle 2021-02-27 00:44:05 +08:00
drfish
bc2df9de72 Use PodInfo instead of Pod for nominatedPods and QueuedPodInfo 2021-02-22 22:00:23 +08:00
drfish
d15dacb57d Add Equal func for Status struct 2021-02-04 00:32:01 +08:00
Wei Huang
f8a6bdb044
Surface info of failed plugins during PerFilter and Filter 2021-01-28 12:20:42 -08:00
drfish
d4418c1402 Update the PreFilterExtensions interface to use PodInfo 2021-01-19 00:49:52 +08:00
Kubernetes Prow Robot
38585884e3
Merge pull request #97184 from chendave/add_status
Show the details on the failure of preemption
2021-01-15 10:25:51 -08:00
Dave Chen
7315c1f6dd Show the details on the failure of preemption
Since the filter status is missed for the phase of preemption, there
will be no way to tell why the preemption failed for some reasons, and
those reasons could be different with the status from the main scheduling
process (the first failed plugin will hide other failures in the chain).

This change provides verbose information based on the node status generated
during pod preemption, those information helps us to diagnose the issue which
is happened during pod preemption.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-01-15 23:20:17 +08:00
Dave Chen
3c197c55ff Refactor: rewrite Merge method to address readability and efficiency
Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-01-14 10:20:58 +08:00
drfish
070773c399 Remove scheduler plugins package's dependency from core package 2020-12-20 00:18:40 +08:00
tangwz
5f3efa671d scheduler: make Profile an interface. 2020-10-27 09:13:04 +08:00
Ali
09b2e8f638 Move scheduler interface to pkg/scheduler/framework 2020-10-13 13:13:27 +11:00