Statistics
| Branch: | Tag: | Revision:

root @ 1ba01ff7

# Date Author Comment
1ba01ff7 12/19/2012 03:45 pm Iustin Pop

Move a node-specific function to Query.Node

This shouldn't live in the main Query module, since it's too node
specific.

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

a7e484c4 12/19/2012 03:37 pm Iustin Pop

Add support for job queries in hconfd

This adds support for job queries, including (basic) unit-tests.

I've tested this for memory and cpu usage as follows:

- 3600 jobs (live queue):
- via masterd, default: ~1.1s (masterd: ~60MB ram)
- via confd, default: ~1.1s (hconfd: ~25MB ram)...

037762a9 12/19/2012 03:37 pm Iustin Pop

Change makeSimpleFilter accept NumericValues as well

This is required for QueryJobs implementation; we change
makeSimpleFilter to support both string and integers as names.

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

aa79e62e 12/19/2012 03:37 pm Iustin Pop

Add a read-only job queue module

This patch adds implementation for a read-only job queue module,
together with "full" test (as full as can be in a lazy language…).

One note about the behaviour of the job queue is the handling of
opcodes that fail validation: the 'input' opcode actually is a...

f94a9680 12/19/2012 03:37 pm Iustin Pop

Implement support for QFF_SPLIT_TIMESTAMP

I am very very unhappy with this patch. We have to do this, in order
to be compatible with the Python code and behaviour, but there's lots
of duplication; both the Python and the Haskell code will need to be
cleaned up and simplified (we don't need QFF_* at all)....

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

d3b06210 12/19/2012 03:14 pm Bernardo Dal Seno

Update design doc for partitioned Ganeti

PVs don't need to be marked as unallocatable, as the code will ignore
partially used PVs. exclusive_storage made a node parameter.

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

712da82f 12/19/2012 03:11 pm Helga Velroyen

Remove superfluous typing to Int

Forgot to fix that after the review of patch
"Haskell/python compatibility test for networks".

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

90634d95 12/19/2012 01:11 pm Iustin Pop

Extend job ID parsing tests

Since this is a type that behaves non-standard, let's add some more
test for "wrong" input values.

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

f56013fd 12/19/2012 01:11 pm Iustin Pop

Add a few tests for OpParams types

As OpParams definitions are used at Template Haskell type, they don't
get any coverage (although the values defined by them are actually
used in unittests). However, we can at least test some of the
functions defined in the module....

988dc5ca 12/19/2012 01:10 pm Iustin Pop

Enable bash completion for mon-collector

This just ties in all the pieces so far and enables bash completion
for it.

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

638e0a6f 12/19/2012 01:10 pm Iustin Pop

Improve mon-collector drbd CLI handling

Currently, this doesn't abort if multiple arguments are passed, and
the error message for errors during file read has a duplicate "Error".

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

570274e4 12/19/2012 01:10 pm Iustin Pop

Add more mon-collector shell tests

These test the newly-changed behaviour, and fix an inconsistency in
the hs-check target (versus hs-coverage).

Signed-off-by: Iustin Pop <>
Reviewed-by: Michele Tartara <>

86aa9ba3 12/19/2012 01:10 pm Iustin Pop

Remove two hlint overrides

"Use comparing" was not needed, and "Use on" can be solved by actually
using on in the single case we have (the patch also reorders imports
in that file).

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

55abd2c7 12/19/2012 01:10 pm Iustin Pop

Add a custom CLI module for DataCollectors

Currently, the mon-collector binary uses the HTools/CLI module, which
is OK but mean it links in lots of htools code. By copying that module
to DataCollectors/CLI and removing the unneeded code, we reduce the
number of modules it depends on fro 20 to 12, meaning both a shorter...

2e6ef129 12/19/2012 01:10 pm Iustin Pop

Add a type alias for the personality lists

The signature of the personality definitions is so ugly that, at
least, we should hide it a bit behind a type alias.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michele Tartara <>

630c73e5 12/19/2012 01:10 pm Iustin Pop

Introduce generic multi-command binary handling

Currently, the mon-collector binary is the only multi-command binary
we have in Haskell. Not surprisingly therefore, its command line
handling is not as robust as we need, not being able to support
standard "--help" commands....

559c4a98 12/19/2012 01:10 pm Iustin Pop

Add description to personality definitions

This allows usage information to display nicer help (like in Python).

Signed-off-by: Iustin Pop <>
Reviewed-by: Michele Tartara <>

e892cdfa 12/19/2012 01:10 pm Iustin Pop

Simplify htools.hs personality selection

No need to do a boolean-based lookup, we can use the regular
association list lookup.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michele Tartara <>

daf0de68 12/19/2012 01:10 pm Iustin Pop

Implement fake completion support for multi-cmd binaries

This will allow build-bash-completion to understand what is the list
of commands that each binary supports, and then provide recursively
completion support for each command.

Note: by "fake", I mean we use hand-built output and hardcoded...

24476fa0 12/19/2012 01:10 pm Iustin Pop

bash-completion: add support for multi-cmd Haskell binaries

This patch adds support for parsing the command list out of a binary
(very strict format), and then iterating over that and building the
sub-commands options/arguments.

It also does a bit of general cleanup in the script....

675f65b7 12/19/2012 01:10 pm Iustin Pop

Fix profiling targets

As noted by Guido, there are problems when using the hs-prof and
hs-prof-quick targets in the default configuration (compiling all
programs). The errors manifest in the form of wrong symbols during
compilation.

I knew that the hs-prof targets, which compiled multiple objects with...

0d57ce24 12/19/2012 01:02 pm Guido Trotter

Allow shutting down offline instance

If an instance is offline we definitely shouldn't start it up.
But shutting it down, should it be up by mistake is not "that" bad.
Still, we only allow it with --force, as it still performs an action on
an instance we shouldn't touch. This should make everybody happy....

eec7840a 12/19/2012 01:01 pm Guido Trotter

Allow running instances to be put online

If an instance is running (eg. ERROR_up) and at the same time offline,
there's no way to either shut it down or reonline it. This allows
onlining it. Offlining is still disabled for running instances.

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

05325a35 12/18/2012 04:09 pm Bernardo Dal Seno

Fixes and improvements to comments

Some fixes, added more information in a few points, removed a stale (5+
year old) TODO comment.

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

c96887cf 12/18/2012 03:22 pm Iustin Pop

Explain how to use GHCI to see spliced TH code

This can be more useful than the "make" version.

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

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

114e8500 12/18/2012 02:07 pm Dimitris Aragiorgis

Make LUNetworkAdd pass _VerifyLocks()

LEVEL_NODE_ALLOC should be aquired too if LEVEL_NODE is ALL_SET.

Signed-off-by: Dimitris Aragiorgis <>
Reviewed-by: Michael Hanselmann <>

0b288282 12/18/2012 11:24 am Helga Velroyen

Haskell/python compatibility test for networks

This patch contains the HUnit test that checks the compatibility
of Haskell-generated networks with the python code. For that the
generation of test instances of networks was enhanced to meet
the validation steps of the python implementation. Also, so far...

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

07788a0b 12/17/2012 06:24 pm Michael Hanselmann

hv_kvm: List of SPICE parameters should be module-global

This list is static at runtime and doesn't need to be recreated every
time.

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

af797be5 12/17/2012 06:16 pm Michael Hanselmann

_DeclareLocksForMigration: Fix non-DRBD locking issue

When non-DRBD disks are used for an instance,
“lu.needed_locks[locking.LEVEL_NODE]” is set to “locking.ALL_SET” (which
is None). The assertion will then fail as None evaluates to False.

Reported by Constantinos Venetsanopoulos....

d4e4b2fd 12/17/2012 05:44 pm Michael Hanselmann

LUOobCommand: Always declare NAL in shared mode

Doing so avoids triggering an assertion in mcpu which cross-checks the
node lock and node allocation lock acquisition mode.

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

1d645825 12/17/2012 01:38 pm Iustin Pop

Fix two logging messages in TLReplaceDisks

Commit f0f8d060 (“Show old primary/secondary node on disk
replacement”) added two wrong uses of feedback_fn, which results in
log entries such like these:

"log": [
[
7, [1351258326, 466214], "message", "Replacing disk(s) 0 for instance 'instance1.example.com'"...
fef919b7 12/17/2012 01:38 pm Iustin Pop

Split and extend Confd types tests

Some confd types were not tested for serialisation, so let's move
these (type-related) tests to their own module and extend them.

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

62d5242b 12/17/2012 01:38 pm Iustin Pop

Switch Luxi sendMsg from strict to lazy ByteStrings

Commit e821050d (“Switch the Luxi interface from Strings to
ByteStrings”) was designed to optimise the receive interface, but has
an unfortunate side-effect: when sending non-trivial messages, it
means that both the entire String and the ByteString versions must be...

13b17073 12/17/2012 01:38 pm Iustin Pop

Add NFData instances for query results

This allows us to ensure that query results are strict as we build
them, instead of being lazy and only evaluated when the reply is sent
over the Luxi interface.

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

daa79414 12/17/2012 01:38 pm Iustin Pop

Introduce NFData instances for JSON types

The JSValue/JSObject types don't come with a NFData instance, so let's
add one ourselves, so that we can force evaluation of JSValues (either
when building or when reading them).

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

77d43564 12/17/2012 01:38 pm Iustin Pop

Fix parsing of absolute job dependencies

It seems that Python code generates (sometimes) absolute job
dependencies which are strings, instead of integers, so we should be
able to parse these as well. We simply change from explicit int-based
parsing (makeJobId) to the generic one (parseJobId)....

1496f5f3 12/17/2012 01:38 pm Iustin Pop

Make two common opcode parameters always serialised

This changes deps and comment fields to always be shown, to match the
Python behaviour for (at least) job listing/ops field.

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

88127c47 12/17/2012 01:38 pm Iustin Pop

Fix disk_template OpInstSetParams parameter

This is not a required field, but rather an optional one; we add a new
parameter and use it instead.

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

d2970809 12/17/2012 01:38 pm Iustin Pop

Support 'null' in Luxi QueryJobs names field

Python code sometimes sends this, so let's support it even though it's
non-standard.

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

fd958a3d 12/17/2012 01:38 pm Iustin Pop

Abstract code related to job ID creation

Having makeJobIdS as a separate function will allow us to use it
outside of json encoding.

The patch also exports one more function from the Types module.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michele Tartara <>

4355b2de 12/17/2012 01:37 pm Iustin Pop

Add new Haskell library dependency for tests

The 'temporary' library add support for create temporary
directories/files beyond what is offered in the base library (which is
somewhat limited, and hard to use in tests).

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

a664325e 12/17/2012 01:37 pm Iustin Pop

Reduce logging level in tests

This allows tests to execute IO actions which have logging as a side
effect, without polluting the stderr too much.

A better solution would be that we have fine-grained control over
loggers, so that tests can run with their own logging, etc. etc.....

55438c07 12/17/2012 01:37 pm Iustin Pop

Export jstore constants as well to Constants.hs

This single constant could be as well moved to constants.py. For now I
choose to just export the module as well.

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

df8578fb 12/17/2012 01:37 pm Iustin Pop

Generalise the test helper 'genUniquesList'

Instead of always using "arbitrary", make it require a generator (that
can then use more complex rules for building the list elements), and
also convert it to use a temporary set instead of list membership.

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

1db32048 12/17/2012 01:37 pm Iustin Pop

Export more paths from Path.hs

Also adds a small helper for building the paths.

Signed-off-by: Iustin Pop <>
Reviewed-by: Michele Tartara <>

a1d137f6 12/17/2012 01:29 pm Iustin Pop

Simplify a bit the FilterRegex JSON instance

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

ad1c1e41 12/17/2012 01:29 pm Iustin Pop

Implement opcode summary support

This implements in the Haskell codebase the opcode summary. As opposed
to Python, we always use custom code for formatting, since we don't
want to use dynamic attribute lookup.

To test this properly, we need to change MetaOpCode to record-syntax,...

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

5cd95d46 12/17/2012 01:29 pm Iustin Pop

Add a type for the log type in job/opcode logs

Also fixes indentation for OP_STATUS.

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

60f20a41 12/17/2012 01:29 pm Iustin Pop

Fix small typo in OpTestDelay/duration definition

The extra space results in inaccessible names; currently GHC doesn't
flag this as an error, but I've filled an upstream bug for that
(http://hackage.haskell.org/trac/ghc/ticket/7484).

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

9d3867b1 12/14/2012 04:55 pm Iustin Pop

Add constants for two values which we re-evaluate

Two constants which we use as Integer are defined as Int in
Constants.hs (coming from constants.py), so we do the conversion every
time we use it. Let's move them to top-level names, so that the
conversion is only done once....

5448799c 12/14/2012 04:55 pm Iustin Pop

Fix an small but quite nasty typo

Introduced in commit d4752785.

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

d0054203 12/14/2012 04:44 pm Guido Trotter

update gnt-instance manpage about self-rename

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

9fdc92fa 12/14/2012 04:43 pm Guido Trotter

burnin: rename instances to same name

this (a) allows us to test renaming in burnin even if we don't have an
extra instance name and (b) is a valid operation, as it allows to "fix"
an instance who went name-astray

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

57fb6fcb 12/14/2012 04:28 pm Guido Trotter

Very very very basic openvswitch support

This is a "better than nothing" support, just for kvm and just joining
the machine to the opevswitch bridge with the right command.

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

d6b5da24 12/14/2012 03:11 pm Guido Trotter

Add profiling dependencies note

As discussed on the list, these are needed to do a make hs-prof.

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

f127e585 12/14/2012 03:11 pm Guido Trotter

remove duplicate code in Graph.hs

Also update the docstring of a function.

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

cce30754 12/14/2012 03:11 pm Guido Trotter

Improve a few Graph test properties

Return type is changed from Property to Bool, and the ==? True at the
end is dropped.

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

f74b88fa 12/13/2012 07:47 pm Iustin Pop

Log only partial response in Luxi when in debug mode

Currently, we log the entire response (at debug level) in the Luxi
replies. This is not a good idea; the logging library operates on
strings, and as such it will use huge amounts of memory: without debug...

e21c2eec 12/13/2012 07:16 pm Constantinos Venetsanopoulos

Pass check_ip and not hostname.ip to _ComputeNics

This should be done because in the case of --no-name-check there
is no 'hostname.ip' attribute, causing an execution error.
'check_ip' is always set (in CheckArguments) even if --no-name-check
is passed in the command line....

924d9134 12/13/2012 05:35 pm Michael Hanselmann

Add version check for doc/design-draft.rst

This is similar to README or “doc/security.rst”. Having a comment that
needs updating for a new version is more likely going to trigger a check
of the lists of design drafts.

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

a5b0694f 12/13/2012 05:35 pm Michael Hanselmann

Makefile/check-local: List all errors before failing

Use the “error” variable in multiple places and fail only once all tests
have been completed.

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

98a83f17 12/13/2012 04:55 pm Michael Hanselmann

Move four designs from draft to 2.7

These are the ones I implemented and for which I'm certain they're
complete.

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

f1d243bd 12/13/2012 04:52 pm Michael Hanselmann

RAPI documentation fix and update

- Mention user capabilities in security.rst
- Replace “query” with “read” in RAPI documentation

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

542e3dea 12/13/2012 02:30 pm Michele Tartara

Add hpc-mon-collector to .gitignore

It is a binary file and it should never be added to the git repository.

Signed-off-by: Michele Tartara <>
Reviewed-by: Iustin Pop <>

ec5af888 12/13/2012 01:29 pm Michael Hanselmann

Read watcher pause using RPC, not directly

The master daemon should not directly read files written by the node
daemon. This patch adds a new RPC to read the watcher pause file and
changes the master code to use it.

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

7c4bd156 12/13/2012 01:29 pm Michael Hanselmann

Set watcher pause on all nodes

Instead of just setting the watcher pause file, which isn't replicated,
RPC is used to set it on all nodes (where possible). This means that
after an outage of the master node and a following master-failover, the
watcher will still be paused....

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

f2bca93e 12/13/2012 01:28 pm Michael Hanselmann

Generated RPC code: Don't write whitespace after paren

There is no obvious need for this space--the line would wrap at the next
space, which comes soon after.

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

164947cc 12/12/2012 05:54 pm Dato Simó

Jobs.hs: make L.Client the last argument for all functions

Having the Luxi client be the last argument of the functions allows for
easier use with `Exception.bracket L.getClient L.closeClient ...`.

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

5f2cdb2a 12/12/2012 05:06 pm Michele Tartara

Fix a bug in the hs-coverage rule of Makefile.am

The coverage information for mon-collector was not merged correctly.

Signed-off-by: Michele Tartara <>
Reviewed-by: Iustin Pop <>

23f1bf29 12/12/2012 03:25 pm Michael Hanselmann

uidpool: Remove roman number support

Doing so simplifies to code a bit and never had a practical use.

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

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

cefd4a4a 12/12/2012 02:09 pm Michele Tartara

Add shelltests for the mon-collector

This commit adds shelltests for the mon-collector binary and for the DRBD
data collector.

Also, it fixes a small bug in the DRBD parser found thanks to the tests.

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

332b1340 12/12/2012 02:09 pm Michele Tartara

Add the stand-alone data collector for DRBD

It is implemented as a single binary receiving, as its first parameter,
the name of the actual data collector to be run.
This way, its structure can be used for all the future data collectors.

Also, factored out of bdev.py into constants.py the location of the DRBD...

61e062dd 12/12/2012 02:08 pm Michele Tartara

Move the path of the DRBD status file to the Constants file

It will be needed by the DRBD data collector, that will be added shortly.

Signed-off-by: Michele Tartara <>
Reviewed-by: Iustin Pop <>

432d62a8 12/12/2012 01:43 pm Helga Velroyen

Make configure check for haskell vector library

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

405656b7 12/12/2012 11:20 am Helga Velroyen

Remove usage of reserved key word 'family'

An old hlint version (1.8.28) was complaining about the
word 'family' being used in the network tests. Thanks to
an epiphany of Iustin this was due to that it is a reserved
key word.

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

fcc1977b 12/12/2012 10:43 am Helga Velroyen

Add documentation about new dependency to vector lib

Updates the INSTALL file to add the haskell library
libghc-vector-dev.

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

76a0266e 12/11/2012 05:18 pm Helga Velroyen

Network and address pool (again)

Implementation of the network objects and address pool. Functionality
as in the reverted commit b9a616e132af9bba718d2da8c94eeec7af886814, but
now using only the vector library and not the bit-vector library.
Tested with vector library version 0.9 and 0.10., which are...

9eac61f8 12/11/2012 04:53 pm Michael Hanselmann

Fix ordering of entries in tools.ensure_dirs

Commit ebd437a added two new entries to tools.ensure_dirs, but did so in
the wrong order. Patch forthcoming to improve the unittest's error
message.

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

ebd437a4 12/11/2012 04:31 pm Michael Hanselmann

Set owner on watcher pause and queue drain files

If the files were created by a user different, e.g. due to a switch from
running masterd as root to running it as a dedicated user, they couldn't
be modified/removed anymore.

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

af8f2fbf 12/11/2012 04:31 pm Michael Hanselmann

lib/tools/ensure_dirs.py: Code formatting

Wrap lines in a consistent manner (uid/gid on the second line) if
wrapping is necessary at all. “git diff --color-words” shows no
difference at all as only whitespace changed.

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

be6c403e 12/11/2012 03:37 pm Michael Hanselmann

Replicate queue drain flag across all master candidates

Until now, the flag was unset on a master failover unless the
“$localstatedir/lib/ganeti/queue/drain” file existed.

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

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

af54b7d7 12/11/2012 01:01 pm Michael Hanselmann

constants: Remove duplicate DRBD barrier option

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

d4e297b8 12/10/2012 07:02 pm Michael Hanselmann

doc/rapi.rst: Add ECODE_TEMP_NORES

The assertion was failing as ECODE_TEMP_NORES was not documented.

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

e2dd6ece 12/10/2012 06:03 pm Michael Hanselmann

Change value for ECODE_TEMP_NORES

Unfortunately there was a bug in commit 518a45e whereby ECODE_TEMP_NORES
had the same value as ECODE_NORES, leading to failures in a Haskell
test. Of course this would also have affected other users of the constant.

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

94811696 12/10/2012 05:53 pm Michael Hanselmann

Make htools/Ganeti/Constants.hs depend on errors.py

It also uses values from “lib/errors.py”.

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

78fcfd43 12/10/2012 04:47 pm Michael Hanselmann

masterd: Remove duplicate code

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

7fb5ac7c 12/10/2012 04:23 pm Michael Hanselmann

Improve error message for when adding inotify watcher fails

Explicitely mention the fs.inotify.max_user_watches sysctl value.

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

6bee863c 12/10/2012 04:23 pm Michael Hanselmann

htools/Ganeti/Errors: Add ECodeTempNoRes

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

be505f2c 12/10/2012 03:34 pm Michael Hanselmann

Update pyinotify website

It has moved to github.com.

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

bccb8d20 12/07/2012 05:43 pm Dato Simó

htest/Types.hs: check ordering of some ADTs

In some ADT, ordering of constructors is important because a certain
meaning is attached to ordinality (e.g., "clusters with lesser AllocPolicy
are preferred").

To ensure constructor order is not accidentally changed, this commit...