### std tests # test basic parsing ./htest/hinfo -v -v -p --print-instances $BACKEND_BAL_STD >>>= 0 ./htest/hbal -v -v -v -p --print-instances $BACKEND_BAL_STD -G group-01 >>> !/(Nothing to do, exiting|No solution found)/ >>>2 !/(Nothing to do, exiting|No solution found)/ >>>= 0 # test command output ./htest/hbal $BACKEND_BAL_STD -G group-01 -C -S $T/simu-rebal.standard >>> /gnt-instance (failover|migrate|replace-disks)/ >>>= 0 # test saving commands ./htest/hbal $BACKEND_BAL_STD -G group-01 -C$T/rebal-cmds.standard >>>= 0 # and now check the file (depends on previous test) cat $T/rebal-cmds.standard >>> /gnt-instance (failover|migrate|replace-disks)/ >>>= 0 # state saved before rebalancing should be identical; depends on the # previous test diff -u $T/simu-rebal-merged.standard $T/simu-rebal.standard.original >>> >>>= 0 # no double rebalance; depends on previous test ./htest/hbal -t $T/simu-rebal.standard.balanced -G group-01 >>> /(Nothing to do, exiting|No solution found)/ >>>= 0 # hcheck sees no reason to rebalance after rebalancing was already done ./htest/hcheck -t$T/simu-rebal.standard.balanced --machine-readable >>> /HCHECK_INIT_CLUSTER_NEED_REBALANCE=0/ >>>= 0 ### now tiered tests # test basic parsing ./htest/hinfo -v -v -p --print-instances $BACKEND_BAL_TIER >>>= 0 ./htest/hbal -v -v -v -p --print-instances $BACKEND_BAL_TIER -G group-01 >>> !/(Nothing to do, exiting|No solution found)/ >>>2 !/(Nothing to do, exiting|No solution found)/ >>>= 0 # test command output ./htest/hbal $BACKEND_BAL_TIER -G group-01 -C -S $T/simu-rebal.tiered >>> /gnt-instance (failover|migrate|replace-disks)/ >>>= 0 # test saving commands ./htest/hbal $BACKEND_BAL_TIER -G group-01 -C$T/rebal-cmds.tiered >>>= 0 # and now check the file (depends on previous test) cat $T/rebal-cmds.tiered >>> /gnt-instance (failover|migrate|replace-disks)/ >>>= 0 # state saved before rebalancing should be identical; depends on the # previous test diff -u $T/simu-rebal-merged.tiered $T/simu-rebal.tiered.original >>> >>>= 0 # no double rebalance; depends on previous test ./htest/hbal -t $T/simu-rebal.tiered.balanced -G group-01 >>> /(Nothing to do, exiting|No solution found)/ >>>= 0