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 hbal won't execute rebalances when using the text backend
17 ./test/hs/hbal $BACKEND_BAL_STD -G group-01 -X
19 Error: hbal: Execution of commands possible only on LUXI
22 # test that hbal won't execute any moves if we request an absurdly-high
24 ./test/hs/hbal $BACKEND_BAL_STD -G group-01 -C --min-gain 10000 --min-gain-limit 10000
25 >>>/No solution found/
28 # test saving commands
29 ./test/hs/hbal $BACKEND_BAL_STD -G group-01 -C$T/rebal-cmds.standard
31 # and now check the file (depends on previous test)
32 cat $T/rebal-cmds.standard
33 >>> /gnt-instance (failover|migrate|replace-disks)/
36 # state saved before rebalancing should be identical; depends on the
38 diff -u $T/simu-rebal-merged.standard $T/simu-rebal.standard.original
42 # no double rebalance; depends on previous test
43 ./test/hs/hbal -t $T/simu-rebal.standard.balanced -G group-01
44 >>> /(Nothing to do, exiting|No solution found)/
47 # hcheck sees no reason to rebalance after rebalancing was already done
48 ./test/hs/hcheck -t$T/simu-rebal.standard.balanced --machine-readable
49 >>> /HCHECK_INIT_CLUSTER_NEED_REBALANCE=0/
55 ./test/hs/hinfo -v -v -p --print-instances $BACKEND_BAL_TIER
57 ./test/hs/hbal -v -v -v -p --print-instances $BACKEND_BAL_TIER -G group-01
58 >>> !/(Nothing to do, exiting|No solution found)/
59 >>>2 !/(Nothing to do, exiting|No solution found)/
63 ./test/hs/hbal $BACKEND_BAL_TIER -G group-01 -C -S $T/simu-rebal.tiered
64 >>> /gnt-instance (failover|migrate|replace-disks)/
67 # test saving commands
68 ./test/hs/hbal $BACKEND_BAL_TIER -G group-01 -C$T/rebal-cmds.tiered
70 # and now check the file (depends on previous test)
71 cat $T/rebal-cmds.tiered
72 >>> /gnt-instance (failover|migrate|replace-disks)/
75 # state saved before rebalancing should be identical; depends on the
77 diff -u $T/simu-rebal-merged.tiered $T/simu-rebal.tiered.original
81 # no double rebalance; depends on previous test
82 ./test/hs/hbal -t $T/simu-rebal.tiered.balanced -G group-01
83 >>> /(Nothing to do, exiting|No solution found)/
86 ### now some other custom tests
88 # n+1 bad instances are reported as such
89 ./test/hs/hbal -t$TESTDATA_DIR/n1-failure.data -G group-01
90 >>>/Initial check done: 4 bad nodes, 8 bad instances./
93 # same test again, different message check (shelltest can't test multiple
95 ./test/hs/hbal -t$TESTDATA_DIR/n1-failure.data -G group-01
96 >>>/Cluster is not N\+1 happy, continuing but no guarantee that the cluster will end N\+1 happy./
100 # and hcheck should report this as needs rebalancing
101 ./test/hs/hcheck -t$TESTDATA_DIR/n1-failure.data
102 >>>/Cluster needs rebalancing./
105 # ... unless we request no-simulation mode
106 ./test/hs/hcheck -t$TESTDATA_DIR/n1-failure.data --no-simulation
107 >>>/Running in no-simulation mode./
110 # and a clean cluster should be reported as such
111 ./test/hs/hcheck $BACKEND_BAL_STD
112 >>>/No need to rebalance cluster, no problems found./
115 # ... and even one with non-zero score
116 ./test/hs/hcheck -t $TESTDATA_DIR/clean-nonzero-score.data
117 >>>/No need to rebalance cluster, no problems found./
120 # hbal should work on empty groups as well
121 ./test/hs/hbal -t$TESTDATA_DIR/n1-failure.data -G group-02
122 >>>/Group size 0 nodes, 0 instances/