Skip to content

Commit 6452791

Browse files
committed
e2e:serial: apply the baseload on the first numa zone
with the old version, the baseload considered in the padding resources of every numazone. that is incorrect because it can create issues on tests that expect their testing pods to be scheduled on one node only while other nodes are unsuitable due to insufficient resources. This update makes sure that only the forst NUMA zone s padded leaving extra space for the baseload. Signed-off-by: Shereen Haj <[email protected]>
1 parent 163d01b commit 6452791

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/e2e/serial/tests/workload_placement_tmpol.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,14 @@ var _ = Describe("[serial][disruptive][scheduler] numaresources workload placeme
154154
klog.InfoS("computed base load", "value", baseload)
155155
paddingResWithBaseload := paddingRes.DeepCopy()
156156
baseload.Apply(paddingResWithBaseload)
157+
var zonePaddingRes corev1.ResourceList
157158
for zIdx, zone := range nrtInfo.Zones {
159+
zonePaddingRes = paddingRes
160+
if zIdx == 0 {
161+
zonePaddingRes = paddingResWithBaseload
162+
}
158163
podName := fmt.Sprintf("padding-%d-%d", nIdx, zIdx)
159-
padPod, err := makePaddingPod(fxt.Namespace.Name, podName, zone, paddingResWithBaseload)
164+
padPod, err := makePaddingPod(fxt.Namespace.Name, podName, zone, zonePaddingRes)
160165
Expect(err).NotTo(HaveOccurred(), "unable to create padding pod %q on zone %q", podName, zone.Name)
161166

162167
padPod, err = pinPodTo(padPod, nodeName, zone.Name)

0 commit comments

Comments
 (0)