Statistics
| Branch: | Tag: | Revision:

root / lib @ c6bca2d1

# Date Author Comment
5a13489b 06/03/2013 04:15 pm Bernardo Dal Seno

Check real spindles in ipolicies

When exclusive storage is enabled, the spindles in instance disks are used
to check the instance policies (as outlined in design-partitioned.rst).

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Klaus Aehlig <>

0e514de1 06/03/2013 04:15 pm Bernardo Dal Seno

Export instance disk spindles

Instance disk spindles can be queried via LUXI and RAPI, and are exported
through the allocator interface. This is a prerequisite for htools to
handle spindles.

The length of a RAPI query including all the instance fields now has become...

342a9b3b 05/31/2013 04:36 pm Bernardo Dal Seno

Merge branch 'stable-2.8' into master

  • stable-2.8:
    Document users-setup tool
    Adjusting permissions after confd start
    Ensure the queue socket has the right permissions
    Update IAllocator interface documentation
    Add NEWS entry for hail honoring networks...
e41d5a22 05/31/2013 01:45 pm Bernardo Dal Seno

Merge branch 'stable-2.7' into stable-2.8

  • stable-2.7:
    Document users-setup tool
    Adjusting permissions after confd start
    Ensure the queue socket has the right permissions
    Update IAllocator interface documentation

Conflicts:
doc/iallocator.rst
...

8feeb253 05/31/2013 05:05 am Christos Stavrakakis

kvm: Use -uuid to set system UUID

Use kvm '-uuid' option to set guest's system UUID to instance's UUID.

Signed-off-by: Christos Stavrakakis <>
Signed-off-by: Guido Trotter <>
Reviewed-by: Guido Trotter <>

8526052d 05/29/2013 01:32 pm Guido Trotter

Ensure the queue socket has the right permissions

RAPI needs to be able to perform queries as well.

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

98ae702b 05/29/2013 10:52 am Thomas Thrainer

Export connected networks to IAllocator

IAllocators should not put instances on nodes in nodegroups which are
not connected to the network the instance should be connected to.
Therefore, export the networks a node group is connected to to the
IAllocator, so it can account for this restriction....

802ed2aa 05/28/2013 06:05 pm Klaus Aehlig

Add generic daemon options support binding to interfaces

In some situations, it is desirable to bind one of our servers only to
a particular interface, like eth0, instead of an IP address. Therefore,
add an option -i to specify an interface; its address will then be bound...

d962dbf9 05/28/2013 04:05 pm Thomas Thrainer

Re-activate previously active disks in watcher

The watcher process previously (incorrectly) examined the admin_state
field to figure out if the disks of an instance should be activated
after a node reboot. This is changed to use the disks_active field of...

ca83454f 05/28/2013 04:05 pm Thomas Thrainer

Make the disks_active flag queryable

gnt-instance list now also supports the disks_active field.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

a8e07057 05/28/2013 04:05 pm Thomas Thrainer

Consider disks_active in UpgradeConfig

The disks_active flag is updated when masterd reads the configuration.
Also, cfgupgrade now removes the disks_active flag during downgrades.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

1d4a4b26 05/28/2013 04:05 pm Thomas Thrainer

Add disks_active to configuration

This flag tracks if the disks of an instace are supposed to be active.
That's the case when an instance is running or when its disks got
activated explicitly (and in a couple of other cases).
It will be used by watcher to re-activate disks after a node reboot....

c69b147d 05/28/2013 12:46 pm Bernardo Dal Seno

Report missing spindles in the configuration

cfgupgrade and cluster-verify run a check for missing spindles in disk
configuration when exclusive storage is enabled. The check in cfgupgrade
may give false positives due to the complexity of getting the correct value...

577edf04 05/28/2013 12:46 pm Bernardo Dal Seno

Adapt striping to the requested number of spindles

Otherwise LVM may use a smaller number of PVs (spindles) to accommodate for
the default stripes.

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

7c848a6a 05/28/2013 12:46 pm Bernardo Dal Seno

Spindles are mandatory with exclusive storage

If they are not specified in the command line an error is reported. Also,
disk creation would fail without them.

QA has been updated.

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

40d93e3b 05/28/2013 12:45 pm Bernardo Dal Seno

gnt-cluster repair-disk-sizes repairs spindles too

When exclusive storage is active, any wrong or missing spindles information
in disks gets updated too.

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

6ef8077e 05/28/2013 12:45 pm Bernardo Dal Seno

New RPC to get size and spindles of disks

This RPC replaces the existing one that only returned disk size.

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

baa7f1d6 05/28/2013 12:45 pm Bernardo Dal Seno

New BlockDev methods to get spindles

Two new methods are created to get the number of spindles, one alone, and
one together with size. For devices that don't support spindles, None is
returned.

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

b5d48e87 05/28/2013 12:45 pm Bernardo Dal Seno

Attaching a logical volume builds a list of PVs

When an LV gets attached, the list of the PVs used by the LV is built. This
will be used to count spindles for exclusive_storage, but it could also be
useful to optimize disk growing and snapshotting.

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

688b5752 05/28/2013 12:45 pm Bernardo Dal Seno

Refactor code for attaching a logical volume

The parsing of "lvs" output is moved into private methods. The code is
slightly more readable and testable. The split in two methods is useful
for the following patches. Unit tests for the new functions are
provided....

a9310b5b 05/24/2013 02:30 pm Guido Trotter

Merge branch 'stable-2.8'

  • stable-2.8:
    Bump up version for 2.7.0~rc2 release
    Create overall design document for 2.8
    Add NEWS entry for SO_PEERCRED fix
    Workaround missing SO_PEERCRED
    Add debugging clause to _ExpandCheckDisks error
    Reduce pylint maximum file length to 4500...
328201a5 05/24/2013 02:26 pm Guido Trotter

Merge branch 'stable-2.7' into stable-2.8

  • stable-2.7:
    Bump up version for 2.7.0~rc2 release
    Add NEWS entry for SO_PEERCRED fix
    Workaround missing SO_PEERCRED
    Add debugging clause to _ExpandCheckDisks error
    Mention hail network incompatibility in manpages...
75a6c8be 05/23/2013 02:04 pm Bernardo Dal Seno

gnt-instance info prints information about spindles

For each disk, the number of requested spindles (if present) is shown.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Thomas Thrainer <>

24c06acb 05/23/2013 02:04 pm Bernardo Dal Seno

Spindles are used in creating new disks

The requested number of spindles is used to allocate PVs when creating new
LVs.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Thomas Thrainer <>

5073fa0c 05/23/2013 02:03 pm Bernardo Dal Seno

Document disk device Create() functions

Document all the arguments and return values of bdev.Create() and
bdev.BlockDev.Create().

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Thomas Thrainer <>

b54ecf12 05/23/2013 02:03 pm Bernardo Dal Seno

Add spindles field to disk object

The field is filled with the value provided on the command line.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Thomas Thrainer <>

3f3ea14c 05/23/2013 02:03 pm Bernardo Dal Seno

Check that spindles are not given when they are not allowed

Masterd checks that specifications for new disks don't include spindles
when exclusive storage is disabled.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Thomas Thrainer <>

c615590c 05/23/2013 02:03 pm Bernardo Dal Seno

Add "spindles" option to instance disk creation commands

The option is parsed but ignored, for the moment.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Thomas Thrainer <>

069a4bcf 05/22/2013 05:53 pm Guido Trotter

Workaround missing SO_PEERCRED

This bug happens in a few new distributions, so we workaround it by
defining the constant ourselves, if it's missing.

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

ae549364 05/22/2013 05:53 pm Guido Trotter

Add debugging clause to _ExpandCheckDisks error

This has been reported by users, so we should have the extra debugging
available.

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

4b92e992 05/21/2013 03:13 pm Helga Velroyen

RPC 'node_info': <storage_type,key> instead of vg_names

This replaces the field 'vg_names' in the RPC call of 'node info' by
'storage_units'. A storage unit is a tuple <storage_type,key>
and a generalization of a vg_name. The list of vg names is replaced by...

48bba9de 05/17/2013 06:38 pm Balazs Lecz

Stash Xen config file after a failed startup

This is a fix for a minor bug.
Currently, a failed Xen VM start results in a stale config file left
behind on the filesystem.
This change introduces a new log directory, where the Xen VM config
file is moved after a failed startup....

1bb99a33 05/17/2013 05:42 pm Bernardo Dal Seno

Merge branch 'stable-2.8' into master

  • stable-2.8: (45 commits)
    Update NEWS with disk creation fixes
    Sort cmdlib-related entries in Makefile.am
    cmdlib: Cleanup public/private functions
    cmdlib: Extract instance query related functionality
    cmdlib: Extract instance operation functionality...
6b3f0d7e 05/17/2013 04:25 pm Balazs Lecz

Fix owner of the OS log dir

The OS log dir is used by noded, not masterd.

Signed-off-by: Balazs Lecz <>
Reviewed-by: Guido Trotter <>

a365b47f 05/17/2013 03:04 pm Bernardo Dal Seno

Merge branch 'stable-2.7' into stable-2.8

  • stable-2.7:
    Update NEWS with disk creation fixes
    Don't fail to deactivate master IP if already down
    Add QA for recreating single instance disks
    Add QA for gnt-instance modify --disk
    Clean up when "gnt-instance modify" fails to create a disk...
5eacbcae 05/17/2013 12:32 pm Thomas Thrainer

cmdlib: Cleanup public/private functions

All functions/classes which are used outside of their defining module
(with tests as an exception) no longer have a leading underscore.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

8aa8f6b1 05/17/2013 12:32 pm Thomas Thrainer

cmdlib: Extract instance query related functionality

Split instance.py further by extracting instance querying related
logical units and functions to instance_query.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

13f6af81 05/17/2013 12:32 pm Thomas Thrainer

cmdlib: Extract instance operation functionality

Split instance.py further by extracting instance operations
(start/stop/reboot/etc.) related logical units and functions to
instance_operation.py.

The extracted operations have in common that they affect the operating...

87e25be1 05/17/2013 12:32 pm Thomas Thrainer

cmdlib: Extract migration related functionality

Split instance.py further by extracting migration related logical units
and functions to instance_migration.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

763ad5be 05/17/2013 12:32 pm Thomas Thrainer

cmdlib: Extract storage related functionality

Split instance.py further by extracting storage related logical units
and functions to instance_storage.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

8701dfb0 05/17/2013 12:32 pm Thomas Thrainer

Reformat and define exports in cmdlib/__init__.py

cmdlib/__init__.py now simply defines the interface of the cmdlib module
by importing all classes which should be visible to clients.

Also don't ignore C0302 (Too many lines in module) any more.

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

814386b7 05/17/2013 12:32 pm Thomas Thrainer

Extract miscellaneous logical units from cmdlib

All remaining classes in init.py are extracted to misc.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

1be6b00e 05/17/2013 12:32 pm Thomas Thrainer

Extract os related logical units from cmdlib

All LUOs* classes are extracted to operating_system.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

ec3cc4a8 05/17/2013 12:32 pm Thomas Thrainer

Extract query related logical units from cmdlib

All LUQuery* classes are extracted to query.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

7ecd5e87 05/17/2013 12:32 pm Thomas Thrainer

Extract backup related logical units from cmdlib

All LUBackup* classes are extracted to backup.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

22b7f6f8 05/17/2013 12:31 pm Thomas Thrainer

Extract instance related logical units from cmdlib

All LUInstance* classes are extracted to instance.py. Common functions
are moved to common.py if used by non-instance logical units as well.
Additionally, helper functions which are only used by LUBackup* and...

31b836b8 05/17/2013 12:31 pm Thomas Thrainer

Extract node related logical units from cmdlib

All LUNode* classes are extracted to node.py. Common functions are moved
to common.py if used by non-node logical units as well.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

f380d53c 05/17/2013 12:31 pm Thomas Thrainer

Extract group related logial units from cmdlib

All LUGroup* classes are moved to group.py. Common functions are
extracted to common.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

7352d33b 05/17/2013 12:31 pm Thomas Thrainer

Extract cluster related logical units from cmdlib

All LUCluster* classes are extracted to cluster.py. Shared functions are
extracted to common.py, helper functions only used by LUCluster* are
extracted to cluster.py.

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

1d870e0d 05/17/2013 12:31 pm Thomas Thrainer

Extract test logical units from cmdlib

LUTest* are moved to test.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

37dc17e3 05/17/2013 12:31 pm Thomas Thrainer

Extract network related logical units from cmdlib

LUNetwork* and associated helper functions are extracted to network.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

fb3891d0 05/17/2013 12:31 pm Thomas Thrainer

Extract tags related logical units from cmdlib

LUTags* and their base class, TagsLU, are extracted to tags.py. An
additional shared function, _ShareAll, is extracted to common.py for
shared usage.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

1a732a74 05/17/2013 12:31 pm Thomas Thrainer

Extract base classes from cmdlib

Base classes holding common functionality is extracted into base.py.
Utility functions used by both base classes and subclasses is moved to
common.py.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Bernardo Dal Seno <>

5d94c034 05/15/2013 03:02 pm Helga Velroyen

Use os.statvfs to determine free disk space

This simplifies my previous commit (820bade90) by using os.statvfs
instead of parsing the output of 'df'.

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

820bade9 05/14/2013 10:17 pm Helga Velroyen

Backend function for file storage space reporting

This adds functionality to retrieve disk space information
for file storage. It calls the 'df' tool and parses its
output to extract the total and free amount of disk space
on the disk where the given path is located....

9598b71f 05/14/2013 08:57 pm Michele Tartara

Remove extra newline

Also, properly set the date of the last modification.

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

c300dbe4 05/14/2013 07:59 pm Michele Tartara

Add MonD to the watcher

The monitoring daemon should always be alive, therefore it's added to the
watcher.

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

66234263 05/14/2013 07:59 pm Michele Tartara

Start the monitoring and node daemons together

Add the monitoring daemon to the command starting the node daemon, given that
they both have to be started on all nodes.

Note that daemon-util only supports starting one daemon at the time, so the
actual command has to be composed as a sequence of two different daemon-util...

5bb9ecc0 05/14/2013 07:58 pm Michele Tartara

Add a constant stating whether monitoring is enabled

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

1f14b07e 05/14/2013 07:04 pm Bernardo Dal Seno

Clean up when "gnt-instance modify" fails to create a disk

cmdlib.LUInstanceSetParams now uses helper functions to create and wipe
disks, so that when the creation of a disk fails, any leftover device is
cleaned up. As a bonus, exceptions raised by _CreateBlockDev() are caught...

dfb0bc93 05/14/2013 07:04 pm Bernardo Dal Seno

recreate-disks honors the prealloc_wipe_disks flag

Now even recreate-disks wipes the newly-created disks, if the flag is set.

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

b867e218 05/14/2013 07:03 pm Bernardo Dal Seno

Introduce wrapper for cmdlib._WipeDisks()

The wrapper handles errors by logging them and cleaning up freshly-created
disks.

Also, the correct disk is used in the error message when an error happens
in cmdlib._CreateDisks() and the resulting disk clean-up fails....

eb0aa4e5 05/14/2013 07:03 pm Bernardo Dal Seno

Don't catch an exception that cannot be raised

Since 9b221ea4, _CreateBlockDev() doesn't raise OpExecError any more. Yet
some code was left in place to catch it. By removing that code we have two
advantages:
1. Dead code is removed.
2. If for whatever reason _CreateBlockDev() raises OpExecError, the...

57bcb172 05/14/2013 07:02 pm Michael Hanselmann

Wipe disks added through "gnt-instance modify"

In issue 353 Sascha Lucas reported that disks are not wiped when added
through “gnt-instance modify”. This patch adds this functionality and
updates the docstring for “_WipeDisks”.

Signed-off-by: Michael Hanselmann <>...

8f096849 05/14/2013 04:46 pm Helga Velroyen

Move 'container.py' to storage directory

Moving 'container.py' to the storage directory.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Thomas Thrainer <>

cde49218 05/14/2013 04:46 pm Helga Velroyen

Rename dir 'block' to 'storage'

Renaming the 'block' directory to 'storage', because I plan to
place code there that is related to file storage and leaving
it named 'block' would be misleading.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Thomas Thrainer <>

c23bb217 05/14/2013 04:45 pm Helga Velroyen

Rename storage.py to container.py

Renaming 'storage.py' to 'container.py'. It will be moved into the new
'storage' directory, which will come in later patches to avoid clashes of
notation.

Signed-off-by: Helga Velroyen <>
Reviewed-by: Thomas Thrainer <>

1da489e2 05/13/2013 10:56 am Guido Trotter

Move cmdlib.py to cmdlib/__init__.py

cmdlib.py has grown really too much. Move it into its own package to
allow splitting it further.

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

5a9c7c34 05/09/2013 05:31 pm Bernardo Dal Seno

Refactor check for exclusive_storage in LUInstanceCreate

The order of evaluation of the conditions is changed, so it's easier to add
more (foreseen) checks for exclusive_storage.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Klaus Aehlig <>

8064c1af 05/09/2013 05:31 pm Bernardo Dal Seno

Refactor disk checks in LUInstanceSetParams

Prereq checks relative disks are grouped together and moved in a separate
method. This reduces the clutter in CheckPrereq().

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Klaus Aehlig <>

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

04bcb621 05/03/2013 12:05 pm Helga Velroyen

gnt-job list: deal with non-ascii encoding in jobs

This fixes issue 432. If a job summary contained a non-ascii character,
gnt-job list crashed badly so far. This patch fixes the crash and makes
gnt-job list display unicode characters properly.

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

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