Statistics
| Branch: | Tag: | Revision:

root / lib @ 07ea9bf5

# Date Author Comment
085b8e24 05/07/2013 04:07 pm Thomas Thrainer

Fix `drbdsetup show` parsing for DRBD 8.4

In DRBD 8.4, Ganeti does no longer use indexed external meta data but
flexible external metadata. Therefore, there is no longer a meta data
index in the output of `drbdsetup show`.

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

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

5e85269f 05/06/2013 11:47 am Thomas Thrainer

Check for uniform DRBD version in node group

This check is performed during gnt-cluster verify and outputs warnings
if at least two different DRBD versions are found within a node group.
In such a case, all nodes with their installed DRBD version are
displayed....

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

bcba4e01 05/03/2013 11:38 am Michele Tartara

Merge stable-2.7 into stable-2.8

Conflicts:
INSTALL
NEWS
configure.ac
src/Ganeti/Query/Group.hs
test/hs/Test/Ganeti/Objects.hs
test/hs/Test/Ganeti/Query/Query.hs

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

d30fa488 05/03/2013 10:42 am Thomas Thrainer

Support DRBD 8.4.3 command syntax

DRBD 8.4.3 does not support specifying volume ids directly while
creating the meta device. It requires a slightly different syntax (using
flex-external as volume id) which is fortunately also supported by (at
least) DRBD 8.4.2....

7d60c3b5 05/02/2013 04:58 pm Helga Velroyen

gnt-cluster modify: check vg name only on vm-capable nodes

This fixes issue 432: when setting the volume group name, the presence
of the volume group was checked on all nodes. This patch now restricts
the check only to the vm-capable ones.

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

f24d3d3b 05/02/2013 03:51 pm Helga Velroyen

Improve error message for file instance creation

Currently, when creating an instance with file storage fails,
the error message is rather general. This patch adds a hint
on what to do as a possible fix.

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

8cb5634a 05/02/2013 10:42 am Guido Trotter

kvm: use -machine type,accel= for newer qemu

-enable-kvm and -disable-kvm are deprecated in favor of accel=kvm passed
as a machine specification. This fixes compatibility with newer qemu
versions.

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

81e265f5 05/02/2013 10:42 am Guido Trotter

kvm: Move parameter validation before use

We had parameter validation when the runtime is generated, but in the
middle of the function. Move up, before any parameter is accessed.

Signed-off-by: Guido Trotter <>
Reviewed-by: Thomas Thrainer <>

99c7cd5b 05/02/2013 10:42 am Guido Trotter

kvm: Use -display none rather than -nographic

Newer versions of kvm (from 1.4) don't support -nographic with
-daemonize. When -display exists, use -display none instead.

This fixes Issue 389.

Signed-off-by: Guido Trotter <>
Reviewed-by: Thomas Thrainer <>

05440845 04/30/2013 10:28 am Helga Velroyen

gnt-instance: new hypervisor parameter 'vif_type'

This patch fixes issue 247. It empowers the user to specify
explicitly the vif type of a nic configuration of a Xen HVM
instance. This includes the option of setting it to '' on the
commandline, causing Ganeti to leave out the 'type' parameter...

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

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

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

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

decc7ec9 04/29/2013 10:56 am Guido Trotter

Fix unclear error when replacing a nic's ip

The current error message ends up saying something like
'192.168.5.5' != 'network1', which is sort of non-intuitive (yes, of
course they are different). Fix this by explaining better what the
erroneous condition actually is....

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

f38270c6 04/26/2013 04:06 pm Klaus Aehlig

In plain to drbd conversion, rename LVs back on failure

Currently, if converting an instance from plain to drbd fails after
renaming the original LVs, the instance is left in an inconsistent
state. This commit tries to undo the renaming if a failure occurs...

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

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

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

9b221ea4 04/22/2013 10:20 am Michele Tartara

Allow proper cleanup of partially created disks

During the creation of an instance, if the creation of disks fails, some
partially created disks might remain lying around. There is an already
implemented cleanup procedure, but it requires the disks to be listed in the...

35c48839 04/18/2013 11:13 am Michele Tartara

Set the default metavg to be equal to the cluster name

The default metavg was always set to be the constant value "xenvg".
This is OK for most cases, but if the cluster is initialized with
a default name through the --vg-name option, the metavg should change...

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

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

bc3427b7 04/16/2013 12:12 pm Aaron Knister

Use KB as the unit for LVM PE size

LogicalVolume.Attach in bdev.py is calling "lvs" and specifying a unit of
Megabytes that is then converted to an integer resulting in the value 0 for
small sizes.

This patch makes Ganeti use KB for the unit instead of MB....

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