commit 522357dc09ade3d1a72c999d32f26bad56d2e587
Merge: 87ec22e 32cb9b9
Author: Hrvoje Ribicic <[email protected]>
Date: Mon Oct 12 17:11:38 2015 +0200
Merge branch 'stable-2.15' into stable-2.16
* stable-2.15
For queries, take the correct base address of an IP block
Fix computation in network blocks
* stable-2.14
Add test for tags accounting in hail
Set node tags in iallocator htools backend
* stable-2.13
Improve xl socat migrations
* stable-2.12
QA: Retrieve only the RAPI certificate
QA: Allow usage of specific RAPI certificates and files
QA: Reload certificates only when renew-crypto has been run
QA: Restart Ganeti after adding the RAPI users file
QA: Add reading the RAPI password from a file
QA: Allow the RAPI user to be set
QA: Do not remove nodes from cluster without destroying it
QA: Refactor RAPI handling
Increase default disk size of burnin to 1G
break line with more than 80 characters
Only search for Python-2 interpreters
Fix faulty comments / indentation
Handle Xen 4.3 states better
* stable-2.11
(no changes)
* stable-2.10
Add a test for parsing of admin_state in IAlloc backend
At IAlloc backend guess state from admin state
* stable-2.9
Update harep's man page to notify users of its limitations
Conflicts:
htools-hail.test: merged tests
Signed-off-by: Hrvoje Ribicic <[email protected]>
diff --cc Makefile.am
index a6b9fbd,8910b08..c31e611
--- a/Makefile.am
+++ b/Makefile.am
@@@ -1703,8 -1691,8 +1703,9 @@@ TEST_FILES =
test/data/htools/hail-alloc-invalid-network.json \
test/data/htools/hail-alloc-invalid-twodisks.json \
test/data/htools/hail-alloc-restricted-network.json \
+ test/data/htools/hail-alloc-nlocation.json \
test/data/htools/hail-alloc-plain-tags.json \
+ test/data/htools/hail-alloc-secondary.json \
test/data/htools/hail-alloc-spindles.json \
test/data/htools/hail-alloc-twodisks.json \
test/data/htools/hail-change-group.json \
diff --cc test/hs/shelltests/htools-hail.test
index 9402a34,f0eaca4..46bfa20
--- a/test/hs/shelltests/htools-hail.test
+++ b/test/hs/shelltests/htools-hail.test
@@@ -182,45 -187,7 +187,50 @@@ cat $TESTDATA_DIR/hail-alloc-invalid-ne
>>> /"success":true.*"result":\[\[\[.*\["node2-quarter"\]/
>>>= 0
+# Verify that global N+1 redundancy is honored, unless requested not to
+./test/hs/hail -t $TESTDATA_DIR/shared-n1-restriction.data
$TESTDATA_DIR/hail-alloc-ext.json
+>>> /"success":true.*"result":\["node[BCD]"\]/
+>>>= 0
+
+./test/hs/hail -t $TESTDATA_DIR/shared-n1-restriction.data
$TESTDATA_DIR/hail-alloc-ext.json --no-capacity-checks
+>>> /"success":true.*"result":\["nodeA"\]/
+>>>= 0
+
+./test/hs/hail -t $TESTDATA_DIR/plain-n1-restriction.data
$TESTDATA_DIR/hail-alloc-ext.json
+>>> /"success":true.*"result":\["node[BCD]"\]/
+>>>= 0
+
+./test/hs/hail -t $TESTDATA_DIR/plain-n1-restriction.data
$TESTDATA_DIR/hail-alloc-ext.json --no-capacity-checks
+>>> /"success":true.*"result":\["nodeA"\]/
+>>>= 0
+
+# Verify that allocation restrications are honored
+./test/hs/hail -t $TESTDATA_DIR/partly-used.data
$TESTDATA_DIR/hail-alloc-drbd.json
+>>> /successes 20,.*"result":\["node-0[45]","node-0[45]"\]/
+>>>= 0
+
+./test/hs/hail -t $TESTDATA_DIR/partly-used.data --restrict-allocation-to
node-01,node-02,node-03 $TESTDATA_DIR/hail-alloc-drbd.json
+>>> /successes 6,.*"result":\["node-0[123]","node-0[123]"\]/
+>>>= 0
+
+./test/hs/hail -t $TESTDATA_DIR/partly-used.data
$TESTDATA_DIR/hail-alloc-drbd-restricted.json
+>>> /successes 6,.*"result":\["node-0[123]","node-0[123]"\]/
+>>>= 0
+
+./test/hs/hail -t $TESTDATA_DIR/partly-used.data --restrict-allocation-to
node-01,node-02 $TESTDATA_DIR/hail-alloc-drbd-restricted.json
+>>> /successes 2,.*"result":\["node-0[12]","node-0[12]"\]/
+>>>= 0
+
+./test/hs/hail -t $TESTDATA_DIR/partly-used.data --restrict-allocation-to
node-03,node-04 $TESTDATA_DIR/hail-alloc-drbd-restricted.json
+>>> /successes 2,.*"result":\["node-0[34]","node-0[34]"\]/
+>>>= 0
+
+# Verify allocate-secondary
+./test/hs/hail $TESTDATA_DIR/hail-alloc-secondary.json
+>>> /successes 2, failures 0.*"result":"node-2-2"/
+>>>= 0
++
+ # Check that hail account location tags
+ ./test/hs/hail $TESTDATA_DIR/hail-alloc-nlocation.json
+ >>> /"success":true,.*,"result":\["node3","node2"\]/
+ >>>= 0
Hrvoje Ribicic
Ganeti Engineering
Google Germany GmbH
Dienerstr. 12, 80331, München
Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat sind,
leiten Sie diese bitte nicht weiter, informieren Sie den Absender und
löschen Sie die E-Mail und alle Anhänge. Vielen Dank.
This e-mail is confidential. If you are not the right addressee please do
not forward it, please inform the sender, and please erase this e-mail
including any attachments. Thanks.