Statistics
| Branch: | Tag: | Revision:

root @ 7ea201c9

# Date Author Comment
7ea201c9 03/07/2014 05:22 pm Petr Pudlak

Add an asynchronous task for distributing SSConf to nodes

The task computes the SSconf data and compares it to the last state that
was successfully distributed. If it differs, issues the RPC call to
distribute it. If any of the RPC calls fails, the state remains...

9a8952e0 03/07/2014 05:22 pm Petr Pudlak

Add Haskell RPC call for distributing SSConf to nodes

The data is sent as a dictionary mapping file names to lists of lines.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

3fb0d66f 03/07/2014 05:22 pm Petr Pudlak

Let the SSConf RPC server side handle lists

Since on Haskell side we represent SSConf as list of lines, let the
Python side understand it as well.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

1f87d93d 03/07/2014 05:22 pm Petr Pudlak

Add a test for (de)serialization of Ssconf

.. to verify that readJSON . showJSON = Ok.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

731152ce 03/07/2014 05:22 pm Petr Pudlak

Add a module for constructing Ssconf from the configuration

This migrates the functionality from Python
ConfigWriter._UnlockedGetSsconfValues to Haskell.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

ce52f060 03/07/2014 05:22 pm Petr Pudlak

Add a data type for representing the complete SSConf

.. as a map from SSKeys to lists of strings.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

3d148957 03/07/2014 05:22 pm Petr Pudlak

Improve Haskell functions for managing the UidPool

Add a formatting function that is needed by Ssconf.
Also expose 'ipFamilyToRaw', which is needed as well.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

6b76931c 03/07/2014 05:22 pm Petr Pudlak

Add missing keys to Ganeti.Ssconf

These keys were probably introduced only in Python later and weren't
added to the Haskell code.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

41ea331e 03/07/2014 05:22 pm Petr Pudlak

Let WConfd distribute the configuration to MCs

.. and remove the distribution from lib/config.py

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

94c7e022 03/07/2014 05:22 pm Petr Pudlak

Function that distributes the configuration to MCs

Also refactor helper functions in WConfd/ConfigWriter into smaller ones
and add helpers for RPC calls.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

a1f35d0a 03/07/2014 05:22 pm Petr Pudlak

Add a function for listing online nodes to Haskell

.. and also simplify 'getMasterCandidates'.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

b6eee126 03/07/2014 05:22 pm Petr Pudlak

Add the RPC call for uploading a file to Haskell

.. and also add a function that prepares the call from a given file.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

2f254850 03/07/2014 05:22 pm Petr Pudlak

Functions for conversions between POSIX time and ClockTime

This will be needed by the RPC calls to convert Haskell native
representation to the one used in RPC.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

129bde01 03/07/2014 05:22 pm Petr Pudlak

Add reverse mappings to RuntimeEnts from UIDs to names

.. and GIDs to names. Also create a proper data type for it.

The reverse mapping to names is needed for properly translating local
IDs to names for RPC calls.

Use 'ResultT' for 'getEnts' and handle all exceptions, not just when a...

b3590640 03/07/2014 05:22 pm Petr Pudlak

Add a new RPC server call for uploading a single file

The server side processes the request exactly the same as for
"upload_file".

Unlike "upload_file", the new call "upload_file_single" declares all
required fields without requiring additional preprocessing....

127266b4 03/07/2014 05:22 pm Petr Pudlak

Add more meaningful error messages to asserts in vcluster

.. to simplify debugging of RPC calls.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

d6f05205 03/07/2014 05:22 pm Petr Pudlak

Create a data type for representing RPC compressed data

It is serialized as a JSON pair. The first element is a number
describing the compression type, the second element the actual data
(in this case Base64+Zlib encoded).

On the Python side it is decompressed by backend._Decompress....

8c337f87 03/07/2014 05:22 pm Petr Pudlak

Add a module for handling compression

Since the Haskell 'zlib' library by default uses exceptions for
signalling errors, we need to use its internals to implement a proper,
pure decompressing function.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

8e527d04 03/07/2014 05:22 pm Petr Pudlak

Enhance logRpcResults to also return the list of errors

It is common to log all RPC errors and then check if there were any.
Since 'logRpcResults' needs to filter the errors anyway, let it return
it.

Factor out the part that filters out errors into a separate function....

e45eeb79 03/07/2014 05:22 pm Petr Pudlak

Use lenses for modifying DaemonState in WConfd

This removes the verbose code for record updating and leads to more
point-free code.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

0d1d2d22 03/07/2014 05:22 pm Petr Pudlak

Write the configuration only if it changed

.. to avoid expensive operation when they're not actually needed.
Comparing the two objects in memory is much less costly that
distributing the configuration.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

227c0ef3 03/07/2014 05:22 pm Petr Pudlak

Add a module for generated lenses for Ganeti.Objects

The module also adds type classes for lenses for common fields (serial,
mTime, uuid and tags).

Splitting the lenses into a separate module avoids problems with unused
functions.

Signed-off-by: Petr Pudlak <>...

ba40281b 03/07/2014 05:22 pm Petr Pudlak

Add a module for custom generic Lens functions

The module currently re-exports Control.Lens and adds a function that
creates lenses from data types by appending 'L' to its field names.

All Ganeti modules should import this module instead of Control.Lens...

eb9d2acc 03/07/2014 05:22 pm Petr Pudlak

Add 'lens' Haskell dependency

.. that will be used in WConfd

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

6696f1f9 03/07/2014 05:22 pm Petr Pudlak

Add a helper for creating 'FileMode' fields

.. which will be used for RPC objects.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

72375ff8 03/07/2014 05:22 pm Petr Pudlak

Move helpers for specific fields into a separate module

These helpers aren't needed by other code in Ganeti.THH and since the
module is already large, it'll be better to separate them into their
own.

No functionality is changed by this patch, just functions moved....

1e0d1a19 03/07/2014 05:22 pm Petr Pudlak

Add a helper to ConfigWriter for creating async. workers

In particular, stateful workers that can fail with an error, in which
case the error is logged and the state remains unchanged.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

9faf1c01 03/07/2014 05:22 pm Petr Pudlak

Add Foldable/Traversable instances for GenericContainer

This makes working with it easier as it allows use of many standard
functions.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

342b888d 03/07/2014 04:02 pm Klaus Aehlig

Update style guide with respect to Haskell imports

With the number of imports increasing, our style has
evolved over time.

- We don't distinguish between standard and non-standard
non-Ganeti libraries any more.

- To help the reader identify which library a function is...

9558c2a4 03/07/2014 02:16 pm Hrvoje Ribicic

Clean up RunWithLocks

This patch cleans RunWithLocks up a little bit by reducing the number
of delay function terminations, and using the QAThread class to ensure
exceptions are thrown at the right time and in the right place.

Signed-off-by: Hrvoje Ribicic <>...

e677d5e8 03/07/2014 02:16 pm Hrvoje Ribicic

Add an exception-trapping thread class

To have better control over threads, this patch adds a helper Thread
subclass which captures any exceptions occurring for later use.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

fbab1c76 03/07/2014 02:16 pm Hrvoje Ribicic

Wait for delay to provide interruption information

The RunWithLocks test assumed that gnt-debug delay would have the info
needed for interruption ready immediately after being run, and in some
situations this is not the case. This patch makes the test more patient...

f3010b75 03/07/2014 10:57 am Klaus Aehlig

Also clean up stale livelock files

Upon detection of a stale livelock, make WConfD also
try to clean it up. We can safely ignore any failures,
as the Ganeti resources are already freed, and the worst
thing that can happen is an empty file left over in the...

01e7bf98 03/07/2014 09:35 am Petr Pudlak

Add Haskell dependency on 'lens'

.. which will be needed soon for WConfd.

While at it, also ensure we have the required version of
base64-bytestring.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

885759da 03/07/2014 09:35 am Petr Pudlak

Refactor warnings issued by the latest 'hlint'

.. as the newest version of hlint adds additional checks

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

33ead7a7 03/07/2014 09:35 am Petr Pudlak

devel: Instal vanilla GHC7 in the squeeze schroot

Since the default GHC6 isn't usable for modern libraries and starting
from wheezy there is GHC7 anyway, download and install the current
vanilla version as well as the latest Cabal.

Use the current up-to-date libraries....

58bcf276 03/07/2014 09:35 am Petr Pudlak

devel: Make the built schroots rsync-able, if available

This speeds down transferring them to buildbots, at a negligible size
cost.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

8a37b426 03/06/2014 05:35 pm Klaus Aehlig

Use correct lockfile for gnt-debug wconfd

As jobs are currently running in masterd, use the masterd livelock
file.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

a0a92e23 03/06/2014 05:35 pm Klaus Aehlig

Add utility to guess livelock file for an owner

As livelock files are constructed in a systematic manner,
we can guess what the livelock file for a given owner is.
While this will not necessarily work perfectly, it will be
useful to simplify direct debugging of WConfD....

25e9f9b2 03/06/2014 05:35 pm Klaus Aehlig

Make masterd create a livelock file

...so that it can request resources from WConfd.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

1de2b387 03/06/2014 05:35 pm Klaus Aehlig

Rename setup_queue to setup_context in masterd

...as this function sets up a much richer context than just
the job queue, including the current lock management.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

a8c2197d 03/06/2014 05:35 pm Klaus Aehlig

Add utilities for liveliness lock files

To request resources from WConfD, requesters have to provide
the name of a file they own an exclusive lock on. In this way,
their death can be detected. Add utility functions to obtain
such a file name.

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

5d83892f 03/06/2014 05:35 pm Klaus Aehlig

Ensure the existence of LIVELOCK_DIR

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

38e28375 03/06/2014 05:35 pm Klaus Aehlig

Add a path to store the lock files presented to WConfD

When requesting resources from WConfD, a file has to be
presented where an exclusive lock is owned on, so that
WConfD can detect when the requester dies. Add a path
to a directory where these files are kept in....

db0d2ee9 03/06/2014 05:35 pm Klaus Aehlig

In WConfD run a cleanup task

Add the cleanup task for locks of died owners to WConfD,
as a separate thread.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

b57c50de 03/06/2014 05:35 pm Klaus Aehlig

Provide a periodic lock cleanup task

Provide a task that periodically checks for all locks
owners whether they are still alive. If not, it cleans
up their locks.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

a15072d7 03/06/2014 05:35 pm Klaus Aehlig

Add a constant for the polling of jobs death

Add a constant for the time interval at which WConfD checks for
resource owners that have died and cleans up their resources.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

01a9a382 03/06/2014 05:35 pm Klaus Aehlig

Verify that all lock owners indeed own a lock

Add a test verifying that the list of lock owners is not
too big in the sense that every subject contained in that
list owns at least one lock.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

27f28739 03/06/2014 05:35 pm Klaus Aehlig

Verify the list of lock owners is complete

In other words, verify that if all the lock owners release their
locks, the empty lock allocation is reached.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

26436ab5 03/06/2014 05:35 pm Klaus Aehlig

Add a function to determine the lock owners

To allow for clean up, add a function that provides the list
of all the owners holding at least one lock.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

bacb44fe 03/06/2014 05:35 pm Klaus Aehlig

Add a function to detect death of a job

With jobs running in processes different from the lock management soon,
we need to detect if a job holding locks dies, in order to release the
resources.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

0f6997b9 03/05/2014 02:17 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    Convert int to float when checking config. consistency
    Updateing release date to tomorrow
    Revision bump for the 2.11.0~beta1 release
    Set release date of 2.11 beta1
    Stop watcher from restarting down instances during an opcode...
f1638b0b 03/05/2014 01:51 pm Petr Pudlak

Convert int to float when checking config. consistency

When reading the configuration file from RPC JSON, values without a
floating point are parsed as 'int', not as 'float', and later the
consistency check fails.

This patch adds an automatic conversion from 'int' to 'float' during...

a6986cfb 03/05/2014 11:21 am Hrvoje Ribicic

Update the NEWS file

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

57efdaf5 03/05/2014 11:21 am Hrvoje Ribicic

Add an expected block option to RunWithLocks

To compensate for the cases where a QA test is supposed to block when
a lock is present, add an additional option showing whether blocking is
supposed to happen or not.

Signed-off-by: Hrvoje Ribicic <>...

34c5ec6c 03/05/2014 11:21 am Hrvoje Ribicic

Track if a QA test was blocked by locks

This patch adds threading to the RunWithTests function, allowing one
thread to execute the QA test, and the other to monitor if it is being
blocked by locks set up during the test. If it is, terminate the
blocking job, and let the QA continue, reporting the test failure at...

ffafdcf6 03/05/2014 11:21 am Hrvoje Ribicic

Add option to turn off command logging to GetCommandOutput

The command logging performed by GetCommandOutput can be distracting
and unwelcome. This patch adds a switch allowing the command output to
be muted as needed.

Signed-off-by: Hrvoje Ribicic <>...

1de1cd0c 03/05/2014 11:21 am Hrvoje Ribicic

Add an option for disabling the SSH multiplexer in QA

The SSH multiplexer is used by default in every connection made, and
when multiple threads are used, this causes strange issues when running
the QA locally. This patch allows the multiplexer to be bypassed,...

343c9ed2 03/05/2014 11:21 am Hrvoje Ribicic

Add a RunWithLocks QA utility function

This patch adds a QA utility function that acquires a set of locks, and
attempts to run a given function with the locks in place. Should the
given function block, this function does not detect this - later
patches will address the issue....

6b924ca3 03/05/2014 11:21 am Hrvoje Ribicic

Sort imports in qa_rapi.py

This patch sorts the imports of qa_rapi.py to make things a little bit
more orderly.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

fe5144b0 03/05/2014 11:21 am Hrvoje Ribicic

Align timestamps in gnt-job info

This patch aligns the timestamps output as a part of gnt-job info, and
performs minor refactorings in the process.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

d0202de7 03/05/2014 11:21 am Hrvoje Ribicic

Add alignment support to PrintGenericInfo

Aligning dictionary entries makes no difference to a YAML parser, but
makes the output much easier to read and compare. This patch adds the
possibility of specifying alignment groups to ordered dictionary
entries....

087f5520 03/05/2014 11:21 am Hrvoje Ribicic

Make gnt-job info output valid YAML

This patch changes gnt-job info to use standard functions defined in
cli.py, and output valid YAML.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

9ec1bcbd 03/05/2014 11:21 am Hrvoje Ribicic

Make PrintGenericInfo handle tuples better

The PrintGenericInfo function in cli.py did not handle tuples as
containers of items, making it impossible for these to be deserialized
automatically when a YAML parser is used. This patch adds separate
handling of tuples, including inlining them for readability when...

5fb7679c 03/05/2014 11:21 am Hrvoje Ribicic

Refactor move-instance QA test

The move-instance QA test will have to be changed in the following
patches to allow testing opportunistic locking.

This patch retains the same functionality as before, but allows an
iallocator to be used, and splits the move back and forth into two...

9dc47292 03/05/2014 11:21 am Hrvoje Ribicic

Make gnt-debug delay interruptible

The gnt-debug delay command could be useful as a means of acquiring
locks for testing purposes. In practice, to be useful it should be
interruptible, otherwise we risk race conditions or long delays.

This patch follows the examples of the move-instance command and the...

22c828a9 03/05/2014 11:21 am Hrvoje Ribicic

Add new log type

Following the example of the job-queue test, the delay also defines a
log message type of its own.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

787074d5 03/05/2014 11:21 am Hrvoje Ribicic

Add the interruptible option to gnt-debug delay

This patch allows the opcode option to be used through the gnt-debug
client.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

2868f3f7 03/05/2014 11:21 am Hrvoje Ribicic

Add the interruptible option to the delay opcode

To prepare for the use of sockets to interrupt a running delay opcode,
this patch adds an option to the opcode for doing so.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

c346d0ac 03/05/2014 11:21 am Hrvoje Ribicic

Factor Unix domain socket creation into helper class

As the delay class will also have to start using domain sockets,
extract the functionality into a helper class.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

a9a3416e 03/05/2014 11:21 am Hrvoje Ribicic

Fix minor accidental concatenation

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

aa14fb0a 03/05/2014 11:21 am Hrvoje Ribicic

Fix failing tests

The previously introduced changes caused some tests to fail. This patch
alters the tests to expect different values, while still ensuring
correct behavior.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

8631b46b 03/05/2014 11:21 am Hrvoje Ribicic

Handle incorrect duration more elegantly

The previous version of the LUTestDelay opcode relied on the utility
function complaining about the negative duration. As this function has
been removed for now, do the check ourselves, and issue a more
appropriate exception....

36870aa1 03/05/2014 11:21 am Hrvoje Ribicic

Make gnt-debug delay command run in parallel

The gnt-debug delay command executes the delay first on the master, and
only then on all the other nodes, causing a significant delay. This
patch makes the command treat the master as it would all other nodes....

47c43de1 03/05/2014 11:21 am Hrvoje Ribicic

Extend RAPI client constant unit test with error codes

The RAPI client is meant to be independent from the wider Ganeti
codebase, but it still needs to use Ganeti constants. To enforce this,
a unit test is used. This patch extends the unit test with error code...

363e2869 03/05/2014 11:20 am Hrvoje Ribicic

Fix typo in RAPI client utility

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

4fe43605 03/05/2014 11:20 am Hrvoje Ribicic

Add variation to delays between creation attempts

Attempting to acquire node locks with a certain fixed delay could lead
to unwanted synchronization with other processes competing for the same
locks. This patch adds some random variation to the attempts....

a396b2d6 03/05/2014 11:20 am Hrvoje Ribicic

Implement opportunistic locking in the move-instance tool

This patch allows opportunistic instance creations to be attempted,
with a delay between them giving nodes the opportunity to become
available. After the given number of opportunistic tries has been...

2c4ec08e 03/05/2014 11:20 am Hrvoje Ribicic

Add options for opportunistic creation during moves

To start off the introduction of oppportunistic locking during instance
creation, this patch adds the options allowing the locking to be
invoked.

Signed-off-by: Hrvoje Ribicic <>
Reviewed-by: Petr Pudlak <>

ec3a7362 03/05/2014 10:58 am Jose A. Lopes

Remove duplicated '_CheckOSVariant'

It seems '_CheckOSVariant' was moved from 'ganeti.cmdlib.instance' to
'ganeti.cmdlib.instance_utils' but the source was never deleted. This
patch deletes the source copy if this function.

Signed-off-by: Jose A. Lopes <>...

b7d4a7c5 03/04/2014 06:31 pm Helga Velroyen

Updateing release date to tomorrow

Since the release could not be made today, let's prepare
it for tomorrow.

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

bd701370 03/04/2014 06:14 pm Helga Velroyen

Revision bump for the 2.11.0~beta1 release

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

a1116f57 03/04/2014 06:14 pm Helga Velroyen

Set release date of 2.11 beta1

Set the release date of 2.11 beta1 in the NEWS file.

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

35cded14 03/04/2014 05:19 pm Petr Pudlak

Use 'ArrayObject' in Ganeti.RPC instead of manual encoding

Before most of the calls were implemented manually, ignoring any
generated code for maniupulating JSON. Using 'ArrayObject' we can
automate the process.

Signed-off-by: Petr Pudlak <>...

0b3a266d 03/04/2014 05:19 pm Petr Pudlak

Test the instance 'ArrayObject Disk'

.. which is one of the few ones that use extra fields.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

91f0dc1e 03/04/2014 05:19 pm Petr Pudlak

Add a helper function for testing 'ArrayObject' instances

It checks if 'fromJSArray . toJSArray' is equivalent to 'Ok'.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

26e32dee 03/04/2014 05:19 pm Petr Pudlak

Move 'DictObject' and 'ArrayObject' to Ganeti.JSON

The type classes are more closely related to JSON and for using them
it should not be necessary to import Ganeti.THH.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

948f6540 03/04/2014 05:19 pm Petr Pudlak

Add a typeclass for type serializable as a JSON array

This is in particular needed for RPC requests which are serialized this
way and therefore using `showJSON` on the generated objects doesn't
work.

The fiels are serialized in the order they're declared, together with...

0df2d967 03/04/2014 05:19 pm Petr Pudlak

Document 'fieldExtraKeys' in 'Field'

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

58b37916 03/04/2014 05:19 pm Petr Pudlak

Remove toDist... functions completely

Since thre already is `DictObject` class with `toDict`, there is no need
for them, just polluting the name space.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Klaus Aehlig <>

c2e136e2 03/04/2014 05:19 pm Petr Pudlak

Enhance DictObject and refactor loading/saving TH functions

Since there is already `DictObject` type class which could share code
with generated instances of `showJSON`, the generated code is split into
two parts: One that converts between `[(String, JSValue)]` and the data...

1d4febbd 03/04/2014 05:03 pm Klaus Aehlig

Write lock state to disk after updates

Make use of asynchronous worker to save to log status after every
update. The answer to the query is only returned, once the state
is saved on disk. Note that replication of the lock status is not
necessary, as all jobs will be gone if the master node goes away....

61fd6337 03/04/2014 05:03 pm Klaus Aehlig

Provide an asynchronous task for writing lock status

It will be used to persist the state of the lock allocation on
disk, allowing locks to survive reboots of WConfD.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

69809ae3 03/04/2014 02:27 pm Klaus Aehlig

Verify the intervall property of GanetiLocks

According to the specification in our design, if A is a group
lock and B belogs to this group, then all locks between A and B
in the lock order also must belong to A. Verify this.

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

cf7f8e51 03/04/2014 02:27 pm Klaus Aehlig

Verify implication restriction on locks

As specified in our design, if A is a group lock and B
belongs to A, then A must be earlier in the lock order
than B. Verify this property.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

2e1399da 03/04/2014 02:27 pm Klaus Aehlig

Update Arbitrary GanetiLocks

With the extension of Ganeti.Locking.Locks.GanetiLocks to the
full lock hierarchy, also extend the instantiation of Arbitrary.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

ec2355ad 03/04/2014 02:27 pm Klaus Aehlig

Add Ganeti Lock Hierarchy

Make Ganeti.Locking.Locks.GanetiLocks present the full Ganeti
lock hierarchy. This is in accordance with the current Python
implementation.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>...

79786c6b 03/04/2014 02:26 pm Klaus Aehlig

Serialize locks as JSON strings

...as the current Python implementation does as well.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

5d7ac40f 03/03/2014 06:05 pm Klaus Aehlig

Export opportunistic lock union through WConfd

Make WConfD provide a function to opportunistically allocate
locks.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>

dee434c2 03/03/2014 06:05 pm Klaus Aehlig

Support name generation for pairs

Add support for naming of python variables if the type
is a pair.

Note: on older versions of haskell, Q is not an instance of
Applicative, hence we use the do-syntax here.

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