Skip to content

Commit 21943c5

Browse files
committed
e2e: update topology-aware test for burstable placement.
Update existing burstable placement test for altered behavior. Add new test to verify CPU limit based burstable placement of limited and unlimited burstable containers. Signed-off-by: Krisztian Litkey <[email protected]>
1 parent 827e7d5 commit 21943c5

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

test/e2e/files/burstable.yaml.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ spec:
3131
cpu: ${CPUREQ}
3232
memory: ${MEMREQ}
3333
limits:
34+
$( ( [ -n "$CPULIM" ] && [ "$CPULIM" != "0" ] ) && echo "
3435
cpu: ${CPULIM}
36+
")
3537
$( ( [ -n "$MEMLIM" ] && [ "$MEMLIM" != "0" ] ) && echo "
3638
memory: ${MEMLIM}
3739
")

test/e2e/policies.test-suite/topology-aware/n4c16/test00-basic-placement/code.var.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ vm-command "kubectl delete pods --all --now"
5454

5555
# pod2: Test that 4 burstable containers not eligible for isolated/exclusive CPU allocation
5656
# gets evenly spread over NUMA nodes.
57-
CONTCOUNT=4 CPUREQ=2 CPULIM=4 create burstable
57+
CONTCOUNT=4 CPUREQ=2 CPULIM=2002m create burstable
5858
report allowed
5959
verify \
6060
'disjoint_sets(cpus["pod2c0"], cpus["pod2c1"], cpus["pod2c2"], cpus["pod2c3"])' \

test/e2e/policies.test-suite/topology-aware/n4c16/test14-burstable/code.var.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,27 @@ verify \
2424
'len(nodes["pod2c0"]) == 2' \
2525
'len(nodes["pod3c0"]) == 4'
2626

27+
vm-command "kubectl delete pods --all --now"
28+
29+
helm-terminate
30+
helm_config=$(COLOCATE_PODS=false instantiate helm-config.yaml) helm-launch topology-aware
31+
32+
# Limited burstable containers get assigned to the lowest pool where
33+
# there is enough free capacity for their limit. In this case, a socket.
34+
CONTCOUNT=2 CPUREQ=2 CPULIM=5 MEMREQ=100M create burstable
35+
report allowed
36+
verify \
37+
'nodes["pod4c0"] == { "node2" ,"node3" }' \
38+
'nodes["pod4c1"] == { "node0", "node1" }'
39+
40+
# Unlimited burstable containers get allocated to the root pool unless
41+
# affinity dictates otherwise.
42+
CONTCOUNT=2 CPUREQ=2 CPULIM=0 MEMREQ=100M create burstable
43+
report allowed
44+
verify \
45+
'nodes["pod5c0"] == { "node0", "node1", "node2", "node3" }' \
46+
'nodes["pod5c1"] == { "node0", "node1", "node2", "node3" }'
47+
48+
vm-command "kubectl delete pods --all --now"
49+
2750
helm-terminate

0 commit comments

Comments
 (0)