Commit 4aba46e1 authored by Klaus Aehlig's avatar Klaus Aehlig

Add a test for global N+1 redundancy with plain instances

In this example, there is one big instance (.75 of a node) and
otherwise small instances (.25 of a node). One node is only
used to 25% whereas the rest to 75%. Nevertheless, the mostly
empty node cannot be used for allocating a new instance, as
that would prevent the big instance from being evacuated should
its node fail. Note that the mostly empty node would be the most
balanced allocation.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent afb8014c
......@@ -1739,6 +1739,7 @@ TEST_FILES = \
test/data/htools/hsqueeze-mixed-instances.data \
test/data/htools/hsqueeze-overutilized.data \
test/data/htools/hsqueeze-underutilized.data \
test/data/htools/plain-n1-restriction.data \
test/data/htools/shared-n1-failure.data \
test/data/htools/shared-n1-restriction.data \
test/data/htools/unique-reboot-order.data \
......
group-01|fake-uuid-01|preferred||
nodeA|4096|0|3096|409600|309600|4|M|fake-uuid-01|4
nodeB|4096|0|1096|409600|109600|4|N|fake-uuid-01|4
nodeC|4096|0|1096|409600|109600|4|N|fake-uuid-01|4
nodeD|4096|0|1096|409600|109600|4|N|fake-uuid-01|4
instA1|1000|100000|1|running|Y|nodeA||plain||1
instB1|1000|100000|1|running|Y|nodeB||plain||1
instB2|1000|100000|1|running|Y|nodeB||plain||1
instB3|1000|100000|1|running|Y|nodeB||plain||1
instC1|3000|300000|3|running|Y|nodeC||plain||3
instD1|1000|100000|1|running|Y|nodeD||plain||1
instD2|1000|100000|1|running|Y|nodeD||plain||1
instD3|1000|100000|1|running|Y|nodeD||plain||1
|128,1,1024,1,1,1|128,1,1024,1,1,1;32768,8,1048576,16,8,12|diskless,file,sharedfile,plain,blockdev,drbd,rbd,ext|4.0|32.0
group-01|128,1,1024,1,1,1|128,1,1024,1,1,1;32768,8,1048576,16,8,12|diskless,file,sharedfile,plain,blockdev,drbd,rbd,ext|4.0|32.0
......@@ -191,6 +191,14 @@ cat $TESTDATA_DIR/hail-alloc-invalid-network.json | grep -v -e '"network":"uuid-
>>> /"success":true.*"result":\["nodeA"\]/
>>>= 0
./test/hs/hail -t $TESTDATA_DIR/plain-n1-restriction.data $TESTDATA_DIR/hail-alloc-ext.json
>>> /"success":true.*"result":\["node[BCD]"\]/
>>>= 0
./test/hs/hail -t $TESTDATA_DIR/plain-n1-restriction.data $TESTDATA_DIR/hail-alloc-ext.json --no-capacity-checks
>>> /"success":true.*"result":\["nodeA"\]/
>>>= 0
# Verify that allocation restrications are honored
./test/hs/hail -t $TESTDATA_DIR/partly-used.data $TESTDATA_DIR/hail-alloc-drbd.json
>>> /successes 20,.*"result":\["node-0[45]","node-0[45]"\]/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment