LGTM, thanks
On Wed, Jun 25, 2014 at 11:23 AM, 'Klaus Aehlig' via ganeti-devel < [email protected]> wrote: > Verify that the results of allocation do not depend on the > presence of an overfull group, if the option --independent-groups > is given. > > Signed-off-by: Klaus Aehlig <[email protected]> > --- > Makefile.am | 2 ++ > test/data/htools/hspace-groups-one.data | 14 ++++++++++++++ > test/data/htools/hspace-groups-two.data | 16 ++++++++++++++++ > test/hs/shelltests/htools-hspace.test | 17 +++++++++++++++++ > 4 files changed, 49 insertions(+) > create mode 100644 test/data/htools/hspace-groups-one.data > create mode 100644 test/data/htools/hspace-groups-two.data > > diff --git a/Makefile.am b/Makefile.am > index a76f87a..199d741 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -1234,6 +1234,8 @@ TEST_FILES = \ > test/data/htools/hbal-evac.data \ > test/data/htools/hbal-excl-tags.data \ > test/data/htools/hbal-split-insts.data \ > + test/data/htools/hspace-groups-one.data \ > + test/data/htools/hspace-groups-two.data \ > test/data/htools/hspace-tiered-dualspec-exclusive.data \ > test/data/htools/hspace-tiered-dualspec.data \ > test/data/htools/hspace-tiered-exclusive.data \ > diff --git a/test/data/htools/hspace-groups-one.data > b/test/data/htools/hspace-groups-one.data > new file mode 100644 > index 0000000..8970b98 > --- /dev/null > +++ b/test/data/htools/hspace-groups-one.data > @@ -0,0 +1,14 @@ > +group-01|fake-uuid-01|preferred|| > + > +node-01-001|2049|0|1|3073|1|16|N|fake-uuid-01|1||N|0|1 > +node-01-002|2049|0|1025|3073|1|16|N|fake-uuid-01|1||N|0|1 > +node-02-001|2049|0|2049|2049|2049|16|N|fake-uuid-01|1||N|0|1 > +node-02-002|2049|0|2049|2049|2049|16|N|fake-uuid-01|1||N|0|1 > + > +old-0|1024|1024|1|running|Y|node-01-001|node-01-002|drbd||1|1 > +old-1|1024|1024|1|running|Y|node-01-002|node-01-001|drbd||1|1 > +old-2|1024|1024|1|running|Y|node-01-001|node-01-002|drbd||1|1 > + > + > +|1024,1,1024,1,1,1|1024,1,1024,1,1,1;2048,8,2048,16,8,12|drbd|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/data/htools/hspace-groups-two.data > b/test/data/htools/hspace-groups-two.data > new file mode 100644 > index 0000000..97bf62b > --- /dev/null > +++ b/test/data/htools/hspace-groups-two.data > @@ -0,0 +1,16 @@ > +group-01|fake-uuid-01|preferred|| > +group-02|fake-uuid-02|preferred|| > + > +node-01-001|2049|0|1|3073|1|16|N|fake-uuid-01|1||N|0|1 > +node-01-002|2049|0|1025|3073|1|16|N|fake-uuid-01|1||N|0|1 > +node-02-001|2049|0|2049|2049|2049|16|N|fake-uuid-02|1||N|0|1 > +node-02-002|2049|0|2049|2049|2049|16|N|fake-uuid-02|1||N|0|1 > + > +old-0|1024|1024|1|running|Y|node-01-001|node-01-002|drbd||1|1 > +old-1|1024|1024|1|running|Y|node-01-002|node-01-001|drbd||1|1 > +old-2|1024|1024|1|running|Y|node-01-001|node-01-002|drbd||1|1 > + > + > +|1024,1,1024,1,1,1|1024,1,1024,1,1,1;2048,8,2048,16,8,12|drbd|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 > > +group-02|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 59846da..1f2525a 100644 > --- a/test/hs/shelltests/htools-hspace.test > +++ b/test/hs/shelltests/htools-hspace.test > @@ -56,3 +56,20 @@ > # VCPU-dominated allocation > ./test/hs/hspace --machine-readable -t > $TESTDATA_DIR/hspace-tiered-vcpu.data > $T/capacity && sh -c ". $T/capacity > && test \"\${HTS_TSPEC}\" = '32768,65536,4,12=4 32768,65536,2,12=2' && test > \"\${HTS_ALLOC_INSTANCES}\" = 10" > >>>=0 > + > +# Presence of overfull group > +./test/hs/hspace -t $TESTDATA_DIR/hspace-groups-one.data > +>>>/0 instances allocated/ > +>>>=0 > + > +./test/hs/hspace --independent-groups -t > $TESTDATA_DIR/hspace-groups-one.data > +>>>/0 instances allocated/ > +>>>=0 > + > +./test/hs/hspace -t $TESTDATA_DIR/hspace-groups-two.data > +>>>/0 instances allocated/ > +>>>=0 > + > +./test/hs/hspace --independent-groups -t > $TESTDATA_DIR/hspace-groups-two.data > +>>>/2 instances allocated/ > +>>>=0 > -- > 2.0.0.526.g5318336 > >
