From 618bec889d04b712f6b6fa98fc195918e1fff832 Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Fri, 5 Dec 2025 14:28:22 +0100 Subject: [PATCH] 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. --- test/e2e/storage/testsuites/readwriteoncepod.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/storage/testsuites/readwriteoncepod.go b/test/e2e/storage/testsuites/readwriteoncepod.go index 4da623a267e..53d1821e577 100644 --- a/test/e2e/storage/testsuites/readwriteoncepod.go +++ b/test/e2e/storage/testsuites/readwriteoncepod.go @@ -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)