4 ./test/hs/hinfo -v -v -p --print-instances $BACKEND_BAL_STD
6 ./test/hs/hbal -v -v -v -p --print-instances $BACKEND_BAL_STD -G group-01
7 >>> !/(Nothing to do, exiting|No solution found)/
8 >>>2 !/(Nothing to do, exiting|No solution found)/
12 ./test/hs/hbal $BACKEND_BAL_STD -G group-01 -C -S $T/simu-rebal.standard
13 >>> /gnt-instance (failover|migrate|replace-disks)/
16 # test that correct priorities are accepted
17 ./test/hs/hbal $BACKEND_BAL_STD -G group-01 -C -S $T/simu-rebal.standard --prio low
18 >>> /gnt-instance (failover|migrate|replace-disks)/
22 # test that hbal won't execute rebalances when using the text backend
23 ./test/hs/hbal $BACKEND_BAL_STD -G group-01 -X
25 Error: hbal: Execution of commands possible only on LUXI
28 # test that hbal won't execute any moves if we request an absurdly-high
30 ./test/hs/hbal $BACKEND_BAL_STD -G group-01 -C --min-gain 10000 --min-gain-limit 10000
31 >>>/No solution found/
34 # test saving commands
35 ./test/hs/hbal $BACKEND_BAL_STD -G group-01 -C$T/rebal-cmds.standard
37 # and now check the file (depends on previous test)
38 cat $T/rebal-cmds.standard
39 >>> /gnt-instance (failover|migrate|replace-disks)/
42 # state saved before rebalancing should be identical; depends on the
44 diff -u $T/simu-rebal-merged.standard $T/simu-rebal.standard.original
48 # no double rebalance; depends on previous test
49 ./test/hs/hbal -t $T/simu-rebal.standard.balanced -G group-01
50 >>> /(Nothing to do, exiting|No solution found)/
53 # hcheck sees no reason to rebalance after rebalancing was already done
54 ./test/hs/hcheck -t$T/simu-rebal.standard.balanced --machine-readable
55 >>> /HCHECK_INIT_CLUSTER_NEED_REBALANCE=0/
61 ./test/hs/hinfo -v -v -p --print-instances $BACKEND_BAL_TIER
63 ./test/hs/hbal -v -v -v -p --print-instances $BACKEND_BAL_TIER -G group-01
64 >>> !/(Nothing to do, exiting|No solution found)/
65 >>>2 !/(Nothing to do, exiting|No solution found)/
69 ./test/hs/hbal $BACKEND_BAL_TIER -G group-01 -C -S $T/simu-rebal.tiered
70 >>> /gnt-instance (failover|migrate|replace-disks)/
73 # test saving commands
74 ./test/hs/hbal $BACKEND_BAL_TIER -G group-01 -C$T/rebal-cmds.tiered
76 # and now check the file (depends on previous test)
77 cat $T/rebal-cmds.tiered
78 >>> /gnt-instance (failover|migrate|replace-disks)/
81 # state saved before rebalancing should be identical; depends on the
83 diff -u $T/simu-rebal-merged.tiered $T/simu-rebal.tiered.original
87 # no double rebalance; depends on previous test
88 ./test/hs/hbal -t $T/simu-rebal.tiered.balanced -G group-01
89 >>> /(Nothing to do, exiting|No solution found)/
92 ### now some other custom tests
94 # n+1 bad instances are reported as such
95 ./test/hs/hbal -t$TESTDATA_DIR/n1-failure.data -G group-01
96 >>>/Initial check done: 4 bad nodes, 8 bad instances./
99 # same test again, different message check (shelltest can't test multiple
100 # messages via regexp
101 ./test/hs/hbal -t$TESTDATA_DIR/n1-failure.data -G group-01
102 >>>/Cluster is not N\+1 happy, continuing but no guarantee that the cluster will end N\+1 happy./
106 # and hcheck should report this as needs rebalancing
107 ./test/hs/hcheck -t$TESTDATA_DIR/n1-failure.data
108 >>>/Cluster needs rebalancing./
111 # ... unless we request no-simulation mode
112 ./test/hs/hcheck -t$TESTDATA_DIR/n1-failure.data --no-simulation
113 >>>/Running in no-simulation mode./
116 # and a clean cluster should be reported as such
117 ./test/hs/hcheck $BACKEND_BAL_STD
118 >>>/No need to rebalance cluster, no problems found./
121 # ... and even one with non-zero score
122 ./test/hs/hcheck -t $TESTDATA_DIR/clean-nonzero-score.data
123 >>>/No need to rebalance cluster, no problems found./
126 # hbal should work on empty groups as well
127 ./test/hs/hbal -t$TESTDATA_DIR/n1-failure.data -G group-02
128 >>>/Group size 0 nodes, 0 instances/