Statistics
| Branch: | Tag: | Revision:

root / lib @ 27c7d9c3

# Date Author Comment
27c7d9c3 04/29/2013 07:05 pm Thomas Thrainer

Use DRBD84ShowInfo based on DRBD version

Now the DRBD8 class actually checks which version of DRBD is running on
the system and chooses the right class to parse the `drbdsetup show`
output.

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

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....

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

Rename _JoinProcDataPerMinor to _JoinLinesPerMinor

In the new context of the DRBD8Info class, the name
_JoinProcDataPerMinor doesn't fit any more. _JoinLinesPerMinor reflects
more precisely what's done, and doesn't imply that the data comes from
/proc/drbd....

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 <>...

decf86f9 04/26/2013 05:39 pm Helga Velroyen

Make DEFAULT_ENABLED_DISK_TEMPLATES a list

This patch makes the constant DEFAULT_ENABLED_DISK_TEMPLATES
a list instead of a set, because the order of the elements actually matters
as the first one is planned to be the default disk template for instance
creation. Also, this constant is always used like a list and thus providing it...

2d237e93 04/26/2013 05:12 pm Helga Velroyen

Fix lint error in cmdlib

Was accidentally introduced by commit 912737ba.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Guido Trotter <>

912737ba 04/26/2013 04:34 pm Helga Velroyen

gnt-cluster modify/init: deprecate --no-lvm-storage

This patch does three things:

1. It deprecates the option '--no-lvm-storage' of 'gnt-cluster modify'
and 'gnt-cluster init'. Technically, it is not fully removed, but kept in order
to warn the user that it is no longer supported and that she should use...

59ef0f15 04/26/2013 04:34 pm Helga Velroyen

Utility functions for storage

This patch add a couple of utility functions dealing with
storage types and disk templates.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Guido Trotter <>

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 <>...

bbfa259c 04/23/2013 12:17 pm Michele Tartara

Make burnin compatible with the reason trail

The burnin uses its own option list, different from the one of all other
command line programs, and uses it as a parameter to a function that now
requires the "--reason" option to be present.

This commit updates the burnin option list to be compatible with the reason...

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 <>

9b4cb29d 04/22/2013 02:18 pm Michele Tartara

Add "reason" as a common parameter for all the RAPI calls

Also, this add an infrastructure for having parameters common to all the
RAPI calls.

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

da3faf9d 04/22/2013 02:18 pm Michele Tartara

Add infrastructure for adding common RAPI parameters

Some parameters can be common to all the RAPI calls: this commit
adds the possibility of specifying them just once, instead of
manually adding them to the classes describing each call.

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

e0f2bf1e 04/22/2013 02:17 pm Michele Tartara

Add job_id and index to the reason trail

The reason trail will contain an item indicating the job_id and the
index number of the current opcode inside the job queue.

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

276e51bd 04/22/2013 02:16 pm Michele Tartara

Add the reason trail to the opcodes

The reason trail is available for all the opcodes, and as such it is
initialized as a generic option.

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

dbae804a 04/22/2013 02:14 pm Michele Tartara

Add a field to store the reason trail in OpCodes

The reason trail will be available for all the OpCodes, so the field that
is to contain it has to be added to the OpCode base class.

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

aa4fff02 04/22/2013 02:13 pm Michele Tartara

Provide "--reason" as a parameter for all commands

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

8e00f36a 04/22/2013 02:13 pm Michele Tartara

Add function for extending the reason trail

Noded functions will have to extend the reason trail specifying what
operation is being executed.

This commit adds a function for doing that (will be used by future commits).

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

d634b4e0 04/22/2013 02:12 pm Michele Tartara

Add an opcode name conversion function

Add a function to convert an opcode class name to a source string for the
reason trail, factoring out the code in common with the existing _NameToId
function.

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

584ea340 04/22/2013 02:11 pm Michele Tartara

Add function for storing the reason trail of an instance

We are interested in storing the reason trail for operations that changed
the state of instances. This commit adds a function to do this.

Also, the GetInstReasonFilename() function name is prepended with an...

c28911dd 04/22/2013 02:11 pm Michele Tartara

Add function for getting the timestamp in nanoseconds

The timestamp is returned as an integer number of nanoseconds since the Unix
epoch.

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

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

Add TMaybeList as a new type for parameters

This will be used as the type for the reason trail parameter.

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

1cc55342 04/22/2013 02:10 pm Michele Tartara

Add constants for the reason trail implementation

A few constants are required, describing the source reason of the opcode.

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 <>...

fcbd025c 04/17/2013 07:04 pm Christos Stavrakakis

Display UUIDs and names in gnt-instance info

Modify gnt-instance client to display the UUID and name
fields of instances disks and NICs.

Signed-off-by: Christos Stavrakakis <>
Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

b87a9c5f 04/17/2013 07:04 pm Christos Stavrakakis

Add Disks and NICs to _AllUUIDObjects

Since disks and NICs have UUIDs, they must be considered
to _AllUUIDObjects.

Signed-off-by: Christos Stavrakakis <>
Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

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

Support quering for devices names and UUIDs

Extend instance queries to list 'uuid' and 'name' fields of instance's
Disks and NICs.

Signed-off-by: Christos Stavrakakis <>
Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

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 <>...

7e9e5ffc 04/17/2013 05:49 pm Christos Stavrakakis

Implement renaming Disks and NICs

Implement renaming Disks and NICs in LUInstanceSetParams. Remove code
that checked that changing disk mode was the only disk modification
supported. Also, handle case of 'None' value for 'name' parameter.

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...

2dd5390e 04/17/2013 05:49 pm Christos Stavrakakis

Support UUIDs and names when handling NICs/Disks

Handle UUID and name fields when creating/managing NICs and Disks. Also,
export NICs and Disks names to instance hooks environment.

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

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

Add IDISK_NAME and INIC_NAME constants

Declare IDISK_NAME and INIC_NAME constants and add them to the
IDISK_PARAMS_TYPE and INIC_PARAMS_TYPE.

Signed-off-by: Christos Stavrakakis <>
Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

238da95a 04/17/2013 05:48 pm Christos Stavrakakis

Add uuid and name slots to Disk/NIC ConfigObjects

This patch adds "uuid" and "name" slots to Disk and NIC ConfigObjects.

Signed-off-by: Christos Stavrakakis <>
Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Helga Velroyen <>

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...
2522c59e 04/11/2013 11:53 pm Helga Velroyen

Removes the 'sharedfile' storage type

Since storage type are supposed to represent the underlying technology
of disk templates, the storage type 'sharedfile' is superfluous, because
technically both disk templates 'file' and 'sharedfile' use the file system....

3da6e141 04/11/2013 11:53 pm Helga Velroyen

Consistency checks for config wrt disk templates

This patch adds consistency checks for the configuration regarding
disk templates. In particular, it checks that the list of enabled
disk templates is not empty, does not contain any bogus templates,
and that all instances use actually enabled disk templates....

e04ec58e 04/11/2013 11:53 pm Helga Velroyen

gnt-instance: no instance creation with disabled templates

This patch makes sure that no instances can be created which use
disk templates which are not enabled on the cluster.

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

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 <>

3bde79ee 04/11/2013 11:52 pm Helga Velroyen

gnt-cluster init: enabling of disk templates

This patch enhances 'gnt-cluster init' to accept a list of disk templates
to be enabled. It removes the list of enabled storage types.

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

83a309f9 04/11/2013 11:52 pm Helga Velroyen

gnt-cluster modify: verify instance's disk template usage

Adds a verification step to 'gnt-cluster modify' to make sure that no
disk template is disabled that is currently in use by at least one instance.

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

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 <>...

966e1580 04/11/2013 11:52 pm Helga Velroyen

gnt-cluster info: report enabled disk templates

Add reporting of the currently enabled disk templates to
'gnt-cluster info'.

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

1b02d7ef 04/11/2013 11:52 pm Helga Velroyen

Add enabled disk templates to cluster cfg

This patch adds constants for enabling disk templates to the constants,
and the cluster configuration in haskell and python. It removes the
obsolete preference list for enabled storage types.

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

f0583b66 04/11/2013 02:27 pm Michele Tartara

Properly update iv_name of disks while changing templates

Trasforming the disk of an instance from DRBD to plain did not properly
update the iv_name of disks, leaving it to None.

This commit modifies _ConvertDrbdToPlain to properly set the iv_name
variables....

59baad7a 04/10/2013 06:45 pm Helga Velroyen

Check minimum size of networks on creation

When creating a network, so far no size constraints were checked.
We now limit the size of a network to a /30 or bigger, although
tecnically, the ipaddr library supports even /32 networks.

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

06c056d3 04/10/2013 06:45 pm Helga Velroyen

Limit the size of networks to /16

This patch introduces an upper limit to the size of the networks that can
be created.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Guido Trotter <>

fe05a931 04/10/2013 06:09 pm Michele Tartara

Fix job queue directory permission problems

If split users are used, the queue directory could only be accessed
by masterd, but also confd needs to be able to read it, e.g. when it
is queried as part of "gnt-job list"

This commit fixes the permissions in such a way to allow proper access rights....

9e946416 04/10/2013 02:53 pm Klaus Aehlig

The disk size of a diskless instance is 0, not None

For diskless instances it is still reasonable to sum up the disk usage
of all the (zero) disks, resulting in the empty sum. This uniformity
also has the advantage that iallocators (like hail) do not have to do...

6cb65875 04/10/2013 12:18 pm Michele Tartara

Postpone non-urgent TODO from 2.7 to 2.9

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

801bccba 04/04/2013 12:28 pm Bernardo Dal Seno

gnt-group info uses a revised format

The code is more modular, the output is more similar to "gnt-cluster info"
and is YAML-compliant.

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

5f6d1b42 04/04/2013 12:28 pm Bernardo Dal Seno

gnt-node info uses a revised format

The code is more modular, and the output is YAML-compliant. QA has been
updated to reflect the new format.

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

f7f03738 04/04/2013 12:28 pm Bernardo Dal Seno

Remove unused code

After changing the way gnt-xxx info print their output,
cli.FormatParameterDict() is not used anymore.

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

d00884a2 04/04/2013 12:27 pm Bernardo Dal Seno

Refactor out function to format instance policy

The new function can be used for group-level instance policies. Support for
roman numeral formatting has been dropped to make the code simpler. For
other info items it's already unsupported, and it's not exactly documented...

2c398e80 04/04/2013 12:24 pm Bernardo Dal Seno

Fix help string for gnt-group info

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

0ea86154 04/03/2013 08:17 pm Klaus Aehlig

Restrict instance move to templates based on local files

Moving an instance is done by copying over the disks. Restrict
this to disk templates that are copyable. This avoids accidental
use on, e.g., the sharedfile template.

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

c148e448 04/03/2013 08:14 pm Klaus Aehlig

Introduce a constant for the copyable disk templates

This list contains the disk templates suitable for moving
an instance by copying the files. A requirement is that
they're not accessed externally or shared between nodes;
in particular, sharedfile is not suitable....

79a304e1 04/03/2013 12:28 pm Klaus Aehlig

Do not _RemoveDisks after failed _CreateDisks

Now that _CreateDisks cleans up after itself in case of failure,
do not clean up at call sites, as there we have to overapproximate
thus potentially causing data loss.

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

7d3484b8 04/03/2013 12:28 pm Klaus Aehlig

Make _CreateDisk clean up partially created disks on failure

_CreateDisk used to just throw an exception if _CreateBlockDev failed
leaving the caller in the state that some disks were created, without
precise knowledge which. Usually, the clean up then overapproximated...

7fb852bd 04/03/2013 12:14 pm Michele Tartara

Fix typo in an error message

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

3438e1f8 04/02/2013 02:01 pm Klaus Aehlig

Add option --new-primary to gnt-instance modify

Extend gnt-instance modify by a new parameter --new-primary
that sets the pnode paramter of the opcode.

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

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

Make LUInstanceSetParams handle pnode parameter

If pnode is set LUInstanceSetParams now sets the primary node
accordingly. Unless force is set, it is verified that the instance
is no longer running on the old node.

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

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 <>

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 <>...

04db1880 03/27/2013 12:46 pm Bernardo Dal Seno

Configuration is verified on load

If there are errors in the configuration when master daemon is started,
they are now logged and reported. Previously they were logged sometimes at
startup, and when performing any change to the configuration.

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

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

Refactor cli.CreateIPolicyFromOpts()

The code relative to instance specs has been moved into a different
function. This in preparation for further patches to have a more clear code
structure.

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

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

Remove duplicate filling of instance policy

Instance policy fields were manually filled in CreateIPolicyFromOpts() and
then filled again by the caller. Now they are filled once inside the
function.

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

2cbcf95d 03/26/2013 01:57 pm Bernardo Dal Seno

gnt-instance info uses a revised format

The code is more modular and the output is YAML-compliant. QA updated to
take advantage of it.

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

0e79564a 03/26/2013 01:57 pm Bernardo Dal Seno

gnt-cluster info uses a revised format

The code is more modular and the output is YAML-compliant.

Added function in QA that uses PyYAML to parse the command output, and QA
is updated to take advantage of it (instead of using lots of complicated
REs).

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

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...

fb409531 03/22/2013 05:01 pm Michele Tartara

Remove use of deprecated function

cgi.parse_qs() is deprecated in python 2.6 and substituted by
urlparse.parse_qs().

This patch modifies the code to use the new function.

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

27263c47 03/22/2013 01:00 pm Helga Velroyen

gnt-cluster modify: limit storage type consistency check

This fixes the currently broken Q&A. The consistency check
for storage types is now only run when the 'enabled_storage_types'
are actually changed by 'gnt-cluster modify'.

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

9c6f0b51 03/22/2013 09:46 am Helga Velroyen

Check if instances use disk templates that get disabled

When disk templates get disabled via 'gnt-cluster modify', so far
we did not check if any instances still use a disk template of that
type. This patch adds the necessariy check.
It also includes adding a map of disk templates to storage types...

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

Upgrade configuration wrt enabled storage types

This implements an online update of the configuration for when a configuration
is loaded that does not yet contain the 'enabled_storage_types' attribute.
Note that this will require more changes as dis/enabling of (shared) file...

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

gnt-cluster init: add enabled_storage_types parameter

This patch extends the 'gnt-cluster init' command to set the list
of enabled storage types on cluster creation.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Guido Trotter <>

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...

7b9ceea7 03/21/2013 05:41 pm Helga Velroyen

gnt-cluster info: show enabled storage types

This extends the 'gnt-cluster info' command to list the storage types
that are enabled on the cluster. It also fixes the broken indentation
in the 'handleCall' function.

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

d0de443e 03/21/2013 05:40 pm Helga Velroyen

Add 'enabled_storage_types' to the cluster config

This patch adds the cluster's new field 'enabled_storage_types'
to the configuration objects in python and haskell.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Guido Trotter <>

33c730a2 03/21/2013 05:40 pm Helga Velroyen

Add constants for storage types to constants.py

This patch adds the currently known and used storage methods to the
constants.py file. Note that storage types are different from disk
templates. For example both disk templates, drbd and plain, use lvm
storage types....

05b6f4d8 03/21/2013 12:13 pm Bernardo Dal Seno

Merge branch 'devel-2.7'

  • devel-2.7
    cfgupgrade: Fix error messages
    Update "FIXME" string in RAPI
    rapi client: add target_node to migrate instance
    Make diskless instances externally mirrored
    Fix migrate/failover -n for ext mirror storage

Trivial merge: no conflicts...

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 <>...

09b7b6f2 03/20/2013 01:49 pm Michele Tartara

Update "FIXME" string in RAPI

We are not ready for this change yet. Let's push it to 2.8.

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

511e00b8 03/20/2013 12:34 pm Helga Velroyen

Fix typo 'VolumeN' in bdev.py

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

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 <>

14013e5d 03/13/2013 12:49 pm Michele Tartara

Add user and group for the monitoring agent

This commit adds the user and group variables for the monitoring agent in all
the configuration files where they are required.

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

dc700f75 03/12/2013 07:19 pm Daniel Krambrock

rapi client: add target_node to migrate instance

This allows migrating to any node, as it is already possible for
failover, when instances are externally mirrored.

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

d8f0b7c1 03/12/2013 06:52 pm Guido Trotter

Make diskless instances externally mirrored

This addresses Issue 237.

Mirroring no disk is a no-op. As such we can treat them like mirrored
instances, since the data they need (none) will be present on all nodes.

This is definitely enough to failover or migrate instances with a manual...

7b3d70d4 03/12/2013 06:29 pm Guido Trotter

Fix migrate/failover -n for ext mirror storage

This fixes issue 396.

- Fix a wrong comment that mentions drbd8 when actually the code acts
only on externally mirrored instances.
- Fix a wrong assert that requires failover/migrate to acquire the NAL
on externally mirrored instances: this is the case only when a...

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

Enable split queries for the network

Now that all fields are implemented, and (I think) behave equivalent
to the Python implementation, we can switch on the split queries for
networks.

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

40b118d3 03/12/2013 06:16 pm Iustin Pop

Introduce better item getter helper in query.py

And also use it for simple network fields. Currently the Python
library returns jsnull, which is formatted as 'None' by the Python
client, which (IMHO) is not nice, since these fields are strings (some
of them) or "other". An undeclared gateway is easier to diagnose when...

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)....

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 <>