Statistics
| Branch: | Tag: | Revision:

root @ 8a049311

# Date Author Comment
6ab6b19a 05/13/2013 04:20 pm Michele Tartara

Use dcName in mon-collector

Instead of manually specify the name of the data collectors in mon-collector,
just use the dcName field each of them exports.

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

42b50796 05/13/2013 04:20 pm Michele Tartara

Monitoring design doc: better specify field names

The name of the list of instances was not specified.

Also, fix a line that was longer than 80 characters.

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

dd69cd3c 05/13/2013 04:20 pm Michele Tartara

Factor out the mergeStatuses function

It will be used by multiple data collectors, not only the DRBD collector.

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

79731e21 05/13/2013 04:20 pm Michele Tartara

Add global status field to the instance status collector

The global status is computed from the statuses of the single instances.

The output json format is adapted to include this piece of information, as
prescribed by the design document.

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

1f53be84 05/13/2013 04:20 pm Michele Tartara

Add instance status collector to mon-collector man page

Add a section related to the new collector.

Also, fix some formatting issue (white spaces, line longer than 80 chars)
in the DRBD collector section.

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

e8b46463 05/13/2013 04:20 pm Michele Tartara

Export the Instance Status collector report

It will need to be accessed by the monitoring daemon.

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

ebcbcfee 05/13/2013 04:20 pm Michele Tartara

Run the monitoring daemon as root

The monitoring daemon needs to be able to run some commands that require root
access (such as "xm") in order to fulfill its duties.

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

8a049311 05/13/2013 04:20 pm Michele Tartara

Add inst-status-xen to the monitoring daemon

Enable the monitoring daemon to invoke the Xen instance status data collector.
Signed-off-by: Michele Tartara <>
Reviewed-by: Klaus Aehlig <>

74685117 05/13/2013 04:20 pm Michele Tartara

Add dependency on the process library

The tests are already using this library, so it's not really a new build
dependency, but it was not specified esplicitly.

Furthermore, it's going to be used by the instance status collector, so it's
added to the requirements for the monitoring subsystem....

74b25887 05/13/2013 04:20 pm Michele Tartara

Add HS functions for getting the instance reason path

The getInstReasonFilename is built to resemble the python corresponding
function.

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

45ee8676 05/13/2013 04:20 pm Michele Tartara

Add module containing function for getting info from Xen

The Xen instance status data collector will require to get some information
from the hypervisor. This commit introduces a module providing such functions.

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

d7e9323b 05/13/2013 04:20 pm Michele Tartara

Add the core of the instance status collector

Add the Xen instance status data collector with only its core features.
The next commits will add more reporting functionalities.

The access to the collector is made possible through the mon-collector
tool.
...

d4de2ea8 05/13/2013 04:20 pm Michele Tartara

Export the actual instance state

Compute the actual state of the instance and export it.

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

fc4be2bf 05/13/2013 04:20 pm Michele Tartara

Determine status of one instance

Added function for determining whether the status of an instance is ok, and to
represent this information in the corresponding field in the report.

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

17ae9cdb 05/13/2013 04:20 pm Michele Tartara

Include the reason trail in the instance collector output

Fetch the reason trail from file, failing gracefully if it is not found, and
include it in the output of the instance status data collector.

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

7660aaf3 05/13/2013 04:20 pm Michele Tartara

Export Instance Status collector information

Name, version, format version, category and kind of the Instance Status data
collector are now exported.

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

4fe04580 05/13/2013 04:20 pm Michele Tartara

Factor out function for building report

Instead of building the report as part of the "Main" function, have it
built by its own dedicated function, so that it will be able to export it
directly to the monitoring daemon when needed.

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

b24e516d 05/13/2013 03:47 pm Klaus Aehlig

Add example for online rolling reboots using tags

While this use case was described in the design document, and
mentioned several times as motivation for changes in commit messages,
it has never been added to a user-facing documentation. This commit
adds at least an example to the man page....

7b2d4001 05/10/2013 02:56 pm Klaus Aehlig

Extend hroller test to also verify tag-based node selection

While the multiple-tags test was added to verify that coloring is done
only after node selection (otherwise it wouldn't be possible to get in
both cases a single reboot group), it can easily be extended to also...

2a1737eb 05/10/2013 01:56 pm Klaus Aehlig

Add a test for online rolling reboot scheduling

In the example configuration, the graph constructed by just connecting
primary and secondary instances is two-colorable. However, when taking
conflicting locations of secondary nodes into account, three reboot...

8d38fb72 05/10/2013 01:55 pm Klaus Aehlig

Support online-maintenance in hroller

Make hroller take into account the nodes (redundant) instances
will be migrated to. This be behavior can be overridden by the
--offline-maintenance option which will make hroller plan under
the assumption that all instances will be shutdown before starting...

30fded87 05/10/2013 01:55 pm Klaus Aehlig

Support construction of the graph of all reboot constraints

For online rolling reboots, there are two kind of restrictions. First,
we cannot reboot the primary and secondary nodes of an instance
together. Secondly, two nodes cannot be rebooted simultaneously, if...

2207220d 05/10/2013 01:55 pm Klaus Aehlig

Add option --one-step-only to hroller

Add a new option to hroller to only output information about the first
reboot group. Together with the option --node-tags this allows for the
following work flow. First tag all nodes; then repeatedly compute the
first node group, handle these nodes and remove the tags. In between...

a39779f6 05/10/2013 01:54 pm Klaus Aehlig

Sort reboot groups by size

Make hroller output the node groups not containing the master node
sorted by size, largest group first. The master node still remains
the last node of the last reboot group. In this way, most progress
is made when switching back to normal cluster operations after the...

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

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

004398d0 05/07/2013 07:40 pm Klaus Aehlig

Fix lint errors (redundant bracket)

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

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

313fdabc 05/07/2013 06:59 pm Klaus Aehlig

Add option to hroller to select nodes based on tags

Add option --node-tags to tell hroller to consider only nodes
with these tags. A use case would be a tag tracking on which
nodes the maintenance has not yet been carried out, e.g., if
rolling reboots are interleaved with other cluster operations....

267bc1f4 05/07/2013 06:59 pm Klaus Aehlig

Make Rapi backed set node tags correctly

Since the htools representation of a node now allows adding
the node tags, populate this field correctly in the Rapi
backend.

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

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

Make LUXI backed set node tags correctly

Since the htools representation of a node now allows adding
the node tags, populate this field correctly in the LUXI
backend.

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

4b542ebc 05/07/2013 06:58 pm Klaus Aehlig

Extend the text format to contain node tags

In order to allow htools to make use of node tags, add them to the
text format. This is done by adding a new column at the end of the
node lines. If this column is missing, the default value (which
is the empty list) is left unchanged, thus yielding the current...

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

Extend the Node in the htools to allow adding node tags

Since hroller (and probably other tools in the future) will support
node selection based on node tags, extend the node data structure to
allow adding this information.

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

442d5aae 05/07/2013 06:58 pm Klaus Aehlig

Make hroller filter the nodes before coloring the graph

Hroller used to first compute a coloring of the node graph and then
filter out the nodes that it had to work on. While the only filtering
was according to node groups this did not make a difference, as there...

318c0a6c 05/07/2013 06:58 pm Klaus Aehlig

Make mkNodeGraph ignore edges to non-present nodes

Change the behavior of mkNodeGraph to tacitly ignore all instances
where one of the nodes is not in the list of nodes. In this way, we
can construct sub-graphs by filtering the nodes and ignoring any
possibly added isolated nodes for the missing indexes....

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

52278ef9 05/07/2013 06:57 pm Klaus Aehlig

Update hroller man page

In commit 7dbe4c725 the new option --force was introduced to
hroller. Change the man page to reflect this change.

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

d4b6d97b 05/07/2013 05:06 pm Thomas Thrainer

Mention DRBD 8.4 support in NEWS

Mention the main features of DRBD 8.4 support in the NEWS file.

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

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

32f88ce7 05/07/2013 11:58 am Helga Velroyen

Correction of design doc regarding RPC extension

This corrects the storage types design doc regarding the specification
of the RPC call.

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

4a4697de 05/06/2013 05:58 pm Klaus Aehlig

Change design of algorithm for computing rolling reboots

Instead of computing a coloring for one condition first and then refining
it for the other condition, we can construct a graph with edges for all
conditions that prevent simultaneous reboots. This will not only result...

412e7387 05/06/2013 04:30 pm Thomas Thrainer

Support /var/run being a symlink in upload

Starting from Debian Wheezy, /var/run is a symlink to /run. If rsync
does not treat receiving symlinks to directories as directories, it
would remove the original symlink and create a new, empty directory
where only the files to sync are put in. In the case of /var/run, this...

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

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

f583e7ad 05/03/2013 12:09 pm Bernardo Dal Seno

Fix white spaces in partitioned design doc

Bullet lists start after a blank line.

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

8a96e60d 05/03/2013 12:09 pm Bernardo Dal Seno

Reuse current spindles in design for partitioned

Renaming the current parameters dealing with spindles is nice, as their
meaning would be clearer, but that would mean changing a lot of code,
change external interfaces, and renaming internal variables for little...

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

25f8d59c 05/03/2013 10:44 am Michele Tartara

Cleanup of the INSTALL file

Curl is not optional anymore. Remove reference to it in the optional libraries
section.

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

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

fc2318f7 05/02/2013 04:01 pm Helga Velroyen

Disable inter-cluster instance move for file instances

Inter-cluster instance moves depends on exporting an instance. For file-based
instance, exporting is not supported. Therefore, this patch disables
inter-cluster instance moves for file-based instances and informs the user...

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

d5610c94 05/02/2013 02:01 pm Guido Trotter

Update NEWS for 2.7.0 rc1

Move the "main" 2.7 section up to rc1, and just leave the delta in
beta3. Then add a new beta3 to rc1 delta.

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

da535d0d 05/02/2013 12:16 pm Guido Trotter

admin guide updates for 2.7

- Mention the file-storage-paths config file
- Add information about sharedfile and ext storage types
- Change one manpage reference to a proper link

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

e43f849c 05/02/2013 12:16 pm Guido Trotter

Mention file-storage-paths in UPGRADE

It was in NEWS, but not mentioned at all in the upgrade notes.

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

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

db0e97f0 05/01/2013 08:34 pm Guido Trotter

INSTALL updates for wheezy, and fixes

- Remove mention of python 2.4 specific modules, as that version
is not supported anymore
- Add bitarray and ipaddr
- Remove a double space
- Add mandatory C library packages too
- Mention the option of using drbd modules directly from your kernel...

b43e836f 04/30/2013 06:52 pm Michele Tartara

Disable compiling mon-collector if monitoring is disabled

Mon-collector kept being compiled even if monitoring was disabled during
configure.

Fixes Issue 441.

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

5d453688 04/30/2013 06:51 pm Michele Tartara

Add confd as a dependency of monitoring

Some data collectors require confd data information. Therefore, monitoring is
dependent on confd, but this was not checked.

This commit introduces such a check and partially fixes Issue 441.

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

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

3ff890a1 04/30/2013 06:38 pm Michele Tartara

Add the reason trail type definition in Haskell

It will be added to the haskell definition of opcodes, to keep it aligned to
the python one, and it will be used for fetching the reason trail by the
instance status data collector.

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

2bd9ec7c 04/30/2013 06:38 pm Michele Tartara

Update "reason" field in instance status design

Now the reason field is implemented according to the reason trail design
document.

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

0791b57f 04/30/2013 10:57 am Michele Tartara

Remove outdated TODO comment

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

e580e9f7 04/30/2013 10:57 am Michele Tartara

Add proper error management to monitoring daemon

Produce a personalized 404 error when the requested resource is not available.

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

6327828e 04/30/2013 10:56 am Michele Tartara

Produce a report for all the data collectors

Implement the API function of the monitoring daemon that provides the report
of all the data collectors.

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

db1ad1d5 04/30/2013 10:56 am Michele Tartara

Generate report for a single collector

Allow to ask the monitoring daemon for the report of one specific data
collector.

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

75706f3a 04/30/2013 10:56 am Michele Tartara

Export the full report from DRBD data collector

Export the full report instead of just the data from the DRBD data collector.

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

27433b5c 04/30/2013 10:56 am Michele Tartara

Add monitoring daemon to the masterd group

The hmac.key file is owned by group masterd and is required to communicate with
the confd.

The monitoring daemon need to communicate with the confd so it has to be part of
the masterd group.

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

a5ec6d88 04/30/2013 10:55 am Michele Tartara

Update JSON serialization for "category"

Change the JSON serialization for the "category" field of data collectors,
in accordance to the latest version of the design document.

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

3a388363 04/30/2013 10:55 am Michele Tartara

Improve monitoring agent design document

Specify more precisely the format of the category names.

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

ecb783f0 04/30/2013 10:55 am Michele Tartara

Implement the "list collectors" API in monitoring

Implement the handler for outputting the list of collectors
(name, category, kind) in JSON format.

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

c42fbe28 04/30/2013 10:49 am 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...

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

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

man gnt-instance: new hypervisor parameter 'vif_type'

This patch extends the man page of the 'gnt-instance' command
by describing the newly implemented hypervisor parameter
'vif_type'.

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

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()...
2e462e19 04/29/2013 07:05 pm Thomas Thrainer

Cleanup DRBD 8.4 devices properly during QA

QA cleans up DRBD 8.4 devices via drbdsetup, which currently only worked
for DRBD 8.3. This (rather ugly) command makes sure that DRBD 8.4
devices are cleaned up as well.

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

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

7a694e30 04/29/2013 07:05 pm Thomas Thrainer

Add dependency on python-mock

Python Mock (http://www.voidspace.org.uk/python/mock/) is a mocking
library for Python. It is included in the standard Python distribution
as of Python 3.3, but has been around for quite a while. Debian unstable
contains a version we require....

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

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

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

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

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