Commit Graph

16 Commits

Author SHA1 Message Date
Michal Wozniak
c803892bd8 Enable the feature into beta 2022-11-09 09:02:40 +01:00
Michal Wozniak
fea883687f SSA to add pod failure conditions - ready for review 2022-10-27 18:21:33 +02:00
tangwz
480ae2a7c1 Do pod preemption in parallel. 2022-10-19 09:28:53 +08:00
Kensei Nakada
08bd123b95 feature(scheduler): add "goroutines" metric and deprecate the "scheduler_goroutines" metric 2022-09-01 13:21:21 +00:00
Wei Huang
a07e27082a
Fix potential context leaking in scheduler 2022-08-11 22:22:40 -07:00
amewayne
1457ad548c fix a memory leak problem when calling DryRunPreemption 2022-08-10 12:02:27 +08:00
Michal Wozniak
04fcbd721c Introduction of a pod condition type indicating disruption. Its reason field indicates the reason:
- PreemptionByKubeScheduler (Pod preempted by kube-scheduler)
- DeletionByTaintManager (Pod deleted by taint manager due to NoExecute taint)
- EvictionByEvictionAPI (Pod evicted by Eviction API)
- DeletionByPodGC (an orphaned Pod deleted by PodGC)PreemptedByScheduler (Pod preempted by kube-scheduler)
2022-08-02 11:12:16 +02:00
Davanum Srinivas
a9593d634c
Generate and format files
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-07-26 13:14:05 -04:00
Wei Huang
4f77732540
merge MakeDefaultErrorFunc into handleSchedulingFailure 2022-07-12 12:11:16 -07:00
kerthcet
67b0ce87fe Using inherited context in utils
This PR focus on utils in scheduler. When to patch pod status or delete pod,
it is better to use an inherited context.
Although this do not take a big effect in preventing goroutine leak, but it is a best practice

Signed-off-by: kerthcet <kerthcet@gmail.com>
2022-05-25 10:14:40 +08:00
Alex Wang
52275fc831 add preemption info in scheduling failed event 2022-02-01 00:37:16 +08:00
Patrick Ohly
9eaa2dc554 avoid klog Info calls without verbosity
In the following code pattern, the log message will get logged with v=0 in JSON
output although conceptually it has a higher verbosity:

   if klog.V(5).Enabled() {
       klog.Info("hello world")
   }

Having the actual verbosity in the JSON output is relevant, for example for
filtering out only the important info messages. The solution is to use
klog.V(5).Info or something similar.

Whether the outer if is necessary at all depends on how complex the parameters
are. The return value of klog.V can be captured in a variable and be used
multiple times to avoid the overhead for that function call and to avoid
repeating the verbosity level.
2022-01-12 07:48:36 +01:00
Wei Huang
2433b083a9
clear pod's .status.nominatedNodeName when necessary 2021-12-16 10:55:13 -08:00
Shivanshu Raj Shrivastava
f4aad52885
migrated preemption.go, stateful.go, resource_allocation.go to structured logging 2021-11-08 22:52:47 +05:30
Dave Chen
468a6005a6 Fix the return status when a plugin internal status is found
Currently, the status code returned is `Unschedulable` when an internal error
found, the `Unschedulable` status is built from a `FitError` which means no
fit nodes found without a internal error.

Instead of build an Unschedulable status from the `FitError`, return the
Error status directly.

Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-10-28 09:43:31 +08:00
Dave Chen
3af26bae2c Refactor defaultpreemption for out-of-tree plugins
Signed-off-by: Dave Chen <dave.chen@arm.com>
2021-08-11 09:29:17 +08:00