Commit Graph

1868 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
19caf38665
Merge pull request #93425 from liggitt/string-cast
Fix int->string casts
2020-07-24 23:12:16 -07:00
Jordan Liggitt
124a5ddf72 Fix int->string casts 2020-07-24 16:23:12 -04:00
Kubernetes Prow Robot
5a50c5c95f
Merge pull request #93355 from Nordix/sched-fix-mael
Fix scheduler issue with nodetree additions
2020-07-24 12:10:22 -07: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
Kubernetes Prow Robot
e884b40e73
Merge pull request #93371 from ahg-g/ahg-volume
Optimize VolumeRestriction plugin
2020-07-23 16:10:23 -07:00
Abdullah Gharaibeh
5e81a2de98 Optimize VolumeRestrictions scheduler plugin 2020-07-22 23:00:01 -04:00
Abdullah Gharaibeh
44d9497133 Increase the size of the buckets for PodSchedulingDuration scheduler metric. 2020-07-22 16:42:01 -04:00
Kubernetes Prow Robot
275eabdf72
Merge pull request #93259 from jpbetz/revert-88936
Revert nested trace PR#88936
2020-07-20 19:51:47 -07:00
Joe Betz
02cf58102a Revert nested trace PR#88936 2020-07-20 09:55:05 -07:00
Abdullah Gharaibeh
6f9794d5e9 Rename pod_preemption_metrics to preemption_metrics. Since this metric's type was changed from Gauge to Histogram, renaming it should make it easier to providers to migrate 2020-07-20 11:44:10 -04:00
Kubernetes Prow Robot
240a72b5c0
Merge pull request #88936 from jpbetz/http-trace
Add nested tracing and endpoint filter tracing to apiserver
2020-07-13 11:27:21 -07:00
Wei Huang
4e8ccf0187
Refactor and expose common preemption functions 2020-07-11 23:17:21 -07:00
Kubernetes Prow Robot
d06ff65943
Merge pull request #92876 from Huang-Wei/pdbLister
Add pdbLister as a member field of struct DefaultPreemption
2020-07-11 20:57:42 -07:00
Kubernetes Prow Robot
016c2f64de
Merge pull request #92840 from adtac/listers
selectorspread: access listers in plugin instantiation
2020-07-11 20:56:23 -07:00
Joe Betz
b12ac0abc6 Enable nested tracing, add request filter chain tracing incl. authn/authz tracing 2020-07-11 06:42:00 -07:00
Kubernetes Prow Robot
36b4c2942b
Merge pull request #92815 from Huang-Wei/bypass-prefilter-svcaffinity
Bypass PreFilter in ServiceAfffinity if AffinityLabels arg is not present
2020-07-10 15:43:11 -07:00
Kubernetes Prow Robot
fbc9cf0894
Merge pull request #92797 from ahg-g/ahg-prefilter
Return a FitError when PreFilter fails with unschedulable status
2020-07-10 15:42:31 -07:00
Kubernetes Prow Robot
0cb7e320a5
Merge pull request #92784 from pohly/generic-ephemeral-inline-volumes
generic ephemeral inline volumes
2020-07-10 15:41:46 -07:00
Patrick Ohly
ff3e5e06a7 GenericEphemeralVolume: initial implementation
The implementation consists of
- identifying all places where VolumeSource.PersistentVolumeClaim has
  a special meaning and then ensuring that the same code path is taken
  for an ephemeral volume, with the ownership check
- adding a controller that produces the PVCs for each embedded
  VolumeSource.EphemeralVolume
- relaxing the PVC protection controller such that it removes
  the finalizer already before the pod is deleted (only
  if the GenericEphemeralVolume feature is enabled): this is
  needed to break a cycle where foreground deletion of the pod
  blocks on removing the PVC, which waits for deletion of the pod

The controller was derived from the endpointslices controller.
2020-07-09 23:29:24 +02:00
Kubernetes Prow Robot
3a5e7ea986
Merge pull request #92752 from chendave/skip_preemption
Cut off the cost to run filter plugins when no victim pods are found
2020-07-09 09:10:10 -07:00
Kubernetes Prow Robot
70e09f2c24
Merge pull request #88842 from angao/fit-arg
add args for NodeResourcesFit plugin
2020-07-09 05:04:10 -07:00
Kubernetes Prow Robot
55d77ade67
Merge pull request #92489 from alculquicondor/sig-storage-ownership
Add SIG storage owner aliases
2020-07-09 00:05:20 -07:00
Kubernetes Prow Robot
94a08e159a
Merge pull request #92387 from pohly/csi-storage-capacity
CSI storage capacity check
2020-07-09 00:04:59 -07:00
Kubernetes Prow Robot
c2e6e147be
Merge pull request #92160 from YuikoTakada/add_deprecated_description_scheduling_duration_seconds
Add Deprecated description to metrics scheduling_duration_seconds
2020-07-09 00:04:48 -07:00
Wei Huang
d65a97848e
codegen 2020-07-08 09:58:42 -07: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
Wei Huang
9d377eb655
Add pdbLister as a member field of struct DefaultPreemption 2020-07-07 12:25:53 -07:00
Adhityaa Chandrasekar
832a53acdb selectorspread: access listers in plugin instantiation 2020-07-07 14:45:28 +00:00
Aldo Culquicondor
27ec356d76 Add SIG storage owner aliases
And give ownership to pkg/scheduler/framework/plugins/volumebinding

Signed-off-by: Aldo Culquicondor <acondor@google.com>
Change-Id: I4bd89b1745a2be0e458601056ab905bdd6692195
2020-07-07 10:26:16 -04:00
Dave Chen
028af0970f Cut off the cost to run filter plugins when no victim pods are found
If no potential victims could be found, there is no need to evaluate the node
again, since its state didn't change.

It's safe to return and thus prevent scheduling from running the filter plugins
again.

NOTE:
A node that is filtered out by filter plugins could pass the filter plugins if
there is a change on that node, i.e. pods termination on that node.

Previously, this could be either caught by the normal `schedule` or `preempt` (pods
are terminated when the preemption logic tries to find the nodes and re-evaluate
the filter plugins.)

Actually, this shouldn't be taken care by the preemption, consider the routine
of `schedule` is always running when the interval is "zero", let `schedule`
take care of it will release `preempt` from something irrelevant with the `preemption`.

Due to above reason, couple of testcase as well as the logic of checking the existence
of victim pods are removed as it will never happen after the change.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2020-07-07 09:55:34 +08:00
Abdullah Gharaibeh
c98dee4945 Return a FitError when PreFilter fails with unschedulable status 2020-07-06 15:02:07 -04:00
Patrick Ohly
0efbbe8555 CSIStorageCapacity: check for sufficient storage in volume binder
This uses the information provided by a CSI driver deployment for
checking whether a node has access to enough storage to create the
currently unbound volumes, if the CSI driver opts into that checking
with CSIDriver.Spec.VolumeCapacity != false.

This resolves a TODO from commit 95b530366a.
2020-07-06 19:20:10 +02:00
Wei Huang
07583bf95b
Bypass PreFilter in ServiceAfffinity if AffinityLabels arg is not present 2020-07-05 23:37:04 -07:00
Kubernetes Prow Robot
86096addb1
Merge pull request #92689 from chendave/fix_testcase
Fix the nits found in the testcases of `PodTopologySpread`
2020-07-03 20:31:26 -07:00
Kubernetes Prow Robot
b6cbe1b8de
Merge pull request #92662 from chelseychen/event-api-fallback
Switch event recorder to use events.k8s.io/v1
2020-07-03 05:03:15 -07:00
Kubernetes Prow Robot
19883b50f8
Merge pull request #92604 from soulxu/fix_preemption_with_nominated_node
The Pod is eligible to preempt when previous nominanted node is UnschedulableAndUnresolvable
2020-07-03 05:03:01 -07:00
Dave Chen
3e65fe4378 Change the exception to avoid the cost of preemption
node's labels doesn't contain the required topologyKeys in `Constraints`
cannot be resolved by preempting the pods on that pods.

One use case that could easily reproduce the issue is,
- set `alwaysCheckAllPredicates` to true.
- one node contains all the required topologyKeys but is failed in predicates
  such as 'taint'.
- another node doesn't hold all the required topologyKeys, and thus return `Unschedulable`
  status code.
- scheduler will try to preempt the pods on the above node with lower priorities.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2020-07-03 10:17:31 +08:00
He Jie Xu
b3741f344e The Pod is eligible to preempt when previous nominanted node is UnschedulableAndUnresolvable
If the Pod's previous nominated node is UnschedulableAndUnresolvable from previous
filtering, it should be considered for preemption again.
2020-07-03 08:57:45 +08:00
Chelsey Chen
ade2422883 Switch event recorder to use events.k8s.io/v1 2020-07-02 14:50:41 -04:00
Kubernetes Prow Robot
15a9430ae5
Merge pull request #92650 from ahg-g/ahg-attempts
breakdown PodSchedulingDuration by number of attempts
2020-07-02 04:17:15 -07:00
Dave Chen
41fd19760e Fix the nits found in the testcases of PodTopologySpread
Signed-off-by: Dave Chen <dave.chen@arm.com>
2020-07-02 12:37:46 +08:00
Yuiko Mori
97bca0ec59 Add Deprecated description to metrics scheduling_duration_seconds 2020-07-02 00:14:49 +00:00
Abdullah Gharaibeh
d1ea49bcd9 breakdown PodSchedulingDuration by number of attempts 2020-07-01 17:34:07 -04:00
Wei Huang
7362fccdd7
Polish unit tests of defaultpreemptio plugin 2020-06-30 14:05:48 -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
Kubernetes Prow Robot
1c658d2ae8
Merge pull request #92568 from satishbellapu/master
Typo of PercentageOfNodesToScore
2020-06-30 00:03:25 -07:00
Kubernetes Prow Robot
784b0738b5
Merge pull request #92578 from zhouya0/fix_preemt_comment
Fix scheduler preemt function comment
2020-06-29 18:35:27 -07:00
Kubernetes Prow Robot
281023790f
Merge pull request #92501 from rakeshreddybandi/rename-plugin
Rename DefaultPodTopologySpread plugin #91994
2020-06-29 18:34:58 -07:00
zhouya0
59f9a7d81e Fix preemt function comment 2020-06-28 18:29:55 +08:00
Kubernetes Prow Robot
4fc5c1eda2
Merge pull request #92391 from adtac/adtac/reserve-failure
scheduler: run Unreserve if Reserve fails
2020-06-27 16:04:14 -07:00