Extend hroller tests by options for non-redundant instances
authorKlaus Aehlig <aehlig@google.com>
Wed, 22 May 2013 10:49:17 +0000 (12:49 +0200)
committerKlaus Aehlig <aehlig@google.com>
Wed, 22 May 2013 12:27:44 +0000 (14:27 +0200)
The cluster now consists of 3 nodes, with drbd instances between
nodes 1 and 2, and 2 and 3. Additionally, nodes 1 and 3 each contain
a non-redundant instance, but node 2 cannot hold two additional
instances.

So,
- if we take non-redundant instances into account (the new default
  behavior), the nodes have to be rebooted individually,
- if we ignore non-redundant instances, nodes 1 and 3 can be rebooted
  simultaneously, and
- if we skip nodes with non-redundant instances, only a single node
  remains (of course, forming a single reboot group).

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

test/data/htools/unique-reboot-order.data
test/hs/shelltests/htools-hroller.test

index a756a05..6aed729 100644 (file)
@@ -1,11 +1,13 @@
 group-01|fake-uuid-01|preferred|
 
-node-01-001|91552|0|91424|953674|953674|16|M|fake-uuid-01|1
-node-01-002|91552|0|91296|953674|953674|16|N|fake-uuid-01|1
-node-01-003|91552|0|91296|953674|953674|16|N|fake-uuid-01|1
+node-01-001|91552|0|91424|3500|1196|16|M|fake-uuid-01|1
+node-01-002|91552|0|91296|3500|1196|16|N|fake-uuid-01|1
+node-01-003|91552|0|91296|3500|1196|16|N|fake-uuid-01|1
 
 new-0|128|1152|1|running|Y|node-01-001|node-01-002|drbd||1
 new-1|128|1152|1|running|Y|node-01-002|node-01-003|drbd||1
+nonred-0|128|1152|1|running|Y|node-01-001||plain||1
+nonred-1|128|1152|1|running|Y|node-01-003||plain||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
index bfa064d..09bcd34 100644 (file)
@@ -1,15 +1,26 @@
-./test/hs/hroller --no-headers -t $TESTDATA_DIR/unique-reboot-order.data
+./test/hs/hroller --no-headers --ignore-non-redundant -t $TESTDATA_DIR/unique-reboot-order.data
 >>>
 node-01-002
 node-01-003,node-01-001
 >>>= 0
 
-./test/hs/hroller -O node-01-002 --no-headers -t $TESTDATA_DIR/unique-reboot-order.data
+./test/hs/hroller --no-headers --skip-non-redundant -t $TESTDATA_DIR/unique-reboot-order.data
+>>>
+node-01-002
+>>>= 0
+
+./test/hs/hroller --no-headers -t $TESTDATA_DIR/unique-reboot-order.data
+>>>/^node-01-00.
+node-01-00.
+node-01-001$/
+>>>= 0
+
+./test/hs/hroller --ignore-non-redundant -O node-01-002 --no-headers -t $TESTDATA_DIR/unique-reboot-order.data
 >>>
 node-01-003,node-01-001
 >>>= 0
 
-./test/hs/hroller -O node-01-003 --no-headers -t $TESTDATA_DIR/unique-reboot-order.data
+./test/hs/hroller --ignore-non-redundant -O node-01-003 --no-headers -t $TESTDATA_DIR/unique-reboot-order.data
 >>>
 node-01-002
 node-01-001