Commit Graph

107 Commits

Author SHA1 Message Date
Mike Dame
420c5308bb Add MultiPoint scheduler plugin config field 2021-11-16 14:56:33 -05:00
kerthcet
a6f695581b remove legacy scheduler policy config, as well as associated flags policy-config-file, policy-configmap, policy-configmap-namespace and use-legacy-policy-config
Signed-off-by: kerthcet <kerthcet@gmail.com>
2021-10-08 23:57:49 +08:00
ravisantoshgudimetla
283b176102 [test]: modify integration tests to use v1beta3 2021-10-07 10:58:07 -04:00
Wei Huang
dc079acc2b
sched: retry unschedule pods immediately after a waiting pod's deletion 2021-08-06 19:08:37 -07:00
Wei Huang
fb9cafc99b
sched: provide an option for plugin developers to move pods to activeQ 2021-07-07 12:50:12 -07:00
Mengjiao Liu
da35add03f Rename master to apiserver in test/integration 2021-06-17 15:48:39 +08:00
Abdullah Gharaibeh
265ef1741f Move scheduler plugin set and configuration defaulting to component config 2021-06-16 10:15:29 -04:00
Kubernetes Prow Robot
ed3e0d302f
Merge pull request #100644 from Huang-Wei/sched-fwk-config
Surface kube config in scheduler framework handle
2021-04-12 19:12:49 -07:00
Wei Huang
e7f67b1a63
Surface kube config in scheduler framework handle 2021-03-30 11:54:59 -07:00
caiweidong
850759ec87 Preempting: do not delete the victim if it just exits in WaitingPods 2021-03-23 14:37:36 +08:00
drfish
38ad860c2f Unroll PreemptHandle to Handle 2021-02-27 00:44:05 +08:00
drfish
74315f9c56 Change config.Plugins from pointers to objects 2021-02-10 23:45:59 +08:00
Wei Huang
f8a6bdb044
Surface info of failed plugins during PerFilter and Filter 2021-01-28 12:20:42 -08:00
Wei Huang
af384f27ed
Fix failures in TestBindPlugin and TestPreemptWithPermitPlugin 2020-11-11 12:56:13 -08:00
Wei Huang
185093bd4e
Set 0 sync period in scheduler integration test 2020-11-11 12:56:13 -08:00
Wei Huang
f054765762
Add a function to ensure created nodes are present in scheduler cache 2020-11-03 15:25:44 -08:00
Wei Huang
6e7b20543c
Deflake PostFilter integration test 2020-10-22 13:48:50 -07:00
Ali
09b2e8f638 Move scheduler interface to pkg/scheduler/framework 2020-10-13 13:13:27 +11:00
Kubernetes Prow Robot
c72b30b3b7
Merge pull request #93534 from everpeace/score-in-preemption-handle
scheduler: expose Run[Pre]ScorePlugins functions to PreemptionHandle(through PluginRunner)
2020-10-09 20:34:47 -07:00
Wei Huang
d8def59871
Initialize scheduler's podInformer in sharedInformerFactory
Scheduler's specific podInfomer is now initialized inside the sahredInformerFactory.
2020-09-08 12:57:17 -07:00
Shingo Omura
d0421fa9c3
Fix TestScorePlugin: numScore should be accessed with atomic.LoadInt32 2020-08-04 22:50:13 +09:00
Shingo Omura
ef1fab7642
expose Run[Pre]ScorePlugins functions in PluginRunner interface 2020-08-04 22:50:13 +09:00
Wei Huang
b6b7ab3f73
Deflake scheduler PostBind integration test 2020-08-03 12:30:22 -07:00
Kubernetes Prow Robot
9af4ad5c45
Merge pull request #93550 from Huang-Wei/refix-postfilter-flake
Deflake scheduler PostFilter and Filter integration test
2020-07-30 04:30:31 -07:00
Wei Huang
539272cb73
Deflake scheduler PostFilter and Filter integration test
- Revert "Fix integration test flake on TestFilter and TestPostFilter"
  This reverts commit 94fc18c2dc.
- Relax checking logic on expected Filter/PostFilter counters.
2020-07-29 18:37:47 -07:00
Wei Huang
0e71facefe
Hold Pod in cache until all other cleanup work is completed
- Move "ForgetPod" after "RunReservePluginsUnreserve", so that the cache would hold the pod to
  avoid it's being retried simutaneously until Unreserve is completed.
- Move "assume" ahead of "RunReservePluginsReserve". This is based on the fact that "ForgetPod" is
  the last step of failure path, so "assume" should be reversly treated as the first step. The
  current failure path is like this:
  assume -> reserve -> unreserve -> forgetPod -> recordingFailure
- Make subtests of TestReservePluginUnreserve stateless
2020-07-29 11:27:19 -07:00
Wei Huang
94fc18c2dc
Fix integration test flake on TestFilter and TestPostFilter 2020-07-28 20:51:01 -07:00
Wei Huang
8936f9e4bf
Fix integration test flake on TestScorePlugin 2020-07-27 18:13:38 -07:00
Andrea Nodari
2e1042f959 Use NodeWrapper to directly initialize node with labels
Using NodeWrapper in the integration tests gives more flexibility when
creating nodes. For instance, tests can create nodes with labels or
with a specific sets of resources.

Also, NodeWrapper initialises a node with a capacity of 32 pods, which
can be overridden by the caller. This makes sure that a node is usable
as soon as it is created.
2020-06-30 17:18:15 +02:00
Adhityaa Chandrasekar
1b223b861a scheduler: run Unreserve if Reserve fails
If a reserve plugin's Reserve method returns an error, there could be
previously allocated resources from successfully completed reserve
plugins that must be unallocated by the corresponding Unreserve
operation. Since Unreserve operations are idempotent, this patch runs
the Unreserve operation of ALL reserve plugins when a Reserve operation
fails.
2020-06-26 20:41:33 +00:00
Adhityaa Chandrasekar
ec83143342 scheduler: merge Reserve and Unreserve plugins
Previously, separate interfaces were defined for Reserve and Unreserve
plugins. However, in nearly all cases, a plugin that allocates a
resource using Reserve will likely want to register itself for Unreserve
as well in order to free the allocated resource at the end of a failed
scheduling/binding cycle. Having separate plugins for Reserve and
Unreserve also adds unnecessary config toil. To that end, this patch
aims to merge the two plugins into a single interface called a
ReservePlugin that requires implementing both the Reserve and Unreserve
methods.
2020-06-24 21:10:35 +00:00
Wei Huang
d99cc01646
Register and enable defaultpreemption plugin
- Enable defaultpreemption as a PostFilter plugin
- Remote legacy hard-coded preemption logic
2020-06-22 17:22:27 -07:00
Ali Farah
a22e115a0e Split scheduler framework implementation into new runtime package 2020-06-22 00:23:43 +10:00
Amim Knabben
fcb41d3d2c Integration framework table-tests standarization 2020-06-08 14:03:54 -04:00
Wei Huang
69b9ba6012
Introduce PostFilter extension point 2020-06-05 13:23:45 -07:00
Kubernetes Prow Robot
6cf4ab3c8c
Merge pull request #91071 from alculquicondor/integration_new_node
Add test case for a pod becoming schedulable when a node is added
2020-05-19 15:22:33 -07: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
Aldo Culquicondor
35b9ab1227 Remove unnecessary clientset arg from initPausePod
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-05-14 11:47:12 -04:00
Jan Chaloupka
65e9826f79 integration: start informer and scheduler outside of InitTestScheduler
In case two or more controllers share the informers created through InitTestScheduler,
it's not safe to start the informers until all controllers set their informer
indexers. Otherwise, some controller might fail to register their indexers
in time. Thus, it's responsibility of each consumer to make sure all informers
are started after all controllers had time to get initiliazed.
2020-05-13 18:19:43 +02:00
Aldo Culquicondor
ce05382b58 Use RawExtension and Object for external and internal scheduling plugin args, respectively
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-04-14 13:44:42 -04:00
Abdullah Gharaibeh
a5d8172715 move nodeinfo type to framework pkg 2020-04-07 10:25:24 -04:00
Abdullah Gharaibeh
ed3fe054df move scheduler nodeinfo to pkg/scheduler/types 2020-03-31 21:02:09 -04:00
Jordan Liggitt
d8abacba40 client-go: update expansions callers 2020-03-06 16:50:41 -05:00
Mateusz Litwin
b93e3d18e9 fix scheduler.TestCoSchedulinngWithPermitPlugin and test scheduler.PermitPlugin
After moving Permit() to the scheduling cycle test PermitPlugin should
no longer wait inside Permit() for another pod to enter Permit() and become waiting pod.
In the past this was a way to make test work regardless of order in
which pods enter Permit(), but now only one Permit() can be executed at
any given moment and waiting for another pod to enter Permit() inside
Permit() leads to timeouts.

In this change waitAndRejectPermit and waitAndAllowPermit flags make first
pod to enter Permit() a waiting pod and second pod to enter Permit()
either rejecting or allowing pod.

Mentioned in #88469
2020-03-04 08:45:36 -08:00
fengzixu
b67a033de2 Refactor: move generic functions of integration test to util directory 2020-02-29 14:56:39 +09: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
8fd0d8028f Remove FilteredNodesStatuses argument from PreScore interface 2020-02-15 13:53:04 +08:00
skilxn-go
f5b7e3cca3 Rename PostFilter plugin to PreScore 2020-02-12 23:25:08 +08:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Aldo Culquicondor
4a5ab84dcc Move default binding to a plugin
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-22 14:13:33 -05:00