Commit Graph

216 Commits

Author SHA1 Message Date
Jordan Liggitt
124a5ddf72 Fix int->string casts 2020-07-24 16:23:12 -04:00
Wei Huang
4b26ef2217
Remove DisablePreemption field from SchedulerConfig v1beta1
DisablePreemption field can be removed as it can be deduced from PostFilterPlugins.
2020-07-08 09:58:42 -07:00
Abdullah Gharaibeh
d1ea49bcd9 breakdown PodSchedulingDuration by number of attempts 2020-07-01 17:34:07 -04: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
Kubernetes Prow Robot
83a15867b1
Merge pull request #92049 from Huang-Wei/postfilter-impl-3
[postfilter-impl-3] Register and enable the defaultpreemption plugin
2020-06-22 23:53:54 -07: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
Aldo Culquicondor
eb9711dc1f Add profile label to schedule_attempts_total metric
and e2e_scheduling_duration_seconds

Also adding result label to e2e_scheduling_duration_seconds. Previously, the metric was only updated for successful attempts

Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-06-22 15:19:57 -04:00
Ali Farah
a22e115a0e Split scheduler framework implementation into new runtime package 2020-06-22 00:23:43 +10:00
Wei Huang
196056d7fe
Introduce a defaultpreemption PostFilter plugin
- Add a defaultpreemption PostFilter plugin
- Make g.Preempt() stateless
    - make g.Preempt() stateless
    - make g.getLowerPriorityNominatedPods() stateless
    - make g.processPreemptionWithExtenders() stateless
2020-06-19 09:13:55 -07:00
Wei Huang
36c8ecc98c
Refactor scheduler preempt interface
- replace error with NodeToStatusMap in Preempt() signature
- eliminate podPreemptor interface and expose its functions statelessly
- move logic in scheduler.go#preempt to generic_scheduler.go#Preempt()
2020-06-15 08:42:00 -07:00
tanjunchen
7fe9f3451f Migrate to log calls to klog.ErroS for pkg/scheduler 2020-06-09 18:39:58 -07:00
Wei Huang
69b9ba6012
Introduce PostFilter extension point 2020-06-05 13:23:45 -07:00
Yecheng Fu
1ff09c0934 Remove BindTimeoutSeconds from KubeSchedulerConfiguration 2020-06-03 09:54:06 +08:00
Abdullah Gharaibeh
27caa6e727 merge pod condition update with setting nominated node name in the scheduler 2020-05-28 20:11:16 -04: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
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
Kubernetes Prow Robot
57b79e3fb4
Merge pull request #91037 from Huang-Wei/prefactor-PreemptExtender
Refactor preemption extender logic and move SchedulerExtender interface to framework pkg
2020-05-15 02:48:30 -07:00
Brian Pursley
9eb8e7a6d6 Changed scheduler to use patch when updating pod status to avoid potential conflicts 2020-05-14 15:17:53 -04:00
Kubernetes Prow Robot
5bda0c1b3b
Merge pull request #83726 from cofyc/fix56180
scheduler: Move all volume binding code into VolumeBinding plugin
2020-05-14 10:08:23 -07:00
Wei Huang
e4f878ea3a
cleanup: use string instead of v1.Node as key of nodeToVictims 2020-05-13 13:08:20 -07:00
Yecheng Fu
c14b749521 scheduler/volumebinding: move all volume binding logic into VolumeBinding plugin 2020-05-12 10:13:05 +08:00
Abdullah Gharaibeh
c3be8feee6 count no nodes scheduling failure as unschedulable instead of error 2020-05-11 14:07:52 -04:00
Wei Huang
e283e73994
Remove enableNonPreempting field from scheduler codebase 2020-05-08 19:02:51 -07:00
Abdullah Gharaibeh
a151682887 Split scheduler's PodInfo into two types, PodInfo and PodQueueInfo 2020-04-21 21:45:20 -04:00
skilxn-go
e0adb0ead9 Add compatibility tests for plugin config 2020-03-24 22:17:16 +08:00
Kubernetes Prow Robot
4319ab214f
Merge pull request #89219 from chendave/misspelling
Trival fix: update the description on the pod preemption
2020-03-20 17:58:44 -07:00
Dave Chen
a9d82e7c2a Trival fix: update the description on the pod preemption
`pod` has the field of `NominatedNodeName` which is different
with `NominatedPod`.
2020-03-18 18:23:36 +08:00
Aldo Culquicondor
4d6af4d8d8 Set unschedulable Condition after setting nominated Node
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-03-13 11:02:19 -04:00
Kubernetes Prow Robot
5708511499
Merge pull request #88708 from mikedanese/deleteopts
Migrate clientset metav1.DeleteOpts to pass-by-value
2020-03-05 23:09:23 -08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Mike Dame
1d7006c38d Add Extenders to scheduler v1alpha2 component config 2020-03-05 16:42:15 -05:00
louisgong
c6b94e4606 refactor volume binder 2020-02-29 12:03:39 +08: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
Mateusz
d221d82eaf run permit plugins in the scheduling cycle 2020-02-18 10:04:23 -08:00
Aldo Culquicondor
99bda6fac0 Remove HardPodAffinityWeight from v1alpha2
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-13 11:59:56 -05:00
Mike Danese
25651408ae generated: run refactor 2020-02-08 12:30:21 -05:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
Shingo Omura
c9c4be66d3 Fix pending_pods, schedule_attempts_total was not recorded
because metric initializations are too early. This causes actual metric
instance become no-op.

modification made in thie commit to make sure actual metric instance won't be no-op metrics:

- re-initialize scheduler/metrics.PodSchedule{Successes, Failure, Errors} after metric creation
- scheduler/metrics.Register() should be called before initializing SchedulingQueue,
2020-01-31 17:03:41 +09: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
Haosdent Huang
50d511d4b8 Deprecate scheduler's framework.plugins.RegistryArgs 2020-01-21 23:50:58 +08:00
Aldo Culquicondor
eb265bc7db Remove GetBinder member and replace it with a method.
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-20 14:10:02 -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
danielqsj
85931af1ee remove deprecated metrics of scheduler 2020-01-10 17:03:40 +08:00
sunxiaofei03
6c58cc0ad0 change framework_extension_point_duration_seconds from sampling to always record 2020-01-09 12:23:05 +08:00
Kubernetes Prow Robot
b3c4c90a72
Merge pull request #86673 from ahg-g/ahg1-provider
Define algorithm providers in terms of plugins
2020-01-02 22:25:53 -08:00
Kubernetes Prow Robot
fdfcb00ede
Merge pull request #86586 from xiaoanyunfei/cleanup/deprecate_scheduler_duration_seconds
Deprecate scheduling_duration_seconds Summary metric
2020-01-02 19:15:55 -08:00
Abdullah Gharaibeh
b535ed3b0c Merge scheduler's ConfigProducerRegistry into LegacyRegistry 2020-01-02 16:40:33 -05:00
Kubernetes Prow Robot
26b52e84a4
Merge pull request #86230 from hex108/skip_schedule
Scheduler handles pod annotation updates during scheduling more gracefully
2019-12-31 17:03:40 -08:00
Abdullah Gharaibeh
a6b7b0d95e Define algorithm providers in terms of plugins. 2019-12-31 15:28:09 -05:00