Skip to content

Commit 163d01b

Browse files
committed
e2e:serial: fix baseload addition to pod resources
The old method used to apply the baseload on the same `paddingRes` over and over again. This is not causing issues as long as there are no more than one node to be padded, which is almost always the case on the MNO used in the weekly CI. However this is still incorrect, so this commit fixes it so that the padding resources with the baseload are cleanly computed for each node. Signed-off-by: Shereen Haj <[email protected]>
1 parent 7ab1f5d commit 163d01b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/e2e/serial/tests/workload_placement_tmpol.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,11 @@ var _ = Describe("[serial][disruptive][scheduler] numaresources workload placeme
152152
Expect(err).ToNot(HaveOccurred(), "missing node load info for %q", nodeName)
153153
// TODO: multi-line value in structured log
154154
klog.InfoS("computed base load", "value", baseload)
155-
baseload.Apply(paddingRes)
155+
paddingResWithBaseload := paddingRes.DeepCopy()
156+
baseload.Apply(paddingResWithBaseload)
156157
for zIdx, zone := range nrtInfo.Zones {
157158
podName := fmt.Sprintf("padding-%d-%d", nIdx, zIdx)
158-
padPod, err := makePaddingPod(fxt.Namespace.Name, podName, zone, paddingRes)
159+
padPod, err := makePaddingPod(fxt.Namespace.Name, podName, zone, paddingResWithBaseload)
159160
Expect(err).NotTo(HaveOccurred(), "unable to create padding pod %q on zone %q", podName, zone.Name)
160161

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

0 commit comments

Comments
 (0)