Statistics
| Branch: | Tag: | Revision:

root / test @ a59d5fa1

# Date Author Comment
a59d5fa1 02/19/2013 04:27 pm Michele Tartara

Infrastructure for specifying instance status change reason

This patch introduces some infrastructural modifications that will be used by
the following commits to implement the support for specifying the reason for
the last status change of an instance.
...

834bea99 02/18/2013 06:08 pm Helga Velroyen

Unit tests for Query/Network.hs

This patch adds a couple of unit tests for Query/Network.hs.
Note that they'll need to be adapted, once issue 362 is addressed.

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

c5a957c3 02/18/2013 05:35 pm Michele Tartara

Add Haskell parser for "xm uptime"

In order to fetch precise information about the uptime of the VMs
running in Xen, we need to analyze the output of the "xm uptime" command.

This commit adds the parser to do that, and its tests.

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

b8585908 02/18/2013 05:35 pm Michele Tartara

Add Haskell parser for "xm list --long"

In order to fetch precise information about the status of the VMs running in
Xen, we need to analyze the output of the "xm list --long" command.

This commit adds the parser to do that, and its tests.

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

fe502d25 02/15/2013 03:04 pm Iustin Pop

Merge branch 'devel-2.7'

  • devel-2.7:
    Rename lib/objectutils to outils.py
    Fix typo in gnt-group manpage
    Fix wrong type in a docstring of the RAPI subsystem
    Finish the remote→restricted commands rename
    Enable use of the priority option in hbal
    Add CLI-level option to override the priority...
473d87a3 02/15/2013 12:14 pm Iustin Pop

Rename lib/objectutils to outils.py

Back when this was introduced, I mentioned that it breaks heavily tab
completion (ob<TAB> doesn't work anymore), but at that moment I didn't
have a suggestion what to name it. I think outils is good and short
enough, and doesn't conflict with anything else, so here it goes....

37fe56e0 02/12/2013 03:47 pm Iustin Pop

Add functions to parse CLI-level format of priorities

The current serialisation format for submit priorities is
integer-based, same as the opcode json serialisation. But for CLI
level, we need to support a string-based format, so we add functions
to parse and format this representation....

a81ca843 02/12/2013 03:47 pm Iustin Pop

Enable use of the priority option in hbal

This patch adds the option to hbal, and uses it to tweak the submitted
jobs. There are also two small shelltests for testing the parsing.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

45bc4635 02/12/2013 03:47 pm Iustin Pop

Finish the remote→restricted commands rename

The documentation still points to /etc/ganeti/remote-commands,
although the code is already using restricted-command. Update the
documentation and a few docstrings accordingly.

Signed-off-by: Iustin Pop <>...

bb63ccb0 02/12/2013 03:39 pm Helga Velroyen

Removes check for conflicts from NetworkDisconnect

This removes the check for conflicts from the Haskell
version of the OpCode NetworkDisconnect. This alignes
the Haskell code with the patch
"Force conflicts check in LUNetworkDisconnect" (which
is currently under review). I will submit these patches...

2e076ede 02/12/2013 03:39 pm Stratos Psomadakis

Add unit tests for RADOSBLockDevice

Add unit tests for the RADOSBlockDevice JSON output parsing function,
and modify the unit tests for the plain output parsing function to
work with the new code.

Signed-off-by: Stratos Psomadakis <>
Reviewed-by: Guido Trotter <>

3c296f56 02/12/2013 03:25 pm Michael Hanselmann

Merge branch 'devel-2.7'

  • devel-2.7: (23 commits)
    QA: Support additional arguments for initialization
    qa_utils: Fix order of arguments passed to _AssertRetCode
    Improve reporting on errors.AddressPoolError exceptions
    Add note about lv-tags rename...
5cfa6c37 02/11/2013 05:31 pm Dimitris Aragiorgis

Remove network_type slot (Issue 363)

This slot was not used by Ganeti so the same info can be
provided via tags. In order not to break configuration data
we add a FromDict() method in Network config object that
removes the deprecated network_type (if found) and then invoke...

3697def0 02/11/2013 04:21 pm Bernardo Dal Seno

Moved uniformity check for exclusive_storage flag

Cluster-verify used to check that the value of exclusive_storage is uniform
within node groups. Now, it's impossible to change the flag for a single
node, so that check has been removed and an equivalent one has been added...

250a9404 02/11/2013 04:21 pm Bernardo Dal Seno

"exclusive_storage" cannot be changed on single nodes

There's never been support for a configuration where nodes in the same node
group have different values of the exclusive_storage flag. This patch
disables the possibility to change the flag for individual nodes....

45f62156 02/11/2013 04:20 pm Bernardo Dal Seno

Upgrades made on loading the configuration are always saved

Before, only some upgrades were written back to the configuration file. A
little refactoring of _UpgradeConfig() has been done to write unit tests.

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

dbdb0594 02/11/2013 03:30 pm Michael Hanselmann

QA: Convert nodes to objects

Up until now nodes were stored as a dictionary. The keys were hardcoded
in a lot of places and entries modified directly.

This patch introduces a new class for nodes in QA named “_QaNode”. It
still supports accessing details via dictionary syntax, but that will be...

6f88e076 02/08/2013 03:36 pm Michael Hanselmann

QA: Release instances through method

Instead of having a module-level function in “qa_config” to release an
instance, a new method on instance objects is used.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

6a654276 02/08/2013 03:36 pm Michael Hanselmann

QA: Convert instances to objects

Up until now instances were stored as a dictionary. The keys were
hardcoded in a lot of places and entries modified directly.

This patch introduces a new class for instances in QA named
“_QaInstance”. It still supports accessing details via dictionary...

a08e181f 02/08/2013 03:35 pm Michael Hanselmann

Refactor storage of runtime exclusive storage flag in QA

This is a follow-up for “qa_config: Remove exclusive storage flag from
config”. Instead of storing the flag in a module-level variable it is
now stored within the new QA configuration class and unit tests are...

8a96c5a6 02/08/2013 03:35 pm Michael Hanselmann

Refactor QA configuration code

Ever since its introduction (sometime before commit cec9845 in September
2007), the QA configuration was stored in a dictionary at module-level
in “qa/qa_config.py”. The configuration was loaded, verified and
evaluated using module-level functions. Since then the configuration has...

595149d5 02/08/2013 11:48 am Michael Hanselmann

vcluster: Make _MakeNodeRoot public

The QA code will also have to generate virtual paths and this function
comes in handy.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Michele Tartara <>

72747d91 02/07/2013 06:14 pm Iustin Pop

Remove use of 'head' and add hlint warning for it

Since 'head' is unsafe to use in most cases, this patch removes its
use from most of the code, adds a lint warning for it (and for tail as
well), and adds override annotations in the few cases where it's
actually OK to use it (mainly when using head over the result of...

83251115 02/05/2013 06:55 pm Michael Hanselmann

Merge branch 'devel-2.7'

  • devel-2.7:
    Redirect output for gnt-* list/list-fields commands
    Add function to execute QA commands with redirected output
    Implement option to skip logging of QA commands
    Fix typo in a comment
    Add some more Haskell/Python equivalence tests...
ca7b4f48 02/05/2013 10:36 am Iustin Pop

Add some more Haskell/Python equivalence tests

This would have caught the log file problem fixed in the previous
patch (9411474b), for example. Also we test user/group equivalence,
name only.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

473ab806 02/04/2013 04:52 pm Michael Hanselmann

Extract container converters

“objects.ConfigObject” contains two useful functions for working with
containers of serialized objects, “_ContainerToDicts” and
“_ContainerFromDicts”. This patch separates those functions and moves
them into “objectutils” as they'll be useful for converting parts of the...

4d36fbf4 02/04/2013 04:22 pm Michael Hanselmann

objects: Improve handling of TCP/UDP port pool

- Handle de-serialization correctly when pool is not defined
- Serialize to empty list when the attribute is None (this should never
happen in reality as the attribute is always set when de-serializing)
- Add tests...

53fde1ac 02/04/2013 03:06 pm Iustin Pop

Add a helper function for hypervisor verification

This will allow easier multi-error results from hypervisors; right
now, we only report the first error, which is not nice.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michael Hanselmann <>

b6d9bec8 01/30/2013 07:38 pm Dato Simó

Program/Harep.hs: add skeleton for the new auto-repair tool

harep(1) detects certain kind of problems with instances and applies the
allowed set of solutions. See doc/design-autorepair.rst.

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

0ae4b355 01/30/2013 07:26 pm Helga Velroyen

Removes check for conflicts from NetworkDisconnect

This removes the check for conflicts from the Haskell
version of the OpCode NetworkDisconnect. This alignes
the Haskell code with the patch
"Force conflicts check in LUNetworkDisconnect" (which
is currently under review). I will submit these patches...

ea2bcb82 01/30/2013 07:12 pm Michael Hanselmann

hv_kvm: Refactor getting TAP features, add tests

Split retrieving supported features into a dedicated function which can
be mocked. Tests are added for both “_ProbeTapVnetHdr” and
“_GetTunFeatures”.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

5fee2c83 01/29/2013 06:23 pm Michael Hanselmann

Checks for hypervisor constants

Add two tests for hypervisor constants.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

d8784f7d 01/25/2013 04:07 pm Michael Hanselmann

hv_xen: Fix issues with migration, add tests

Commit 3d942d8 broke instance migration (“self._cmd” was set to None).
This patch fixes that issue, refactors “MigrateInstance” for testing and
adds those tests.

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

2edc1c79 01/25/2013 12:58 pm Michael Hanselmann

hv_xen: Test various forms of getting instance/node info

Test functions for retrieving instance and node information.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

664b392d 01/25/2013 12:58 pm Michael Hanselmann

hv_xen: Test stopping an instance

Test stopping an instance, and ensure the configuration file still
exists after an instance couldn't be stopped.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

396672cd 01/25/2013 12:58 pm Michael Hanselmann

hv_xen: Test starting an instance

Test starting an instance in normal mode, in paused mode, and in case of
failure.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

57270b2d 01/25/2013 12:58 pm Michael Hanselmann

hv_xen: Test reading non-existent config file

Check whether doing so raises an exception.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

b666f213 01/25/2013 12:58 pm Michael Hanselmann

hv_xen: Test verifying hypervisor

Test success and failure.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

7610d884 01/25/2013 12:58 pm Michael Hanselmann

hv_xen: Test removing config from "auto" directory

Test whether any existing configuration file named after the instance is
removed from Xen's “auto” directory.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

74a50c46 01/25/2013 12:58 pm Michael Hanselmann

Establish base for testing Xen hypervisor abstraction

There are two separate Xen hypervisors (HVM and PVM), as well as two
different Xen commands (xl and xm). This already provides four different
combinations and future changes might bring even more. For this reason...

64a66bd2 01/25/2013 12:58 pm Michael Hanselmann

hv_xen: Test errors while writing config file

Test error handling while writing Xen configuration files.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

1dee2041 01/25/2013 12:58 pm Michael Hanselmann

hv_xen: Test using unknown Xen command

This tests “unknown” values of “constants.XEN_CMD”.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

b43064d0 01/24/2013 08:30 pm Helga Velroyen

Extend config by networks and networks by UUIDs

For network queries to work, we need to extend the general
config type to include all available networks. Additionally,
we add UUIDs to the network type itself.

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

d0bb3f24 01/24/2013 02:27 pm Michael Hanselmann

hv_xen: Factorize and test disk configuration

The “_GetConfigFileDiskData” function is moved to module level and
cleaned up (module-level constants for letters and file I/O drivers).

Until now only 24 disks would be supported (e.g. “sda” to “sdx”), when...

06c9a520 01/24/2013 01:58 pm Michael Hanselmann

hv_xen: Refactor getting node information, add tests

Refactor and add tests for getting node (Domain-0) information.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

b255379d 01/24/2013 01:57 pm Michael Hanselmann

hv_xen: Refactor running & parsing "xm list", add tests

This patch refactors “_RunXmList” and adds some tests.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

8bb2df7d 01/23/2013 06:34 pm Bernardo Dal Seno

_VerifyErrors()._Error() and _ErrorIf() are now consistent

_Error() didn't contain the logic for demoting errors to warnings and for
marking an operation as failed. Now _ErrorIf() is just a minimal wrapper
for _Error().

Unit tests included.

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

00ef625c 01/22/2013 06:27 pm Michael Hanselmann

testutils: Module-level method for reading test data

This patch moves the functions “_ReadTestData” and “_TestDataFilename”
to module level. They do not depend on a class instance at all.

Some cases of “utils.ReadFile(self._TestDataFilename(…))” are also...

3b721842 01/22/2013 04:05 pm Michael Hanselmann

Add test for backend._GetBlockDevSymlinkPath

Add a unit test for the trivial “_GetBlockDevSymlinkPath” function in
backend (small changes in the function were required).

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

347fa0f1 01/18/2013 05:12 pm Michael Hanselmann

hv_xen: Add test for CPU pinning configuration

Add a unittest for a function formatting CPU pinning information for
Xen's configuration.

Signed-off-by: Michael Hanselmann <>
Signed-off-by: Guido Trotter <>
Reviewed-by: Guido Trotter <>

9fb621af 01/18/2013 12:41 pm Yiannis Tsiouris

Text wrap in Haskell code

This adds two functions in Utils.hs: 'wrap' and 'trim' along with some
simple tests. 'wrap' is used in Common.hs for wrapping command
descriptions to a fixed line length, e.g. useful for the "--help"
option.

Signed-off-by: Yiannis Tsiouris <>...

11064155 01/16/2013 07:09 pm Bernardo Dal Seno

utils.LvmExclusiveCheckNodePvs() returns more info

utils.LvmExclusiveCheckNodePvs() now returns the size of the smallest and
biggest PVs of a node. They will be used for cross-node consistency checks.

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

43a840a3 01/16/2013 01:11 pm Michael Hanselmann

burnin: Add unittest for supported disk templates

When new a new disk template is added, burnin should be updated.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

45566243 01/15/2013 07:31 pm Iustin Pop

Remove special-case of "0" in niceSort

Since now niceSort is more consistently behaved, we don't have the
special casing. This should have been removed in commit a7f0953a, but
I didn't realise it.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

d46c9fd6 01/15/2013 05:17 pm Dato Simó

test/Types.hs: add an HLint ANN for ignoring camelCase

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

2f3a3365 01/15/2013 11:42 am Helga Velroyen

Replace nodegroups' PartialNic by PartialNicParams

This fixes a bug that corrups the config when one adds a
network to a node group. I wil soon extend QA by some commands
that would have detected this.

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

ef947a42 01/14/2013 05:54 pm Dato Simó

Loader.hs: ignore expired ArSuspended policies

At the moment, because 'mergeData' is pure, it may set instance auto-repair
policies that are of the form `ArSuspended $ Until timestamp_in_the_past`.
If later on the auto-repair tool notices this, it has lost access to what...

b6aeda4a 01/14/2013 05:54 pm Dato Simó

Utils.hs: add a clockTimeToString function

This function allows to easily convert a ClockTime object to a string
representation of its timestamp (seconds-only).

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

b009f682 01/14/2013 05:54 pm Dato Simó

Utils.hs: function to chomp prefix + separator from a string

Some auto-repair tags are composed of a prefix and then an optional
argument; the new "chompPrefix" function in Utils.hs allows to strip a
prefix, allowing the last character (the separator) to be absent if there...

3e77a36c 01/14/2013 05:52 pm Dato Simó

Add initial constants and Haskell ADTs for auto repair

In this commit, the AutoRepairType and AutoRepairResult types are defined,
with the possible values specified in doc/design-autorepair.rst.

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

eb7a6965 01/14/2013 05:27 pm Guido Trotter

kvm: add two help dump files

One is the --help output for kvm 1.1.2 and the second one is the same as
0.9.1 but with a fake option added between -drive and its boot=on|off
option: this tests that if boot=on|off appears in another option after
-drive it is not accepted by our regexp....

0ad7f5d8 01/14/2013 04:23 pm Guido Trotter

kvm: use help based feature detection

As discussed on the list some people backport features to different kvm
versions, making the version based detection system unreliable. We
change wherever we can to detection on the help output.

This also fixes Issue 250...

f1f6f117 01/09/2013 07:17 pm Dato Simó

test/Utils.hs: fix capitalization in docstring comment

Signed-off-by: Dato Simó <>
Reviewed-by: Iustin Pop <>

23d95cff 01/09/2013 12:48 pm Bernardo Dal Seno

Unit tests for bdev and utils.lvm

Also amended a comment of a tested method.
The tests are for methods introduced in commit 63c73073 (LVM disk creation
uses dedicated PVs).

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Michael Hanselmann <>

d78970ba 01/08/2013 06:16 pm Michele Tartara

Support instance-minor pairing in the DRBD collector

This commits enables the DRBD data collector to use the Confd client to
gather information about the pairing between DRBD minors and instances.

For testing purposes, the DRBD data collector now requires either zero...

eb62691c 01/08/2013 06:16 pm Michele Tartara

Support integrating instance information in the DRBD parser

This commit modifies the DRBD parser and its data structures to include
information about the instance a DRBD minor belongs to.

Test files have been updated as well, to support the new field in the data...

8d459129 01/07/2013 07:00 pm Michael Hanselmann

Add "use_locking" parameter to network query opcode

This was extracted from a patch by Dimitris Aragiorgis with the subject
“Add locking to _NetworkQuery”. The rest of the patch did no longer
apply and will require more work.

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

2fd5a116 12/28/2012 05:50 pm Iustin Pop

Move src/Ganeti/HTools/Program.hs to Program/Main.hs

This removes one more tab conflict; this is the last module in our
code where we have both x.hs and x/.

Furthermore, we collapse all actual code into the new Main.hs module,
leaving the htools.hs basically empty (will allow better testing in...

1c0f9d12 12/27/2012 03:34 pm Iustin Pop

Remove duplicate test file functions

This patch unifies the functions that generated the tree
reorganisation discussion in the first place :)

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

3e16567e 12/27/2012 03:34 pm Iustin Pop

Rename test/hs/test to htest

The current base name of 'test' means that this binary will generate
profiling, coverage, etc. files with the name 'test.*', result in
tab-completion conflicts with the test directory. Let's slightly
change its base name for typing easiness....

83846468 12/27/2012 03:34 pm Iustin Pop

Move htest/ files under the test/ tree

htest/data becomes test/data/htools (basically reverting commit
8feabc89), and htest/* becomes test/hs/*.

Most changes beside the rename are trivial s/…/…, with the exception
of autotools/run-in-tempdir, which needed some more changes now that...

90066780 12/27/2012 03:34 pm Iustin Pop

Move python test files to test/py

This is the first step of the test files reorganisation: moving test/*
(except test/data) to new directory test/py/.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>

b954f097 12/22/2012 11:47 am Constantinos Venetsanopoulos

Add the gnt-storage client

Add a new client called 'gnt-storage'.
The client interacts with the ExtStorage interface, similarly to
the way gnt-os interacts with the OS interface.

For now, only two commands are supported: 'info' and 'diagnose'.

'diagnose' calculates the node status of each provider on each node,...

c1912a48 12/21/2012 05:47 pm Michael Hanselmann

gnt-* list-fields: Show friendly field type

For people writing query filters (documented in ganeti(7)) knowing a field's
type can be useful.

$ gnt-instance list-fields name be/memory
Name Type Title Description
name Text Instance Instance name...

eac9b7b8 12/20/2012 05:08 pm Michael Hanselmann

Add utility to format dictionary as key=value strings

This will be used in QA to format network interface parameters.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

cfa79a23 12/20/2012 11:57 am Michael Hanselmann

cmdlib: Additional opportunistic locking check

If opportunistic locking is requested in the opcode, but no iallocator
is used (not specified or no default), an error will be raised.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Helga Velroyen <>

b8028dcf 12/19/2012 06:29 pm Michael Hanselmann

Replace frozenset with compat.UniqueFrozenset

This is not a trivial s/frozenset/compat.UniqueFrozenset/, but rather
only replaces “frozenset” where appropriate. Most of the places are
“static” information that doesn't change after the module has been
loaded....

0ea11dcb 12/19/2012 03:14 pm Bernardo Dal Seno

Add exclusive_storage node parameter

Unit tests updated and expanded with an inheritance check.

The flag has no effect yet.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Iustin Pop <>

daa49d6f 12/18/2012 03:06 pm Michael Hanselmann

Fix error during cluster initialization due to hv_kvm

Commit 141d148 was a bit too enthusiastic. The three parameters added to
the list of parameters to be checked default to a value not evaluating
to false, leading to a failure on cluster initialization....

141d1489 12/17/2012 06:24 pm Michael Hanselmann

Add test for SPICE parameter list, add missing ones

“_SPICE_ADDITIONAL_PARAMS” is supposed to be the full list of
SPICE-related KVM hypervisor parameters with the exception of
“HV_KVM_SPICE_BIND”. The new test checks if all parameters starting with
“HV_KVM_SPICE_*” are included. Three previously missing parameters are...

8bc17ebb 12/17/2012 01:29 pm Iustin Pop

Add optional formatting for OP_DSC_FIELD

For some opcodes, the output is not "stable", and depends on the exact
input values; this makes it harder to check consistency against
Haskell code.

To compensate for this, we add a way to override the formatting of the...

99e222b1 12/13/2012 01:29 pm Michael Hanselmann

Add RPC for setting watcher pause

The watcher pause file should be set/unset on all nodes at once, not
only the master node. For that a new RPC is needed.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

6ec28bc6 12/13/2012 01:28 pm Michael Hanselmann

Rename test for backend._CommonRestrictedCmdCheck

“TestWriteFile” was not renamed when adding the file based on
“ganeti.utils.io_unittest-runasroot.py”.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

383477e9 12/13/2012 01:27 pm Michael Hanselmann

jqueue: Improve inotify error reporting

This addresses issue 218. When the number of inotify watches is
exhausted, for example by being set too low from the beginning or by
other programs, waiting for a job to change would just report a lost job
(e.g. “Error checking job status: Job with id 7817 lost”)....

e37f47d3 12/13/2012 01:27 pm Michael Hanselmann

Improve test for tools.ensure_dirs

- Add more checks, some of them are deliberately redundant
- Descriptive error messages
- Add comment describing order to “tools.ensure_dirs”
- Avoid copying a list in an assertion in “tools.ensure_dirs”

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

3e3ddbf0 12/12/2012 03:18 pm Constantinos Venetsanopoulos

Remove checks wrt IDISK_PARAMS from OpCode level

Change the "--disks" option validation, to just check the format
of the dict and do not check whether the keys are included in the
IDISK_PARAMS constant at OpCode level. This allows the passing of
arbitrary parameters at the CLI, which will then be logically...

4a3dd52d 12/11/2012 01:01 pm Michael Hanselmann

Add utility function to create frozenset with unique values

When used instead of a plain call to “frozenset”, this would have
avoided the issue fixed in commit e2dd6ec. The new function is located
in the “compat” module as it will be used at module load time in most...

bc826292 12/07/2012 02:47 pm Michael Hanselmann

Export error codes from RAPI client module

Until now the error codes were not available from the RAPI client
module. A newly added unit test ensures all error codes are contained in
“ECODE_ALL”, as well as ensuring consistency between the RAPI client and...

e9a81214 12/07/2012 02:35 pm Michael Hanselmann

mcpu: Verify node allocation lock mode

Add verification code to mcpu to check an LU's locks. Two whitelists are
provided to exclude LUs from the two tests.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Bernardo Dal Seno <>

e712e5b8 12/06/2012 06:19 pm Michael Hanselmann

Fix node-daemon-setup test with older pyOpenSSL

Older versions use “-----BEGIN RSA PRIVATE KEY-----” instead of
“-----BEGIN PRIVATE KEY-----”.

Signed-off-by: Michael Hanselmann <>
Signed-off-by: Guido Trotter <>
Reviewed-by: Guido Trotter <>

69e5fefc 12/06/2012 04:07 pm Michael Hanselmann

Add tool to configure node daemon

The design for this is in “doc/design-node-add.rst”. The tool receives a
JSON data structure on stdin and configures the node's daemon after
verifying the received values.

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

3c631ea2 12/05/2012 05:35 pm Michael Hanselmann

jqueue: Don't modify input opcode when changing priority

Commit 4679547 implemented the ability to change job's priority after it
was submitted. The code contained a bug whereby it would modify the
input data for an opcode, something the job queue shouldn't do (logical...

fb60bc6a 12/04/2012 07:54 pm Michael Hanselmann

iallocator: Add node whitelist

In the future instance creations might have a lock on all nodes as was
the case until the implementation of opportunistic locking. Nodes for
which the lock is not held will be shown to the iallocator plugin as if
they were marked offline....

d242923c 12/04/2012 11:22 am Michael Hanselmann

utils.text: Function to verify MAC address prefix

The network management code needs to verify a MAC address prefix.
Instead of (ab)using NormalizeAndValidateMac, clean code should be used.
Unit tests for NormalizeAndValidateMac are updated and new ones for...

0602cef3 12/03/2012 04:33 pm Michael Hanselmann

Factorize code for checking node daemon certificate

This code is going to be used by a new utility for setting up the node
daemon. Unit tests are updated/added.

Additionally, the certificate and key stored in “server.pem” are
verified, too.

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

a95c53ea 12/03/2012 03:56 pm Michael Hanselmann

locking: Implement opportunistic locking in LockSet

This patch adds a new parameter to “LockSet.acquire” named
“opportunistic”. When enabled the lockset will try to acquire as many
locks as possible, but it won't wait for them (with the exception of the
lockset-internal lock in case the whole set is acquired). This is...

9b4329e9 12/03/2012 03:04 pm Michael Hanselmann

Add ssconf function to read all files

Configuring a node daemon on a newly added node will need all ssconf
values.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

cc7f5bfc 12/03/2012 03:03 pm Michael Hanselmann

ssconf: Add dry-run support for writing files

A new utility for configuring the node daemon will support a dry-run
mode. This patch adds the necessary functionality to
“ssconf.SimpleStore” and provides comprehensive tests for
“SimpleStore.WriteFiles”. To enable the latter, a testing-only parameter...

29a32ce5 12/03/2012 03:03 pm Michael Hanselmann

ssconf: Add function to verify keys

The new utility for configuring the node daemon will have to check
whether it received valid ssconf names.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Guido Trotter <>

08f31176 11/30/2012 03:54 pm Iustin Pop

Add test for mutable default values in opcode parameters

This is not comprehensive, since in Python one can't determine what is
and what is not mutable; but I've added a few base cases (list, dict,
set).

The patch also improves (makes more uniform) the error messages in the...