Statistics
| Branch: | Tag: | Revision:

root / test @ 361f2719

# Date Author Comment
361f2719 05/10/2013 01:53 pm Klaus Aehlig

Fix expectation in hroller test

Regular expressions are not shell globs. So "any symbol" is expressed
by a dot, not a question mark. In this case, the confusion lead to a
too liberal expectation, hence the test passed. Fix it nevertheless.

Signed-off-by: Klaus Aehlig <>...

62441832 05/07/2013 06:59 pm Klaus Aehlig

Add a test demonstrating the --node-tags option of hroller

The example is a cluster of 6 nodes, paired into 3 group by three
instances. So the whole cluster would need two reboot groups. The two
tags select, in two different ways, one node of each group. So, when...

e6e2d4a5 05/07/2013 06:58 pm Klaus Aehlig

Add tests for the -O option of hroller

In hroller, the option -O can be used to mark certain nodes as offline.
These nodes should then not be part of any reboot group. Add tests
to verify this behavior.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Guido Trotter <>

47e0abee 05/06/2013 11:47 am Thomas Thrainer

Split DRBD8Dev into DRBD8 and DRBD8Dev

All functionality specific to a single DRBD8 devide is now in DRBD8Dev,
whereas functionality which is valid for the whole DRBD "installation"
on a device is collected in DRBD8.

This makes it possible to remove a couple of FIXME's and clarifies the...

239364d0 05/06/2013 11:30 am Thomas Thrainer

Rename DRBD8 to DRBD8Dev

Right now the DRBD8 class has multiple responsibilities: a) it
reprensents a device which can be set up, grown, etc. and b) it
represents the whole DRBD system on a node which has a usermode helper,
which knows how to shut down all devices, etc. Therefore, the DRBD8Dev...

5bb0a1cb 05/06/2013 11:30 am Thomas Thrainer

Make DRBD version queryable from noded

gnt-cluster verify should issue a warning if there are multiple DRBD
versions present in a node group. In order to do so, the DRBD version
has to be queryable from noded.

Signed-off-by: Thomas Thrainer <>...

f2d87a5e 05/03/2013 04:47 pm Michele Tartara

Merge remote-tracking branch 'origin/stable-2.8'

Conflicts:
lib/bdev.py
lib/cmdlib.py

Signed-off-by: Michele Tartara <>
Reviewed-by: Klaus Aehlig <>

9db0b351 05/03/2013 03:25 pm Bernardo Dal Seno

Disk templates are "allowed" and not "enabled" in ipolicies

The way disk templates were displayed in instance policies became confusing
since the introduction of the enabled_disk_templates cluster parameter.

Fix issue 440.

Signed-off-by: Bernardo Dal Seno <>...

f73f3567 05/03/2013 03:23 pm Bernardo Dal Seno

Unit test for FillIPolicy keeping unknown keys

This makes sure that issue 401 doesn't come back.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

516a0e94 04/30/2013 06:38 pm Michele Tartara

Add reason trail to haskell opcode format

The haskell type definition of opcodes should remain aligned with the python
one.

Signed-off-by: Michele Tartara <>
Reviewed-by: Helga Velroyen <>

5519f036 04/29/2013 11:13 pm Bernardo Dal Seno

Merge branch 'stable-2.8' into master

  • stable-2.8: (42 commits)
    Add shelltests for hspace allocation
    hspace: Handle multiple ipolicy specs
    QA: Test multiple instance specs
    QA: Handle multiple instance specs
    Unit test for cli.FormatPolicyInfo()...
daec28a7 04/29/2013 07:05 pm Thomas Thrainer

Add command generator for DRBD 8.4

The DRBD84CmdGenerator class, which generates commands suited for DRBD
8.4, is added. A common baseclass for DRBD83CmdGenerator and
DRBD84CmdGenerator is introduced as well.

Signed-off-by: Thomas Thrainer <>...

74db37c0 04/29/2013 07:05 pm Thomas Thrainer

Add test for version dispatching code

Based on the version of DRBD (as reported through /proc/drbd), the DRBD8
class chooses helper objects which adapt for the differences between
DRBD <= 8.3 and DRBD 8.4. This new test verifies that the proper objects
are created....

873878b9 04/29/2013 07:05 pm Thomas Thrainer

Extract DRBD related tests

As the DRBD code was extracted from bdev.py, the corresponding tests
should as well be extracted into their own file. That's what this patch
performs.

Signed-off-by: Thomas Thrainer <>
Signed-off-by: Michele Tartara <>...

09a78e1c 04/29/2013 07:05 pm Thomas Thrainer

Extract command generation logic from DRBD8

In order to easily support the DRBD 8.4 command syntax, this patch
extracts all command generation logic (i.e. where calls to `drbdsetup`
are assembled) into a new class DRBD83CmdGenerator.

Signed-off-by: Thomas Thrainer <>...

5520d04d 04/29/2013 07:05 pm Thomas Thrainer

Add `drbdsetup show` parser for DRBD 8.4

Common functionality between the DRBD 8.3 and DRBD 8.4 parser has been
extracted into BaseShowInfo. A test which verifies the behaviour is
included, but the DRBD84ShowInfo class is not yet used within the DRBD8
class....

27d69b25 04/29/2013 07:05 pm Thomas Thrainer

Extract DRBD info parsing into drbd_info.py

Parsing the status (/proc/drbd) and `drbdsetup show` output takes quite
a bit of code, which has to be augmented by even more with the DRBD 8.4
support. So extract all the related classes into their own file.

Signed-off-by: Thomas Thrainer <>...

d01e51a5 04/29/2013 07:05 pm Thomas Thrainer

Extract DRBD8ShowInfo class

This class parses the `drbdsetup show` output and represents it in an
easily accessible format. It got extracted so that 1) the DRBD8 class
can focus more on DRBD logic rather than parsing and 2) it's easier to
adapt the parser to new formats....

efa6dd08 04/29/2013 07:05 pm Thomas Thrainer

Add test for DRBD 8.4 /proc/drbd parsing

The current parser already supports the output of DRBD 8.4 /proc/drbd,
so add tests which actually verify this behaviour.
Note that the empty lines in proc_drbd84.txt are actually present in the
output of DRBD 8.4, they always appear when minors are not contiguous....

d41efc42 04/29/2013 07:05 pm Thomas Thrainer

Add test for empty version in /proc/drbd

The previous patch removed a (rather implicit) test for /proc/drbd not
containing a version line. This adds an explicit test for this case.

Signed-off-by: Thomas Thrainer <>
Signed-off-by: Michele Tartara <>...

2fe690f1 04/29/2013 07:05 pm Thomas Thrainer

Extract /proc/drbd parsing code into DRBD8Info

As the DRBD8 class got bigger due to the previous merge of BaseDRBD, now
parts of it are ripped out into DRBD8Info. This new class parses
/proc/drbd and exposes the information in an easily accessible way. This...

fd300bc7 04/29/2013 07:05 pm Thomas Thrainer

Remove BaseDRBD

BaseDRBD was probably useful when DRBD 0.7 and DRBD 8 were supported.
However, there is only one subclass of BaseDRBD remaining (DRBD8), and
the separation of responsibilities between those two classes was rather
randomly chosen.

The unification into one class also eases the introduction of...

38396ae2 04/29/2013 07:04 pm Thomas Thrainer

Rename _MassageProcData to _JoinProcDataPerMinor

That's what the method actually does, so there is no reason why we
should use a funny but unreadable name.

Signed-off-by: Thomas Thrainer <>
Signed-off-by: Michele Tartara <>...

8abeb641 04/29/2013 06:55 pm Bernardo Dal Seno

Add shelltests for hspace allocation

Both tiered and standard allocations are tested, with a single and a double
min/max instance specification.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

65978cb7 04/29/2013 06:54 pm Bernardo Dal Seno

Unit test for cli.FormatPolicyInfo()

We try to parse the string obtained by formatting a policy, and see if we
get the same policy.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

ef99e3e8 04/29/2013 06:54 pm Bernardo Dal Seno

Add command-line support for multiple specs in ipolicy

Command line options accept multiple min/max specifications in instance
policies. The output of show-ispecs-cmd is updated accordingly.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

41044e04 04/29/2013 06:53 pm Bernardo Dal Seno

Add multiple min/max specs in instance policy

Now instance policies can contain more than one min/max specs. This is the
main element of the "Constrained instance sizes" section in the
"Partitioned Ganeti" design doc.

This is a big patch, but changing the type of a configuration item requires...

b342c9dd 04/29/2013 06:53 pm Bernardo Dal Seno

Separate checks for std spec compliance

This is needed to be able to validate the std spec against multiple min/max
spec pairs (appearing in next patches).

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

95990bc5 04/24/2013 07:53 pm Klaus Aehlig

Merge branch 'stable-2.7' into stable-2.8

Conflicts:
NEWS
doc/rapi.rst

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Guido Trotter <>

1fa6fcba 04/24/2013 02:44 pm Michele Tartara

Reason trail implementation for "start"

Opcode-specific implementation of the reason trail for the instance
startup operation.

Signed-off-by: Michele Tartara <>
Reviewed-by: Guido Trotter <>

1f350e0f 04/24/2013 02:44 pm Michele Tartara

Reason trail implementation for "shutdown"

Opcode-specific implementation of the reason trail for the instance shutdown
operation.

Signed-off-by: Michele Tartara <>
Reviewed-by: Guido Trotter <>

cd315ad9 04/24/2013 01:05 pm Bernardo Dal Seno

Add unit tests for cfgupgrade with a real configuration

Test upgrade and downgrade from a realistic 2.7 configuration.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

fa166f67 04/24/2013 01:05 pm Bernardo Dal Seno

Split functions in cfupgrade unit tests

This makes easier to test real configurations.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

919db916 04/24/2013 01:02 pm Bernardo Dal Seno

Limit specs in ipolicy command lines are always complete

Command line options are brought in line with the specs change of previous
patch. Old options are still allowed in gnt-cluster init, where the
semantic will remain non-ambiguous even after introducing multiple specs....

62fed51b 04/24/2013 01:02 pm Bernardo Dal Seno

Refactor tests in ipolicy validation

This makes the code more modular, in preparation for the following patches.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

0f511c8a 04/24/2013 01:02 pm Bernardo Dal Seno

Limit specs in instance policies are always complete

Specs used to specify limits in instance policies are always complete, even
at group level (only the whole limit set can be overridden). This is in
preparation for introducing multiple limits.

Signed-off-by: Bernardo Dal Seno <>...

d2d3935a 04/24/2013 01:02 pm Bernardo Dal Seno

Add --ipolicy-xxx-specs options

These options allow to specify whole instance policy specs. This is needed
for the upcoming changes that tend to threat specs as monolithic objects.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

ea9d3b40 04/24/2013 01:02 pm Bernardo Dal Seno

Add command to print ipolicy options

The output of this command can be used to create an exact copy of the
current instance policy specs. The command could be expanded to print all
the options used to create a group or the cluster.

Signed-off-by: Bernardo Dal Seno <>...

726ae450 04/24/2013 01:02 pm Bernardo Dal Seno

New CLI input type: list of key/value pairs

This will be used for the new instance specs options.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

f824ae42 04/24/2013 01:01 pm Bernardo Dal Seno

Allow "default" as a value for ipolicy templates

Previously the string value was being corrupted.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

89ff748d 04/24/2013 11:00 am Thomas Thrainer

Extract DRBD-related classes into block/drbd.py

This is in preparation to introducing support for DRBD8.4.
base.py had to be extracted as well in order to avoid cylic imports
between bdev.py and drbd.py. It now contains the BlockDev class and
utility functions needed by bdev.py and drbd.py....

ce9283c1 04/24/2013 10:59 am Thomas Thrainer

Move lib/bdev.py to lib/block/bdev.py

That's in preparation of extracting DRBD related code from bdev.py. As
bdev.py is already rather long, new features will require to split it
into more manageable pieces. That's why it's moved in an own directory.

Signed-off-by: Thomas Thrainer <>...

30dd3377 04/22/2013 07:43 pm Klaus Aehlig

Extend the simulation backend to also simulate a master node

In a simulated cluster as created by the simulation backend to
the htools, make the first node of the first node group the master
node. In this way, hools (like hroller) that require a master node...

754b9b1c 04/22/2013 07:43 pm Klaus Aehlig

Add unit tests for hroller

Add a unit test for hroller in a situation where the order
is completely determined. There are 3 nodes where node 2 has,
for each of the other nodes, an instanced shared with it. So
node 2 has to be a reboot group of its own. There are no more...

55cec070 04/22/2013 02:19 pm Michele Tartara

Reason trail implementation for instance reboot

This commits allows ganeti to correctly forward the reason trail information
regarding instance reboot.

Signed-off-by: Michele Tartara <>
Reviewed-by: Helga Velroyen <>

aa922d64 04/22/2013 02:10 pm Michele Tartara

Remove old "reason" implementation

Remove the useless parts of the old, partial, implementation of the support for
tracking the reason of instances state change, before implementing the new
reason trail support, as per the design document.

Signed-off-by: Michele Tartara <>...

7dbe4c72 04/19/2013 02:54 pm Klaus Aehlig

Make hroller insist on finding precisely one master node

As people rely on the master node being the last node of the last
group, make hroller fail, if no master node could be found in the
cluster. This happens, e.g., if a backend format is used that does not...

3c1a8730 04/17/2013 07:04 pm Christos Stavrakakis

Add nic/disk name and UUID fields in Haskell code

Add name and uuid fields to Disk and nic Haskell objects. Also,
since they now have an UUID, make them instances of UuidObject.

Signed-off-by: Christor Stavrakakis <>
Reviewed-by: Helga Velroyen <>

4e4433e8 04/17/2013 07:04 pm Christos Stavrakakis

Add name to INicParams and IDiskParams

This commits adds name to NIC and Disk modification definition.

Signed-off-by: Chris Stavrakakis <>
Reviewed-by: Helga Velroyen <>

090128b6 04/17/2013 07:04 pm Christos Stavrakakis

Update QA tests to check disk and NIC names

Modify existing tests to use the name option for instance disks. The
configuration options 'disk' and 'disk-growth' are merged into a single
'disks' option, which is a list of dictionaries with 'size', 'growth' and...

651cc3e2 04/17/2013 05:49 pm Christos Stavrakakis

Check that device names are unique and valid

Extend the CheckArguments phase of LUInstanceCreate and CheckPrereq
phase of LUInstanceSetParams to also check if the name parameters of
disks and NICs are unique and valid.

Signed-off-by: Christos Stavrakakis <>...

b21d488b 04/17/2013 05:49 pm Christos Stavrakakis

Support UUIDs and names when refering to a device

Modify _ApplyContainerMods function to lookup NICs/Disks not only by their
index inside the container, but also by their UUID or name. Abstract the
lookup code in new GetItemFromContainer function.

Make type of identifier in "opcode._TestInstSetParamsModList" to be...

68d95757 04/17/2013 09:27 am Guido Trotter

Move HooksMaster out of the mcpu module

We need to do this, so that backend.py doesn't need to import mcpu, and
thus indirectly cmdlib. This reduces the size of the node daemon by
about half, which is very important as it is pinned in memory.

This solves Issue 419....

02cff8aa 04/15/2013 01:17 am Bernardo Dal Seno

QA: Decision about disk templates to use is more modular

qa_config.IsTemplateSupported() is already used to decide which disk
templates are supported by QA. Enabled templates now are part of that
decision.

Unit tests are updated.

Signed-off-by: Bernardo Dal Seno <>...

b0ef4593 04/12/2013 12:03 pm Klaus Aehlig

Adapt test data to changed ipolicy format

The test data for hail allocating a multi-disk instance was
originally added in the 2.7 branch. On master the format
of the ipolicy had changed; "min" and "max" are no longer
top-level of the ipolicy, but instead below the "minmax"...

723ec678 04/12/2013 12:31 am Guido Trotter

Merge branch 'devel-2.7'

  • devel-2.7: (26 commits)
    Fix burnin install path
    Fix format of the NEWS file
    NEWS: Add news entry for the hail disk policy fix
    Add shelltests verifying hail applies disk ipolicy per disk
    Make the disks parameter available to the constructor...
9c8c69bc 04/11/2013 11:53 pm Helga Velroyen

Removes obsolete 'enabled storage types'

Since managing of different storage units is now done using
disk templates and not storage types, we remove the obsolete
enabled storage types.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Michele Tartara <>

66af5ec5 04/11/2013 11:52 pm Helga Velroyen

gnt-cluster modify: modify enabled disk templates

Adds setting of the list of enabled disk templates to 'gnt-cluster modify'.
Note that this does not yet include any verification regarding disk templates
currently used by instances.

Signed-off-by: Helga Velroyen <>...

e0d15aae 04/11/2013 05:10 pm Klaus Aehlig

Add shelltests verifying hail applies disk ipolicy per disk

We test on two minimal examples, a positive and a negative one, where
the possibility to allocate a node depends on whether the disk policy
is checked on a per-disk level or on the total amount of disk space...

241cea1e 04/11/2013 05:10 pm Klaus Aehlig

Make the disks parameter available to the constructor

In that way, tools building on Instance will benefit from the corrected
verification semantics of the instance policy on disk space.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Guido Trotter <>

be0cb2d7 04/08/2013 10:50 am Michele Tartara

Properly export errors while reading job list

In case of problems while reading the job list from disk (such as permission
errors) confd would silently fail, writing a warning on the log file but
sending an empty list and no error message to the client.
...

a29fcf38 04/05/2013 05:35 pm Michele Tartara

Fix a bug in the Runtime tests

A group name was erroneusly inserted in the list of user names.

Signed-off-by: Michele Tartara <>
Reviewed-by: Guido Trotter <>

d2204b1a 04/02/2013 02:01 pm Klaus Aehlig

Add parameter pnode to OpInstanceSetParams

This parameter will be used to set the new primary node
of an instance, assuming that the disks have been moved
by other means (outside ganeti's control).

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Guido Trotter <>

64760879 03/27/2013 12:47 pm Bernardo Dal Seno

Unit tests for config.ConfigWriter.VerifyConfig()

The test is aimed mostly at instance policies, which changed recently.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

da5f09ef 03/27/2013 12:46 pm Bernardo Dal Seno

Refactor ispecs in ipolicy structures

Minimum and maximum instance specs are put together into a single element
of the instance policy. This is in preparation for introducing multiple
min/max specs.

Signed-off-by: Bernardo Dal Seno <>...

1709435e 03/27/2013 12:46 pm Bernardo Dal Seno

cfgupgrade: Add --downgrade option

It's now possible to go back to the previous stable version. Unit tests
provided.

This is mostly useful during development, when going from master to
stable/devel.

Signed-off-by: Bernardo Dal Seno <>...

a6fdce9e 03/27/2013 12:45 pm Bernardo Dal Seno

Unit test for cli.CreateIPolicyFromOpts()

Useful for subsequent patches.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

4d99964c 03/26/2013 01:57 pm Bernardo Dal Seno

Generic function to print data for gnt-xxx info

The function produces a human-readable output, which is also a valid YAML
file, from an intermediate data structure. This will be used by "gnt-xxx
info" commands. The output of "gnt-xxx info" was almost YAML-compliant, and...

61f8fda4 03/22/2013 05:06 pm Michele Tartara

Fix bug in rlib2 unit tests

The "queryargs" parameter of the init function of rlib2 classes should
be a dictionary, as defined in the ResourceBase parent class (in
lib/rapi/baserlib.py).

In the rlib2 and baserlib unit tests, when the queryargs parameter is not...

c270ee07 03/21/2013 05:41 pm Helga Velroyen

gnt-cluster modify: dis/enabling storage types

This patch extends the 'gnt-cluster modify' command to manipulate the list
of enabled storage types. Note that this currenlty does no validation
with respect to whether or not there are instances currently using a storage...

13cc7b84 03/21/2013 10:49 am Michele Tartara

Add the core of the monitoring daemon

This commit adds the core infrastructure of the monitoring daemon,
and integrates it in the build and test systems.

The actual functionality of the monitoring daemon is still completely
missing.

Signed-off-by: Michele Tartara <>...

f511082f 03/13/2013 02:23 pm Michele Tartara

Add Mond to the list of possible daemons

Also, add its logfiles and extra log files.

Signed-off-by: Michele Tartara <>
Reviewed-by: Iustin Pop <>

a8828704 03/13/2013 02:23 pm Michele Tartara

Add infrastructure for allowing additional logfiles

Some daemons will need more than the single logfile that is currently
allowed. This patch introduces the infrastructure to allow this.

Signed-off-by: Michele Tartara <>
Reviewed-by: Iustin Pop <>

c81b97f2 03/12/2013 06:16 pm Iustin Pop

Make gnt-node list -o(p|s)inst_list output stable

Currently, both the Python and Haskell code return the internal
instance list unsorted, which means the output can vary depending on
the phase of the moon (well, the Haskell code actually uses internally
a tree, sorted by the instance name, but it's implementation detail)....

147fd319 03/12/2013 06:16 pm Iustin Pop

Expand TestHelper to allow non-underscore prefixes

HLint 1.8.28 requires us to always add "ignore CamelCase", which can
be problematic sometimes (e.g. when using OverloadedStrings). Let's
expand TestHelper to also support less-standard 'caseFooBar' names, so...

b1b4a26b 03/12/2013 06:16 pm Iustin Pop

Change to CamelCase format in Test/Ganeti/Objects.hs

This is in preparation for using OverloadedString extensions in this
file, which conflicts with hlint 1.8.28's handling of annotations.

Signed-off-by: Iustin Pop <>
Reviewed-by: Helga Velroyen <>

3a991f2d 03/12/2013 06:16 pm Iustin Pop

Add simple Ip4Address/Ip4Network types

This patch adds some very simple IPv4 address/network types, and uses
them in the 'Network' config object.

We need these in order to properly compute the reserved IP addresses,
without depending on an external library (which I haven't found, by...

46d21495 03/12/2013 01:32 pm Bernardo Dal Seno

Merge branch 'devel-2.7'

  • devel-2.7
    Add QA for instance creation with policy violation
    Add QA for policy-instance interactions
    Add QA for cluster policies
    Unit tests for objects.InstancePolicy + a fix
    Unit tests for objects.FillIPolicy() + small fix...
ba5c6c6b 03/11/2013 08:57 pm Bernardo Dal Seno

Unit tests for objects.InstancePolicy + a fix

Tests for:
objects.InstancePolicy.CheckParameterSyntax()
objects.InstancePolicy.CheckDiskTemplates()
objects.InstancePolicy.CheckISpecSyntax()

Instance policies with an empty disk-template list now are reported....

e38bc4eb 03/11/2013 08:57 pm Bernardo Dal Seno

Unit tests for objects.FillIPolicy() + small fix

IPOLICY_DEFAULTS is now a legal policy (the disk-templates entry was a set
instead of a list, before).

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Guido Trotter <>

4f7e5a1d 03/11/2013 08:57 pm Bernardo Dal Seno

Fix upgrade of policy in objects.Cluster

Unknown elements were silently removed on startup. This means that a
software upgrade could result in lost configuration information if
cfgupgrade wasn't run promptly.

Added unit test for Cluster.UpgradeConfig() to cover this case....

2477c1c5 03/11/2013 08:56 pm Bernardo Dal Seno

Fix instance policy checks for default back-end parameters

Policy violations of back-end parameters that used the cluster default
value were not reported in cluster-verify.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Guido Trotter <>

5dd7d15b 03/11/2013 08:56 pm Bernardo Dal Seno

Unit tests for cmdlib._GetUpdatedIPolicy()

Not 100% coverage, though.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Guido Trotter <>

cc4b2676 03/11/2013 08:56 pm Bernardo Dal Seno

Fix policy check for disk templates

Instance disk template is checked against the policy, and diskless
instances aren't checked for the number of disks.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Guido Trotter <>

9b154e2b 03/05/2013 06:15 pm Iustin Pop

Merge branch 'devel-2.7'

  • devel-2.7:
    Update required pylint version
    Constants.hs.in: improve Haddock markup in the template
    convert-constants: generate better Haddock markup
    Expand Haddock to run over test files as well

Conflicts:
Makefile.am (curl changes and new hs directories)...

7ddd8e4c 03/05/2013 05:53 pm Iustin Pop

Expand Haddock to run over test files as well

This patch does multiple enhancements to the way we build the Haddock
docs, motivated by the fact that if we don't run Haddock over test
files as well, bad formatting can be submitted and will accumulate
over time (without any checks)....

491d02ca 03/05/2013 01:56 pm Iustin Pop

Merge branch 'devel-2.7'

  • devel-2.7: (23 commits)
    Add export lists for files which didn't have them
    Fix Haskell compatibility tests with disabled file storage
    Fix QA with disabled file storage
    Fix convert-constants handling of booleans
    Fix handling of disabled (shared) file storage...
c56dd17b 03/05/2013 11:03 am Iustin Pop

Switch LispConfig double comparison to relative error

This further improves the comparison for "non-trivial"
numbers. Without this patch, there are still cases where the absolute
error is too big, and we need to switch to relative error.

Concept has been taken from...

1fe0e999 03/04/2013 06:39 pm Iustin Pop

Make the XmParser config test runtime more consistent

Currently, the test uses a frequency of 5 string/5 double/1 list for
generating Arbitrary instances of ListConfig. However, the list case
has simply a "choose (1, 20)" `vectorOf` arbitrary, which means it...

a7e76dc3 03/04/2013 06:39 pm Iustin Pop

Improve output of the XmParser config test

Currently, this tests and its helper function 'isAlmostEqual' uses
plain booleans to signify failures, which means you can't really debug
a failed test. The patch changes the call chain to use annotated
properties all through, which results in messages like:...

91c1a265 03/04/2013 06:10 pm Iustin Pop

Fix node partial name matching in Haskell code

This implements QffHostname and fixes the node listing (as well as
export listing when filtering on node name).

This bug was hidden by the fact that node listing with "gnt-node list
aa" works if you don't have live queries (as it was originally), as...

e7124835 03/04/2013 06:09 pm Iustin Pop

Fix bug in group queries related to node/instance fields

Since we use the primitive string type for group UUIDs, the group
fields have a bug where we pass the group name as filter for node
tests, whereas the nodes themselves use the group UUID. This results...

36162faf 03/04/2013 06:08 pm Iustin Pop

Rename/make uniform the other query entities

Following the new naming style introduced in Exports.hs, this patch
renames the other resources to export non-qualified names (fieldMap as
opposed to nodeFieldMap), and to use qualified module imports.

Also fixes a haddock issue in a docstring....

dde85e1e 03/04/2013 05:59 pm Iustin Pop

Add export lists for files which didn't have them

Two test helper files didn't have export lists (lost during the split
of tests). This patch finally reintroduces them, to hopefully make the
export list saner and with fewer changes for purely-internal changes....

3cbd5808 03/04/2013 05:18 pm Iustin Pop

Fix Haskell compatibility tests with disabled file storage

When file storage is disabled at ./configure time, we shouldn't pass
opcodes containing DTFile/DTSharedFile/StorageFile to Python for
validation, as they will fail.

This patch implements this by simply tweaking the Arbitrary instances...

91c17910 03/04/2013 12:35 pm Iustin Pop

Allow rpc.MakeLegacyNodeInfo to parse non-LVM results

'MakeLegacyNodeInfo' is not the best place for this, but we'd have to
duplicate it if we wanted a LVM-less version, so the easiest is to add
an optional parameter that allows it to accept/skip LVM-less results....

5c1ae836 02/27/2013 11:47 pm Guido Trotter

Test AsyncStreamServer with abstract unix sockets

This was meant to be since "the beginning" but was never submitted as
somehow it failed with python 2.4. Now that the minimum python version
has been increased it can be added.

Signed-off-by: Guido Trotter <>...

c072e788 02/27/2013 03:11 pm Michael Hanselmann

qa_config: Support callable test checks

Until now all tests depended on simple AND/OR conditions. With the
introduction of virtual cluster support, some tests can only run if
virtual clusters are not in use (e.g. not yet supported or not
possible). Instead of introducing more logic for enabling/disabling...

76fda900 02/27/2013 03:11 pm Michael Hanselmann

QA: Add config entries for virtual cluster

If these new options are set, a virtual cluster is created and used.
Virtual clusters consist of 1..N virtual nodes on a single physical (or
virtual) node. The design of virtual clusters is described in
“doc/design-virtual-clusters.rst”....

a82d9394 02/25/2013 02:52 pm Michael Hanselmann

Fix style violations in commit 4a90bd4, small changes

- Commit 4a90bd4 contained a rather large number of style violations:
- Indentation/sequence formatting
- Wrapping of long lines
- Docstrings whose first line was wrapped
- A stray backslash in a docstring...