mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-22 09:40:07 +00:00
Fix the preemption test
It needs to run as [Serial], so it accidentally does not evict other Pods. Consider this scenario on a busy clusters, with all nodes at their attachment limit. 1. pod1 of the preemption test runs, pod2 is created. 2. The scheduler evicts pod1. That frees the RWOP volume and it also frees the last attachment slot on the node. 3. Some other e2e tests creates a Pod and scheduler puts it on a node, taking the last attachment slot. 4. The scheduler schedules pod2 agaian and it sees there is no node with a free attachment slot -> new round of eviction, now evicting a pod of unrelated e2e tests. The unrelated test will fail.
This commit is contained in:
@@ -130,7 +130,7 @@ func (t *readWriteOncePodTestSuite) DefineTests(driver storageframework.TestDriv
|
||||
ginkgo.DeferCleanup(cleanup)
|
||||
})
|
||||
|
||||
ginkgo.It("should preempt lower priority pods using ReadWriteOncePod volumes", func(ctx context.Context) {
|
||||
ginkgo.It("should preempt lower priority pods using ReadWriteOncePod volumes", ginkgo.Serial, func(ctx context.Context) {
|
||||
// Create the ReadWriteOncePod PVC.
|
||||
accessModes := []v1.PersistentVolumeAccessMode{v1.ReadWriteOncePod}
|
||||
l.volume = storageframework.CreateVolumeResourceWithAccessModes(ctx, driver, l.config, pattern, t.GetTestSuiteInfo().SupportedSizeRange, accessModes, nil)
|
||||
|
||||
Reference in New Issue
Block a user