Commit graph

104 commits

Author SHA1 Message Date
Ania Borowiec
7c59672213
Fix in code and integration test that verifies that when victim pod is stuck in binding, preemptor pod remains waiting in unschedulable queue until deletion of the victim pod is completed 2025-10-03 09:42:50 +00:00
Maciej Skoczeń
d2e6be440c Revert "Merge pull request #133213 from sanposhiho/second-trial-conor"
This reverts commit a2bf45b081, reversing
changes made to 2b2ea27250.
2025-09-24 11:05:16 +00:00
Ania Borowiec
fadb40199f
Move interfaces: Handle and Plugin and related types from kubernetes/kubernetes to staging repo kube-scheduler 2025-09-02 09:42:53 +00:00
Kensei Nakada
f3466f8adc fix: flake integration test 2025-07-28 23:12:58 +09:00
Kensei Nakada
ed74d4cd52 Revert "Revert "fix: handle corner cases in the async preemption""
This reverts commit 006d7620a8.
2025-07-28 20:22:27 +09:00
Maciej Skoczeń
17d733e243 KEP-5229: Send API calls through dispatcher and cache 2025-07-25 15:35:36 +00:00
Kubernetes Prow Robot
8d28109a2b
Merge pull request #133174 from sanposhiho/log-level-preemption
fix: adjust the log level in the preemption
2025-07-24 09:38:57 -07:00
Kensei Nakada
8a2db4da42 fix: adjust the log level in the preemption 2025-07-24 22:45:39 +09:00
Ania Borowiec
aecd37e6fb
Moving Scheduler interfaces to staging: Move PodInfo and NodeInfo interfaces (together with related types) to staging repo, leaving internal implementation in kubernetes/kubernetes/pkg/scheduler 2025-07-24 12:10:58 +00:00
Junhao Zou
1b730abf8d cleanup: use HandleErrorWithXXX instead of logger.Error where errors are intentionally ignored 2025-07-08 09:34:49 +08:00
Ania Borowiec
ee8c265d35
Move Code and Status from pkg/scheduler/framework to k8s.io/kube-scheduler/framework 2025-06-30 10:06:22 +00:00
Kubernetes Prow Robot
e0859f91b7
Merge pull request #131887 from ania-borowiec/extract_cyclestate_interface
Moving Scheduler interfaces to staging: split CycleState into interface and implementation, move interface to staging repo
2025-05-30 04:00:18 -07:00
Ania Borowiec
d75af825fb
Extract interface CycleState and move is to staging repo. CycleState implementation remains in k/k/pkg/scheduler/framework 2025-05-29 16:18:36 +00:00
Natasha Sarkar
92359cdc69 update godoc for and rename observedGeneration helpers 2025-04-24 16:05:01 +00:00
Haosdent Huang
ac3274521b scheduler: remove duplicate nominatedNodeName clearing in preemption
When preemption finds no candidates, it currently makes an explicit API
call to clear the pod's nominatedNodeName in findCandidates(). However,
this is redundant because:

1. When no candidates are found, Preempt() returns a PostFilterResult with
   an empty nominatedNodeName via NewPostFilterResultWithNominatedNode("")
2. This empty nominatedNodeName is propagated through the scheduling
   cycle to handleSchedulingFailure()
3. handleSchedulingFailure() then properly clears the nominatedNodeName
   through updatePod()

Remove the explicit ClearNominatedNodeName call in findCandidates() to
reduce unnecessary API calls while maintaining the same behavior.

This change improves performance by eliminating a duplicate API call
without changing the functional behavior of preemption.
2025-04-16 17:24:08 +08:00
Natasha Sarkar
1889e0cad6 scheduler sets observedGeneration in pod conditions 2025-03-19 15:45:41 +00:00
carlory
aab7a079fa make each scheduler test independent
Signed-off-by: carlory <baofa.fan@daocloud.io>
2025-03-13 14:39:50 +08:00
Kubernetes Prow Robot
facb1a8c55
Merge pull request #129905 from ania-borowiec/129778_replace_equal
Replace reflect.DeepEqual with cmp.Diff in pkg/scheduler tests
2025-02-26 08:24:30 -08:00
Ania Borowiec
4205f04ce3
Replace uses of reflect.DeepEqual with cmp.Diff in pkg/scheduler tests 2025-02-26 09:27:51 +00:00
googs1025
938b5f8262 chore(scheduler): add more log info when no preemption candidates is found in preemption 2025-02-11 13:53:32 +08:00
Kensei Nakada
00f7b95b7b fix: flaky TestPrepareCandidate 2024-11-09 12:07:16 +09:00
Kensei Nakada
e601eb7c5a fix: run activate() only when fail 2024-11-07 14:09:35 +09:00
Kensei Nakada
9b5928f764 fix: refactor TestPrepareCandidate 2024-11-07 14:09:35 +09:00
Kensei Nakada
d4d91d4ace fix: use set methods 2024-11-07 14:09:35 +09:00
Kensei Nakada
a95b8b5085 fix: use Activate always 2024-11-07 14:09:35 +09:00
Kensei Nakada
8be51d3f32 chore: fix based on reviews 2024-11-07 14:09:35 +09:00
Kensei Nakada
3124c5bd56 fix: avoid errors from the race condition detector 2024-11-07 14:09:35 +09:00
Kensei Nakada
c322294883 implement PodActivator to activate when preemption fails 2024-11-07 14:09:35 +09:00
Kensei Nakada
8f2243fe74 chore: tiny wording on the comment 2024-11-07 14:09:35 +09:00
Kensei Nakada
1e2511031e feat: support metrics 2024-11-07 14:09:35 +09:00
Kensei Nakada
98bdbdcf18 fix: refactor TestPrepareCandidate to test async feature too 2024-11-07 14:09:34 +09:00
Kensei Nakada
02eabc7d8e fix: modify newly added preemption test 2024-11-07 14:09:34 +09:00
Kensei Nakada
68aeced18e fix: fixed some tests 2024-11-07 14:09:34 +09:00
Kensei Nakada
e40f3f40bd fix: address reviews 2024-11-07 14:09:34 +09:00
Kensei Nakada
69a8d0ec0b feature(KEP-4832): asynchronous preemption 2024-11-07 14:09:34 +09:00
googs1025
e940b86e86 chore(scheduler): add unit test for framework preemption part 2024-10-23 15:23:11 +08:00
kerthcet
693d4fa156 Refactor the sample log
Signed-off-by: kerthcet <kerthcet@gmail.com>
2024-10-08 09:54:05 +08:00
googs1025
69831b0043 chore(scheduler): refactor import package ordering 2024-09-18 20:31:03 +08:00
Richa Banker
6944af22d1 Initialize scheduler metrics after metrics options are applied 2024-09-13 12:52:32 -07:00
dom4ha
e7827879db Enable testing logger in the remaining scheduler tests. 2024-09-09 21:59:24 +00:00
Kubernetes Prow Robot
e90364f45d
Merge pull request #126465 from googs1025/podEligibleToPreemptOthers_refactor
feat: add ctx param for PodEligibleToPreemptOthers
2024-09-02 12:02:56 +01:00
Kensei Nakada
8519d3399f chore: move the scheduler internal components out of internal dir 2024-08-25 13:10:29 +09:00
Maciej Skoczeń
33815db3c1 Move NominatedPodsForNode to scheduling queue directly 2024-08-21 07:24:52 +00:00
googs1025
fc0fcd0044 feat: add ctx param for PodEligibleToPreemptOthers 2024-08-14 20:06:05 +08:00
Kubernetes Prow Robot
03e8154063
Merge pull request #126644 from Huang-Wei/fix-preemption
Fix a scheduler preemption issue where the victim isn't properly patched, leading to preemption not functioning as expected
2024-08-13 22:12:09 -07:00
Kubernetes Prow Robot
ea1143efc7
Merge pull request #126022 from macsko/new_node_to_status_map_structure
Change structure of NodeToStatus map in scheduler
2024-08-13 21:02:55 -07:00
Wei Huang
f6a11da279
fix a scheduler preemption issue that victim is not patched properly 2024-08-12 15:25:10 -07:00
Maciej Skoczeń
98be7dfc5d Change structure of NodeToStatus map in scheduler 2024-07-25 07:48:35 +00:00
Kubernetes Prow Robot
5d40866fae
Merge pull request #125994 from carlory/fix-job-api
clean up codes after PodDisruptionConditions was promoted to GA
2024-07-17 14:37:09 -07:00
Kubernetes Prow Robot
d879103c28
Merge pull request #125820 from macsko/add_separate_lock_for_pod_nominator_scheduling_queue
Add a separate lock for pod nominator in scheduling queue
2024-07-17 12:06:10 -07:00