Add a test demonstrating the --node-tags option of hroller
authorKlaus Aehlig <aehlig@google.com>
Fri, 3 May 2013 09:12:58 +0000 (11:12 +0200)
committerKlaus Aehlig <aehlig@google.com>
Tue, 7 May 2013 15:59:51 +0000 (17:59 +0200)
The example is a cluster of 6 nodes, paired into 3 group by three
instances. So the whole cluster would need two reboot groups. The two
tags select, in two different ways, one node of each group. So, when
restricting to one tag, a single reboot group suffices, but no
coloring of the whole cluster would achieve this.

Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Guido Trotter <ultrotter@google.com>

Makefile.am
test/data/htools/multiple-tags.data [new file with mode: 0644]
test/hs/shelltests/htools-hroller.test

index 98b7cb4..ee1d1c4 100644 (file)
@@ -1022,6 +1022,7 @@ TEST_FILES = \
        test/data/htools/invalid-node.data \
        test/data/htools/missing-resources.data \
        test/data/htools/multiple-master.data \
+       test/data/htools/multiple-tags.data \
        test/data/htools/n1-failure.data \
        test/data/htools/rapi/groups.json \
        test/data/htools/rapi/info.json \
diff --git a/test/data/htools/multiple-tags.data b/test/data/htools/multiple-tags.data
new file mode 100644 (file)
index 0000000..35cb17a
--- /dev/null
@@ -0,0 +1,16 @@
+group-01|fake-uuid-01|preferred|
+
+node-01-001|91552|0|91424|953674|953674|16|M|fake-uuid-01|1|red
+node-01-002|91552|0|91296|953674|953674|16|N|fake-uuid-01|1|blue
+node-01-003|91552|0|91296|953674|953674|16|N|fake-uuid-01|1|
+node-01-004|91552|0|91296|953674|953674|16|N|fake-uuid-01|1|blue,red
+node-01-005|91552|0|91296|953674|953674|16|N|fake-uuid-01|1|red
+node-01-006|91552|0|91296|953674|953674|16|N|fake-uuid-01|1|blue
+
+new-0|128|1152|1|running|Y|node-01-001|node-01-002|drbd||1
+new-1|128|1152|1|running|Y|node-01-003|node-01-004|drbd||1
+new-1|128|1152|1|running|Y|node-01-005|node-01-006|drbd||1
+
+
+|128,1,1024,1,1,1|128,1,1024,1,1,1;32768,8,1048576,16,8,12|diskless,file,sharedfile,plain,blockdev,drbd,rbd,ext|4.0|32.0
+group-01|128,1,1024,1,1,1|128,1,1024,1,1,1;32768,8,1048576,16,8,12|diskless,file,sharedfile,plain,blockdev,drbd,rbd,ext|4.0|32.0
index 82ad782..925ff9d 100644 (file)
@@ -14,3 +14,11 @@ node-01-003,node-01-001
 node-01-002
 node-01-001
 >>>= 0
+
+./test/hs/hroller --node-tags=red --no-headers -t $TESTDATA_DIR/multiple-tags.data
+>>>/node-01-00.,node-01-00.,node-01-001/
+>>>= 0
+
+./test/hs/hroller --node-tags=blue --no-headers -t $TESTDATA_DIR/multiple-tags.data
+>>>/node-01-00.,node-01-00.,node-01-00?/
+>>>= 0