In this example, there are 4 nodes. Each has the same amount of free memory, enough for one small instance. 3 of those nodes host 3 small instance. One node, however, has one big instance the size of 3 small ones. Hence that node cannot be fully evacuated.
Signed-off-by: Klaus Aehlig <[email protected]> --- Makefile.am | 2 ++ test/data/htools/shared-n1-failure.data | 20 ++++++++++++++++++++ test/hs/shelltests/htools-hbal.test | 18 ++++++++++++++++++ test/hs/shelltests/htools-hcheck.test | 7 +++++++ 4 files changed, 47 insertions(+) create mode 100644 test/data/htools/shared-n1-failure.data create mode 100644 test/hs/shelltests/htools-hcheck.test diff --git a/Makefile.am b/Makefile.am index 36f8dee..50ce133 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1725,6 +1725,7 @@ TEST_FILES = \ test/data/htools/hsqueeze-mixed-instances.data \ test/data/htools/hsqueeze-overutilized.data \ test/data/htools/hsqueeze-underutilized.data \ + test/data/htools/shared-n1-failure.data \ test/data/htools/unique-reboot-order.data \ test/data/mond-data.txt \ test/hs/shelltests/htools-balancing.test \ @@ -1734,6 +1735,7 @@ TEST_FILES = \ test/hs/shelltests/htools-hail.test \ test/hs/shelltests/htools-hbal-evac.test \ test/hs/shelltests/htools-hbal.test \ + test/hs/shelltests/htools-hcheck.test \ test/hs/shelltests/htools-hroller.test \ test/hs/shelltests/htools-hspace.test \ test/hs/shelltests/htools-hsqueeze.test \ diff --git a/test/data/htools/shared-n1-failure.data b/test/data/htools/shared-n1-failure.data new file mode 100644 index 0000000..7a82bad --- /dev/null +++ b/test/data/htools/shared-n1-failure.data @@ -0,0 +1,20 @@ +group-01|fake-uuid-01|preferred|| + +nodeA|4096|0|1096|200|200|4|M|fake-uuid-01|4 +nodeB|4096|0|1096|200|200|4|N|fake-uuid-01|4 +nodeC|4096|0|1096|200|200|4|N|fake-uuid-01|4 +nodeD|4096|0|1096|200|200|4|N|fake-uuid-01|4 + +instA1|1000|0|1|running|Y|nodeA||ext||1 +instA2|1000|0|1|running|Y|nodeA||ext||1 +instA3|1000|0|1|running|Y|nodeA||ext||1 +instB1|1000|0|1|running|Y|nodeB||ext||1 +instB2|1000|0|1|running|Y|nodeB||ext||1 +instB3|1000|0|1|running|Y|nodeB||ext||1 +instC1|3000|0|3|running|Y|nodeC||ext||3 +instD1|1000|0|1|running|Y|nodeD||ext||1 +instD2|1000|0|1|running|Y|nodeD||ext||1 +instD3|1000|0|1|running|Y|nodeD||ext||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 diff --git a/test/hs/shelltests/htools-hbal.test b/test/hs/shelltests/htools-hbal.test index 4ebe30c..e3baf37 100644 --- a/test/hs/shelltests/htools-hbal.test +++ b/test/hs/shelltests/htools-hbal.test @@ -29,3 +29,21 @@ ./test/hs/hbal -t $TESTDATA_DIR/hbal-location-1.data >>>/Solution length=[1-9]/ >>>= 0 + +./test/hs/hbal -t $TESTDATA_DIR/shared-n1-failure.data --ignore-dynu +>>>/Cluster is already well balanced/ +>>>= 0 + +./test/hs/hbal -t $TESTDATA_DIR/shared-n1-failure.data --ignore-dynu -pname,pcnt -O nodeA +>>>2/Final cluster status: + Name pcnt + nodeA 0 + nodeB 4 + nodeC 2 + nodeD 4/ +>>>= 0 + +./test/hs/hbal -t $TESTDATA_DIR/shared-n1-failure.data --ignore-dynu -O nodeC +>>>/No solution found/ +>>>= 0 + diff --git a/test/hs/shelltests/htools-hcheck.test b/test/hs/shelltests/htools-hcheck.test new file mode 100644 index 0000000..51d6a08 --- /dev/null +++ b/test/hs/shelltests/htools-hcheck.test @@ -0,0 +1,7 @@ +./test/hs/hcheck -t $TESTDATA_DIR/shared-n1-failure.data +>>>/Nodes not directly evacuateable: 1/ +>>>= 1 + +./test/hs/hcheck -t $TESTDATA_DIR/shared-n1-failure.data --machine-readable +>>>/HCHECK_INIT_CLUSTER_GN1_FAIL=1/ +>>>= 1 -- 2.2.0.rc0.207.ga3a616c
