In this example, there is one offline node that cannot be
evacuated as the instance is too big to fit anywhere. Therefore,
the cluster is not shared N+1 redundant; however, ignoring
the offline node, new instances can be added.

Signed-off-by: Klaus Aehlig <[email protected]>
---
 Makefile.am                           |  1 +
 test/data/htools/hspace-existing.data | 13 +++++++++++++
 test/hs/shelltests/htools-hspace.test |  8 ++++++++
 3 files changed, 22 insertions(+)
 create mode 100644 test/data/htools/hspace-existing.data

diff --git a/Makefile.am b/Makefile.am
index 12cda9f..67bc9e6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1730,6 +1730,7 @@ TEST_FILES = \
        test/data/htools/hbal-soft-errors.data \
        test/data/htools/hbal-soft-errors2.data \
        test/data/htools/hbal-split-insts.data \
+       test/data/htools/hspace-existing.data \
        test/data/htools/hspace-groups-one.data \
        test/data/htools/hspace-groups-two.data \
        test/data/htools/hspace-tiered-dualspec-exclusive.data \
diff --git a/test/data/htools/hspace-existing.data 
b/test/data/htools/hspace-existing.data
new file mode 100644
index 0000000..d212e28
--- /dev/null
+++ b/test/data/htools/hspace-existing.data
@@ -0,0 +1,13 @@
+group-01|fake-uuid-01|preferred||
+
+node-01|81920|0|71920|200|200|16|M|fake-uuid-01
+node-02|81920|0|71920|200|200|16|N|fake-uuid-01
+node-bad|81920|0|1920|200|200|16|Y|fake-uuid-01
+
+inst-11|10000|0|1|running|Y|node-01||ext||1
+inst-12|10000|0|1|running|Y|node-02||ext||1
+inst-bad|80000|0|1|running|Y|node-bad||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-hspace.test 
b/test/hs/shelltests/htools-hspace.test
index 1ff0680..98fa233 100644
--- a/test/hs/shelltests/htools-hspace.test
+++ b/test/hs/shelltests/htools-hspace.test
@@ -82,3 +82,11 @@
 >>>/2 instances allocated/
 >>>=0
 
+./test/hs/hspace -t $TESTDATA_DIR/hspace-existing.data
+>>>/ 0 instances allocated/
+>>>=0
+
+./test/hs/hspace -t $TESTDATA_DIR/hspace-existing.data --accept-existing
+>>>/ [1-9][0-9]* instances allocated/
+>>>=0
+
-- 
2.5.0.457.gab17608

Reply via email to