In preparation for future modifications in the exclusion tags field, add a
test that verifies that exclusion tags are being honored: in a test cluster
with two instances of the same exclusion group in each node, hbal should
shuffle instances around to improve the score.
Signed-off-by: Dato Simó <dato@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
--- /dev/null
+group-01|fake-uuid-01|preferred
+
+node-01|16384|0|14336|409600|153600|16|N|fake-uuid-01|1
+node-02|16384|0|13312|409600|153600|16|N|fake-uuid-01|1
+
+dns1|1024|51200|1|running|Y|node-01|node-02|drbd|service-group:dns,foo|1
+dns2|1024|51200|1|running|Y|node-01|node-02|drbd|service-group:dns,foo|1
+ftp1|1024|51200|1|running|Y|node-02|node-01|drbd|test:ftp,bar|1
+ftp2|1024|51200|1|running|Y|node-02|node-01|drbd|test:ftp,bar|1
+admin|1024|51200|1|running|Y|node-02|node-01|drbd|foo|1
+
+htools:iextags:service-group
./test/hbal $BACKEND_EXCL --exclude-instances new-0 --select-instances new-1
>>>= 0
+
+# Test exclusion tags too (both from the command line and cluster tags).
+./test/hbal -t $TESTDATA_DIR/hbal-excl-tags.data --exclusion-tags test
+>>> /Cluster score improved/
+>>>= 0