Skip to content
Snippets Groups Projects
Commit c64c3854 authored by Iustin Pop's avatar Iustin Pop
Browse files

Extend the hcheck shell tests


This adds a few new hcheck tests, to extend the coverage.

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 591fa888
No related branches found
No related tags found
No related merge requests found
...@@ -867,6 +867,7 @@ maninput = \ ...@@ -867,6 +867,7 @@ maninput = \
man/footer.man man/footer.html $(mangen) man/footer.man man/footer.html $(mangen)
TEST_FILES = \ TEST_FILES = \
htest/data/clean-nonzero-score.data \
htest/data/common-suffix.data \ htest/data/common-suffix.data \
htest/data/empty-cluster.data \ htest/data/empty-cluster.data \
htest/data/hail-alloc-drbd.json \ htest/data/hail-alloc-drbd.json \
......
group-01|fake-uuid-01|preferred|
node-01-001|91552|0|91424|953674|953674|16|N|fake-uuid-01|1
node-01-002|91552|0|91296|953674|953674|16|N|fake-uuid-01|1
node-01-003|91552|0|91296|953674|953674|16|N|fake-uuid-01|1
new-0|128|1024|1|running|Y|node-01-003||diskless||1
new-1|128|1024|1|running|Y|node-01-002||diskless||1
new-2|128|1024|1|running|Y|node-01-001||diskless||1
new-3|128|1024|1|running|Y|node-01-003||diskless||1
new-4|128|1024|1|running|Y|node-01-002||diskless||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
...@@ -97,6 +97,26 @@ diff -u $T/simu-rebal-merged.tiered $T/simu-rebal.tiered.original ...@@ -97,6 +97,26 @@ diff -u $T/simu-rebal-merged.tiered $T/simu-rebal.tiered.original
>>>2 >>>2
>>>=0 >>>=0
# and hcheck should report this as needs rebalancing
./htest/hcheck -t$TESTDATA_DIR/n1-failure.data
>>>/Cluster needs rebalancing./
>>>= 1
# ... unless we request no-simulation mode
./htest/hcheck -t$TESTDATA_DIR/n1-failure.data --no-simulation
>>>/Running in no-simulation mode./
>>>= 0
# and a clean cluster should be reported as such
./htest/hcheck $BACKEND_BAL_STD
>>>/No need to rebalance cluster, no problems found./
>>>= 0
# ... and even one with non-zero score
./htest/hcheck -t $TESTDATA_DIR/clean-nonzero-score.data
>>>/No need to rebalance cluster, no problems found./
>>>= 0
# hbal should work on empty groups as well # hbal should work on empty groups as well
./htest/hbal -t$TESTDATA_DIR/n1-failure.data -G group-02 ./htest/hbal -t$TESTDATA_DIR/n1-failure.data -G group-02
>>>/Group size 0 nodes, 0 instances/ >>>/Group size 0 nodes, 0 instances/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment