Revision a93e5814

b/Makefile.am
1058 1058
	test/data/htools/hail-reloc-drbd.json \
1059 1059
	test/data/htools/hbal-excl-tags.data \
1060 1060
	test/data/htools/hbal-split-insts.data \
1061
	test/data/htools/hspace-tiered-dualspec-exclusive.data \
1061 1062
	test/data/htools/hspace-tiered-dualspec.data \
1063
	test/data/htools/hspace-tiered-exclusive.data \
1064
	test/data/htools/hspace-tiered-mixed.data \
1062 1065
	test/data/htools/hspace-tiered.data \
1063 1066
	test/data/htools/invalid-node.data \
1064 1067
	test/data/htools/missing-resources.data \
b/test/data/htools/hspace-tiered-dualspec-exclusive.data
1
group-01|fake-uuid-01|preferred||
2

  
3
node-01-001|262144|65536|196608|2097152|2097152|8|N|fake-uuid-01|10||Y|10
4
node-01-002|262144|65536|196608|2097152|2097152|8|N|fake-uuid-01|10||Y|9
5
node-01-003|262144|1024|261120|2097152|2097152|8|N|fake-uuid-01|8||Y|8
6
node-01-004|262144|1024|261120|2097152|2097152|8|N|fake-uuid-01|8||Y|8
7

  
8

  
9

  
10
|63488,2,522240,1,1,2|129024,4,1047552,1,1,4;131072,4,1048576,16,8,4;63488,2,522240,1,1,2;65536,2,524288,16,8,2|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
11
group-01|63488,2,522240,1,1,2|129024,4,1047552,1,1,4;131072,4,1048576,16,8,4;63488,2,522240,1,1,2;65536,2,524288,16,8,2|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
b/test/data/htools/hspace-tiered-exclusive.data
1
group-01|fake-uuid-01|preferred||
2

  
3
node-01-001|262144|65536|196608|2097152|2097152|8|N|fake-uuid-01|10||Y|10
4
node-01-002|262144|65536|196608|2097152|2097152|8|N|fake-uuid-01|10||Y|9
5
node-01-003|262144|1024|261120|2097152|2097152|8|N|fake-uuid-01|8||Y|8
6
node-01-004|262144|1024|261120|2097152|2097152|8|N|fake-uuid-01|8||Y|8
7

  
8

  
9

  
10
|129024,4,1047552,1,1,1|129024,4,1047552,1,1,1;131072,4,1048576,16,8,12|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
11
group-01|129024,4,1047552,1,1,1|129024,4,1047552,1,1,1;131072,4,1048576,16,8,12|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
b/test/data/htools/hspace-tiered-mixed.data
1
group-01|fake-uuid-01|preferred||
2
group-02|fake-uuid-02|preferred||
3

  
4
node-01-001|262144|65536|196608|2097152|2097152|8|N|fake-uuid-01|10||Y|10
5
node-01-002|262144|65536|196608|2097152|2097152|8|N|fake-uuid-01|10||Y|10
6
node-01-003|262144|1024|261120|2097152|2097152|8|N|fake-uuid-02|8||N|8
7
node-01-004|262144|1024|261120|2097152|2097152|8|N|fake-uuid-02|8||N|8
8

  
9

  
10

  
11
|129024,4,1047552,1,1,1|129024,4,1047552,1,1,1;131072,4,1048576,16,8,12|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
12
group-01|129024,4,1047552,1,1,1|129024,4,1047552,1,1,1;131072,4,1048576,16,8,12|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
13
group-02|129024,4,1047552,1,1,1|129024,4,1047552,1,1,1;131072,4,1048576,16,8,12|plain,diskless,file,sharedfile,blockdev,drbd,rbd,ext|4.0|32.0
b/test/hs/shelltests/htools-hspace.test
8 8
>>>= 0
9 9

  
10 10
# standard & tiered allocation, using shell parsing to do multiple checks
11
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4=4 129984,1048320,4=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 6"
11
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4,12=4 129984,1048320,4,12=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 6"
12 12
>>>=0
13 13

  
14 14
# again, but with a policy containing two min/max specs pairs
15
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-dualspec.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4=4 129984,1048320,4=2 65472,524288,2=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 14"
15
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-dualspec.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4,12=4 129984,1048320,4,12=2 65472,524288,2,12=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 14"
16 16
>>>2
17 17
>>>=0
18

  
19
# With exclusive storage
20
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-exclusive.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4,10=1 131072,1048576,4,9=1 131072,1048576,4,8=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 6 && test \"\${HTS_TRL_SPN_FREE}\" = 0 && test \"\${HTS_FIN_SPN_FREE}\" = 29"
21
>>>=0
22

  
23
# With exclusive storage and a policy containing two min/max specs pairs
24
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-dualspec-exclusive.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4,4=4 129984,1048320,4,4=2 65472,524288,2,2=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 14 && test \"\${HTS_TRL_SPN_FREE}\" = 7 && test \"\${HTS_FIN_SPN_FREE}\" = 7"
25
>>>2
26
>>>=0
27

  
28
# Mixed cluster, half with exclusive storage
29
./test/hs/hspace --machine-readable -t $TESTDATA_DIR/hspace-tiered-mixed.data > $T/capacity && sh -c ". $T/capacity && test \"\${HTS_TSPEC}\" = '131072,1048576,4,12=2 131072,1048576,4,10=2 129984,1048320,4,10=2' && test \"\${HTS_ALLOC_INSTANCES}\" = 6 && test \"\${HTS_TRL_SPN_FREE}\" = 0 && test \"\${HTS_FIN_SPN_FREE}\" = 18"
30
>>>=0

Also available in: Unified diff