> [...]
> * more complex (two instances failover)
> [...]

> --- /dev/null
> +++ b/test/data/htools/hbal-desiredlocation-2.data
> @@ -0,0 +1,10 @@
> +group-01|fake-uuid-01|preferred||
> +
> +node-01|16384|0|15360|409600|255400|16|N|fake-uuid-01|1|power:a
> +node-02|16384|0|15360|409600|255400|16|N|fake-uuid-01|1|power:b
> +
> +inst1|1024|51200|1|running|Y|node-01|node-02|drbd|power:b|1
> +inst2|1024|51200|1|running|Y|node-02|node-01|drbd|power:a|1
> +
> +htools:desiredlocation:power
> +htools:nlocation:power

> +./test/hs/hbal --print-nodes=name,pcnt -t 
> $TESTDATA_DIR/hbal-desiredlocation-2.data
> +>>>2/Final cluster status:
> + Name    pcnt
> + node-01    1
> + node-02    1/
> +>>>= 0

You're not testing what you claim to test for. Not doing anything would also 
make this
test pass. Even worse, I actually do get

$ env HTOOLS=hbal ./src/htools -t test/data/htools/hbal-desiredlocation-2.data
Warning: cluster has inconsistent data:
  - node node-02 is missing 0 MB ram and 50 GB disk
  - node node-01 is missing 0 MB ram and 50 GB disk

Loaded 2 nodes, 2 instances
Group size 2 nodes, 2 instances
Selected node group: group-01
Initial check done: 0 bad nodes, 0 bad instances.
Initial score: 2.03125000
Trying to minimize the CV...
No solution found
Solution length=0
$

-- 
Klaus Aehlig
Google Germany GmbH, Dienerstr. 12, 80331 Muenchen
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschaeftsfuehrer: Graham Law, Christine Elizabeth Flores

Reply via email to