Claudiu Belu
9f95b7b18c
unittests: Fixes unit tests for Windows (part 3)
...
Currently, there are some unit tests that are failing on Windows due to
various reasons:
- paths not properly joined (filepath.Join should be used).
- Proxy Mode IPVS not supported on Windows.
- DeadlineExceeded can occur when trying to read data from an UDP
socket. This can be used to detect whether the port was closed or not.
- In Windows, with long file name support enabled, file names can have
up to 32,767 characters. In this case, the error
windows.ERROR_FILENAME_EXCED_RANGE will be encountered instead.
- files not closed, which means that they cannot be removed / renamed.
- time.Now() is not as precise on Windows, which means that 2
consecutive calls may return the same timestamp.
- path.Base() will return the same path. filepath.Base() should be used
instead.
- path.Join() will always join the paths with a / instead of the OS
specific separator. filepath.Join() should be used instead.
2022-10-21 19:25:48 +03:00
kidddddddddddddddddddddd
b901ef0f68
changes in test files
2022-10-12 22:11:04 +08:00
Wei Huang
7df9bfcfef
Expose a pending pods summary in scheudler's dummper output
2022-08-05 22:02:38 -07:00
akankshakumari393
5d53407cc2
[Minor] Fix typos in the variable name in scheduling_queue_test.go
2022-07-23 19:27:15 +05:30
Yibo Zhuang
fd08d47d8b
cleanup: move scheduler tests to use PodWrapper
...
Move to use testing PodWrapper where applicable to
reduce duplicating pod creation code and shorten
number of lines.
Adding additional wrapper functions in PodWrapper
to ensure it covers all pod spec under tests.
Signed-off-by: Yibo Zhuang <yibzhuang@gmail.com>
2022-05-05 10:48:26 -07:00
Yuan Chen
d1a2f699a7
Add PodWrapper functions for scheduler testing
...
Fix a typo in comment
2022-04-19 20:30:04 -07:00
Aldo Culquicondor
429457e184
Fix: abort nominating a pod that was already scheduled to a node
...
Change-Id: Iacb8530769e7a93e3bc8384cf51d7a8fd9a192e1
2022-04-04 10:52:59 -04:00
Kubernetes Prow Robot
317f8afe92
Merge pull request #108976 from ArangoGutierrez/devel/typos/scheduler
...
Fix typos under pkg/scheduler
2022-03-25 15:35:09 -07:00
Carlos Eduardo Arango Gutierrez
d2f67b42b7
Fix typos under pkg/scheduler
...
./scheduler/framework/plugins/noderesources/most_allocated_test.go:227: negtive ==> negative
./scheduler/framework/plugins/noderesources/most_allocated_test.go:228: negtive ==> negative
./scheduler/framework/plugins/volumebinding/binder.go:402: everytime ==> every time
./scheduler/framework/preemption/preemption_test.go:67: staus ==> status
./scheduler/framework/runtime/framework_test.go:1252: followings ==> following
./scheduler/internal/cache/cache_test.go:932: datas ==> data
./scheduler/internal/cache/node_tree_test.go:471: unknow ==> unknown
./scheduler/internal/queue/scheduling_queue_test.go:442: actived ==> activated
./scheduler/internal/queue/scheduling_queue_test.go:2209: covert ==> convert
Signed-off-by: Carlos Eduardo Arango Gutierrez <carangog@redhat.com>
2022-03-24 08:01:25 -04:00
Alex Wang
8a5df1302a
rename unschedulableQ to unschedulablePods
...
Signed-off-by: Alex Wang <wangqingcan1990@gmail.com>
2022-03-24 17:38:49 +08:00
Daniel Smith
2831f9a343
remove unneeded references
2022-03-23 15:26:38 +00:00
Alex Wang
87549203e9
add deprecated flag for flush pods to activeq interval
2022-02-16 11:05:52 +08:00
Alex Wang
ca50e459b0
check activeQ len before pop
2022-02-08 18:05:05 +08:00
Wei Huang
939e98135c
sched: fix goroutine leak in unit tests
2022-01-22 22:53:11 -08:00
Kubernetes Prow Robot
b960f7a0e0
Merge pull request #106203 from 2014BDuck/test-priority-queue-activate
...
add test cases for scheduler/PriorityQueue.Activate
2022-01-05 02:22:32 -08:00
Jiekun
30e06ecf1e
#106203 Added test cases for PriorityQueue Activate
2021-12-18 22:12:46 +08:00
Wei Huang
2433b083a9
clear pod's .status.nominatedNodeName when necessary
2021-12-16 10:55:13 -08:00
Abdullah Gharaibeh
a241c45dc7
move a number of scheduler metrics to STABLE
2021-11-10 12:51:17 -05:00
Reza Karimi
bb15f02039
issue#105861: making scheduler metrics stable
2021-11-03 15:34:50 +00:00
Kubernetes Prow Robot
6c45f6e32b
Merge pull request #105125 from BinacsLee/binacs-fix-scheQ-caculate-overflow
...
Scheduler: fix calculateBackoffDuration overflow in extreme data cases
2021-09-20 21:26:23 -07:00
BinacsLee
f277864aa5
Scheduler queue: fix calculateBackoffDuration overflow in extreme data cases
2021-09-21 09:42:52 +08:00
wojtekt
d9b08c611d
Migrate to k8s.io/utils/clock
2021-09-17 15:19:08 +02:00
boenn
1980b18c45
Solved the test problem and added update comment
2021-07-16 10:57:23 +08:00
Yecheng Fu
83ee392ed4
implement EnqueueExtensions interface in volumebinding
2021-07-03 08:25:06 +08:00
Wei Huang
36eaa11d50
cleanup usage of NewPodNominator
...
- replace NewPodNominator() with NewSafePodNominator()
- rename nominatedPodMap to nominator
2021-06-10 14:01:07 -07:00
Wei Huang
8e85a2b0c2
sched: fix a bug that a preemptor pod exists as a phantom
...
- SafePodNominator to resolve racing issue when dealing with nominated pod
2021-06-05 11:07:29 -07:00
Alexander Minbaev
8325c6b0da
got rid of ClusterEventReg with generating ClusterEvent objects on the fly
2021-04-14 13:38:46 -05:00
卢振兴10069964
5ddb1be59a
code cleanup for pkg/scheduler
2021-04-13 08:16:16 +08:00
Kubernetes Prow Robot
7cd73076a2
Merge pull request #100049 from Huang-Wei/basic-check-prior-to-enq
...
sched: support PreEnqueueChecks prior to moving Pods
2021-04-08 17:11:04 -07:00
Wei Huang
6384f397b4
sched: support PreEnqueueChecks prior to moving Pods
2021-03-11 12:31:50 -08:00
renyuquan
53ee08a40e
fix scheduler queue update logic
2021-03-10 15:48:18 +08:00
Abdullah Gharaibeh
c7fef196b6
Implements pod affinity NamespaceSelector feature
2021-03-04 07:30:24 -05:00
Wei Huang
6fdb1a8439
sched: add a benchmark test for MoveAllToActiveOrBackoffQueue
2021-03-03 07:20:08 -08:00
Wei Huang
f322019d7a
Store a cluster event to plugin map in SchedulerQueue
2021-03-03 07:20:07 -08:00
drfish
bc2df9de72
Use PodInfo instead of Pod for nominatedPods and QueuedPodInfo
2021-02-22 22:00:23 +08:00
tanjing2020
d0eecbd0a9
migrate scheduling_queue.go to structured logging
2021-02-18 09:56:31 +08:00
Ali
09b2e8f638
Move scheduler interface to pkg/scheduler/framework
2020-10-13 13:13:27 +11:00
Dave Chen
4b2c054e59
Enhancement on the testcase to cover more possibilities
...
This change enriches the testcase of `TestPriorityQueue_MoveAllToActiveOrBackoffQueue`
to cover the case that pods in the unschedulableQ could be moved to activeQ after the
backing off.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2020-09-03 14:04:03 +08:00
Gaurav Singh
00f28747b3
TestSchedulingQueue_Close: Remove struct tests and the corresponding for loop
...
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
TestSchedulingQueue_Close: Remove for loop
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
remove the tests slice
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Remove struct
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Remove t.Run()
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Add function name
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Remove nested function
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
Replace expectedErr with wantErr
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
2020-06-11 11:19:14 -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
Wei Huang
8c2a540cdc
Refine schedulerQueue test to avoid unneeded locks
...
- revert PR 88331
- remove createAndRunPriorityQueue()
- PriorityQueue is created and not run by default
- flushXYZ() is called on demand by manipulating FakeClock and Step()
2020-05-05 00:11:04 -07:00
Abdullah Gharaibeh
a151682887
Split scheduler's PodInfo into two types, PodInfo and PodQueueInfo
2020-04-21 21:45:20 -04: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
74718adf10
fix data races for other usage of Q
2020-02-20 00:50:13 +08:00
skilxn-go
7e33feec57
fix data races in scheduler unit tests
2020-02-19 22:27:40 +08:00
Kubernetes Prow Robot
bde718d100
Merge pull request #87948 from notpad/feature/pod_backoff
...
Remove PodBackoffMap
2020-02-14 13:11:28 -08:00
notpad
a4e4a99435
Remove PodBackoffMap
2020-02-14 08:31:07 +08:00
Aldo Culquicondor
60c972098c
Add defaults to pod affinity args
...
And remove pod affinity parameter from algorithm provider registry
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-02-03 14:58:28 -05:00
Aldo Culquicondor
9d2786c383
Fix back off when scheduling cycle is delayed
...
Signed-off-by: Aldo Culquicondor <acondor@google.com>
2020-01-29 13:15:13 -05:00
Haosdent Huang
50d511d4b8
Deprecate scheduler's framework.plugins.RegistryArgs
2020-01-21 23:50:58 +08:00