Statistics
| Branch: | Tag: | Revision:

root / src @ 35cded14

# Date Author Comment
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 <>...

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

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

66927d09 03/03/2014 06:05 pm Klaus Aehlig

Export lock intersection through WConfD

Export the functionality to restrict the owned locks to a given set.

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

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

Export freeLocks through WConfD

Export the functionality to free all locks of a given
owner.

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

032befbd 03/03/2014 06:05 pm Klaus Aehlig

Add lock modification without result to WConfdMonad

Enrich the structure of WConfdMonad by a convenience
wrapper around modifyLockAllocation for the case that
the modification always succeeds and does not produce
any result.

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

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

Export updateLocks through WConfD

Export the functionality to update the locks of a given
owner through WConfD.

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

62f1e053 03/03/2014 06:05 pm Klaus Aehlig

Add serialization for LockRequest GanetiLocks

Add a module describing how abstract requests, like lock requests are
passed over the wire to WConfD.

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

84640a93 03/03/2014 06:05 pm Klaus Aehlig

Export listing of locks

Make WconfD answer requests about the locks of a specific
owner.

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

3e80d1b7 03/03/2014 06:05 pm Klaus Aehlig

Support reading the lock allocation in WConfdMonad

As opposed to the atomic modify-and-read provided my modifyLockAllocation,
no storing is necessary here.

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

71b770a9 02/28/2014 03:39 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    Setting correct permissions of client cert (split-user)
    Add luxid group to 'users-setup'
    Add some whitespace to fix formatting
    Consider old client cert only when available
    Fix return of 'Validate'...
2992f2f7 02/28/2014 02:31 pm Klaus Aehlig

Fix generic uncurrying

in the case of n>1, the n-ary uncurry function is of the form
\f (x_1, ..., x_n) -> ... rather than \f x_1 ... x_n -> ...

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

0cffcdb1 02/28/2014 02:08 pm Dimitris Bliablias

Allow cluster mac prefix modification

Extend LUClusterSetParams to allow the modification of the cluster
mac-prefix setting in 'gnt-cluster modify' command.

This fixes part of issue 239.

Signed-off-by: Dimitris Bliablias <>
Reviewed-by: Jose A. Lopes <>

353bd75b 02/28/2014 02:08 pm Dimitris Bliablias

Show mac prefix setting in gnt-cluster info

Include mac-prefix setting in the output of 'gnt-cluster info'
command.

This fixes part of issue 239.

Signed-off-by: Dimitris Bliablias <>
Reviewed-by: Jose A. Lopes <>

e1e36b88 02/27/2014 04:33 pm Klaus Aehlig

Locks are owned by job id file path pairs

...according to our updated design.

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

b28f715a 02/27/2014 04:33 pm Klaus Aehlig

Remove the client state from WConfD monad

As we decided to keep our protocols stateless, the client
state is no longer needed.

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

ef89d9d5 02/27/2014 04:04 pm Michele Tartara

Have SubmitManyJobs add entries to the reason trail

Not only SubmitJobToDrainedQueue (and therefore SubmitJob) but also
SubmitManyJobs has to add "gnt:opcode:*" entries to the reason trail.

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

830b09dd 02/27/2014 03:17 pm Michele Tartara

Add reason trail pickup constant

Add a constant for the reason trail, representing the pickup of a job from the
disk.

Also, refactor a bit the other constants so that part of the definition can be
shared in a hierarichical fashion.

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

0c779689 02/27/2014 03:17 pm Michele Tartara

Have LuxiD add the "gnt:opcode" reason trail entry

The entry used to be added in jqueue.py, but after switching the queue
management from masterd to luxyd it had been lost. Now, make LuxiD responsible
for adding it.

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

65a3ff88 02/27/2014 03:17 pm Michele Tartara

Add function for extending the reason trail in Luxid

The function will be used by the next commit.

Also, remove a few trailing whitespaces lying around the file.

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

08fcaf55 02/27/2014 12:27 pm Petr Pudlak

Add missing constant for the name of WConfd

The constant is used when calling the daemon startup/shutdown scripts.

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

bc820a01 02/27/2014 12:27 pm Petr Pudlak

Add the --force-node option to WConfd

.. and fix the superfluous options list in ganeti-wconfd.hs

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

9a0b8258 02/27/2014 12:27 pm Petr Pudlak

Add an option for disabling node checks at daemon startup

This is needed for WConfd, because during failover it needs to be
temporarily started in order to update the configuration on the selected
master candidate.

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

803dafcd 02/27/2014 12:18 pm Petr Pudlak

While at it, fix the order of imports in OpCodes.hs

.. so that Ganeti imports are below library imports and ordered
alphabetically.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Michele Tartara <>
Reviewed-by: Jose A. Lopes <>

e713a686 02/27/2014 12:18 pm Petr Pudlak

Add a function for generating OpCode reason src. names

The function convert the opcode name to lowercase with underscores,
strips the 'Op' prefix and prepends Constants.opcodeReasonSrcOpcode.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Michele Tartara <>...

ffdcc263 02/27/2014 12:18 pm Petr Pudlak

Add a TH function for lower-cased stripped opcode names

The function strips the 'Op' prefix from a constructor name and converts
it to lower-case with underscores.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Michele Tartara <>...

8aab74e9 02/27/2014 12:18 pm Petr Pudlak

Generalize genConstrToStr to custom monadic functions

This will allow compile-time checks for constructor names.

Signed-off-by: Petr Pudlak <>
Reviewed-by: Michele Tartara <>
Reviewed-by: Jose A. Lopes <>

5ca6adf5 02/26/2014 07:17 pm Klaus Aehlig

Prefer unless over when (not...)

...and by doing so, please lint.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Hrvoje Ribicic <>

5e26a86e 02/26/2014 06:23 pm Klaus Aehlig

At startup, make WConfD read the lock allocation from disk

On startup, make wconfd read a the state of the lock allocation from disk,
instead of starting from an empty allocation.

Note that, as opposed to the configuration, no finding a saved
log configuration is not an error; e.g., the node might be master...

f3eb4bfd 02/26/2014 06:23 pm Klaus Aehlig

Provide path to persist locks

As we aim to handle jobs as separate processes with locks
handled by WConfD, we need to persist the locks to ensure
they survive a restart of that deamon. Saving only on master
daemon is enough, however.

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

c8751a72 02/26/2014 06:23 pm Klaus Aehlig

Add a function to load lock allocation from disk

Lock allocation are stored on disk as their JSON representation.

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

15a53b1e 02/26/2014 06:23 pm Klaus Aehlig

Make Locks a JSON instance

As requests to acquire or release locks come via
inter-process communication, we need a serialization
of the locks data type.

All locks are serialised as JSON objects, where the
key "type" describes the type of lock, and the remaining...

71dc39a1 02/26/2014 06:23 pm Klaus Aehlig

Make LockAllocation an instance of JSON

In this way, we can serialize a lock state to disk, so that
locks can survive a restart of WConfD.

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

508c7d70 02/26/2014 03:04 pm Klaus Aehlig

Add query support for locks to luxid

While requests only get forwarded, it still helps to
get luxid feature-complete with respect to master.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Petr Pudlak <>
Cherry-picked from commit a6e406ce376453e90e598c7be68809d6a7bd7d41...

014eaaa0 02/26/2014 03:04 pm Klaus Aehlig

Provide fields for lock queries

For luxid to be feature-complete with respect to masterd, it
also needs to answer requests about locks. This includes knowing
the fields available for locks.

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

59651d52 02/26/2014 02:07 pm Petr Pudlak

Export reading and writing the configuration using RPC

Note that currently these functions lack any kind of locking and
concurrent calls to 'writeConfig' will result in lost changes in the
configuration.

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

833c32b3 02/26/2014 02:07 pm Petr Pudlak

Add a module for functions specific to config. management

.. and include ConfigData in WConfd's ConfigState.

Currently it includes functions for asynchronous saving the
configuration and reading and (over)writing it in the daemon state.

Load the configuration from the file at daemon startup and configure an...

13d26b66 02/26/2014 02:06 pm Petr Pudlak

Add more general conf. handling functions to WConfd's Monad

Add functions for reading and writing the configuration. Writing
triggers the asynchronous worker which saves the configuration into the
master file. The actual action that saves the configuration is passed as...

a6a6a1b5 02/26/2014 02:06 pm Petr Pudlak

Add functions for saving the configuration to Ganeti.Config

.. so that it can be not only read, but also written to the master
configuration file.

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

c5f6dcdf 02/26/2014 02:06 pm Petr Pudlak

Add a module for creating and using asynchronous workers

Each such worker has its own background thread and performs a given
task when triggered. Triggers arriving when the worker is processing are
accumulated and processed together in a subsequent worker action....

5f6515b6 02/26/2014 02:06 pm Petr Pudlak

A separate module for functions for atomic file operations

Utils is getting too big, so better split this new set of functions into
a separate sub-module. This also allows us to use ResultG there.

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

0efada2a 02/26/2014 02:06 pm Petr Pudlak

Add a function for lifting ResultT from a MonadBase

Often we have `ResultT e IO a` as the return type of our primitive
functions and we need to lift them into a monad stack that is also based
on IO. This function accomplishes this by lifting a ResultT in a base...

32be18fc 02/26/2014 02:06 pm Petr Pudlak

Add a type alias for "ResultT GanetiException IO"

This type occurs often in the upcoming code so it's worth having an
alias for it.

It's included in Errors instead of Utils, because it depends on
GanetiException, and importing Errors from Utils causes a cyclic...

015278eb 02/26/2014 02:06 pm Petr Pudlak

Add logging functions lifted into MonadBase

Calling logging functions in a monad transformer stack requires
instances for all the transformers.
This patch adds a module with functions named just as in Ganeti.Logging,
but lifted into MonadBase. This allows using them in any transformer...

78e0f701 02/26/2014 02:06 pm Petr Pudlak

Add a MonadLog instance for strict StateT and IdentityT

This will be used for asynchronous workers, for which it's convenient to
use StateT to keep their internal state.

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

5fd32824 02/24/2014 05:44 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.10
    Let the instance's tuple of nodes start with the primary
    Fix the test that checks for the order of instance's nodes
    Revision bump for the 2.10.0 release
    Update NEWS file for 2.10.0
    Revision bump for 2.10.0~rc3...
ead368bb 02/24/2014 04:42 pm Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Let the instance's tuple of nodes start with the primary
    Fix the test that checks for the order of instance's nodes
    Revision bump for the 2.10.0 release
    Update NEWS file for 2.10.0
  • stable-2.9...
2977b72c 02/24/2014 01:53 pm Klaus Aehlig

Merge branch 'stable-2.9' into stable-2.10

  • stable-2.9
    Fix net-common script in case of routed mode
    Document hspace's SPN parameters
    Document spindles in TSPEC
    man: Update the manual page of gnt-node FAILOVER
    Make hbal deal with no-LVM storage space properly...
4b217f68 02/21/2014 02:14 pm Klaus Aehlig

Support opportunistic lock allocation

Add a function to opportunistically allocate as many locks of a given
set as possible. This is equivalent to sequentially try the locks in
increasing lock order after restricting to those locks where the
required owner state is higher than the currently held one....

d8216f2d 02/21/2014 02:14 pm Klaus Aehlig

Add a convenience function to restrict locks to a given set

As it is an operation the locking daemon is supposed to provide,
add a function restricting the locks of a user to a given list
and release all other locks.

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

956b83d6 02/20/2014 10:12 am Klaus Aehlig

Enforce the order restrictions on group locks

Disallow requests for an exclusive lock, if the owner already
holds a shared (and only shared) lock on a group lock that lock
belongs to.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Helga Velroyen <>

3daaab6c 02/19/2014 04:31 pm Helga Velroyen

Make hbal deal with no-LVM storage space properly

Since 2.6, hbal crashes when used on a cluster where no
LVM storage is enabled at all. The problem is that it
always queries for fields that only sometimes make
sense for certain types of storage. This patch will...

1ca6b451 02/19/2014 03:45 pm Klaus Aehlig

Efficiently verify consistent lock requests

Most requests for lock updates are consistent and mention
every lock only once. So verify this property efficiently
by comparing lengths. Only if the length do not coincide
go through the actual (quadratic) comparison to find a...

381889dc 02/19/2014 03:45 pm Klaus Aehlig

Support lock implication in allocation

Make the module abstractly handling lock allocation
honor the additional restrictions caused by lock
implications.

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

80004e70 02/19/2014 03:45 pm Klaus Aehlig

Add a convenience function to free all locks of an owner

While freeing all locks of a single owner can easily be defined
out of listLocks and updateLocks, it is worth having this function
in its own right. For example, it will be needed when the death of...

75033afd 02/19/2014 03:45 pm Klaus Aehlig

Make GanetiLocks an instance of Lock

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

91e5d533 02/19/2014 03:45 pm Klaus Aehlig

Add a type class describing types that can serve as locks

Besides the lock order and Show, an additional datum is needed in order
to describe lock inclusion, used, e.g., for group locks. So add a type
class describing this property.

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

c6d48e16 02/19/2014 03:45 pm Klaus Aehlig

Add missing documentation to exported function listLocks

The module Ganeti.Locking.Allocation exports the function listLocks,
hence a documentation string is required. Add it.

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

336b1c88 02/19/2014 11:23 am Klaus Aehlig

Merge branch 'stable-2.10' into stable-2.11

  • stable-2.10
    Revision bump for 2.10.0~rc3
    Update NEWS file for 2.10.0~rc3
  • stable-2.8
    Fix integer overflow problem in hba
    Add missing space

Conflicts:
NEWS: take both additions
configure.ac: ignore suffix bump...

c715d059 02/19/2014 10:58 am Thomas Thrainer

Merge branch 'stable-2.9' into stable-2.10

  • stable-2.8
    Fix integer overflow problem in hbal
    Add missing space

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

e04860cc 02/19/2014 10:39 am Jose A. Lopes

Constant for instance communication network mode

Create a new constant to hold the instance communication network mode
as this constant will be necessary during the QA, and update the
general documentation about the constants related to the instance
communication mechanism....

93f1e606 02/19/2014 10:39 am Jose A. Lopes

Add '-c | --instance-communication' flag to instance modify

  • Add the instance communication flag to the 'OpInstanceSetParams'
    opcode. This flag allows the user to enable/disable instance
    communication in a running instance. This patch adds this flag but...
fc963293 02/19/2014 10:39 am Jose A. Lopes

Fix param name to conform to convention of optional params

The opcode parameters can be optional and parameters that are optional
have their names prefixed by 'pOpt'. This patch fixes with parameter
to conform to this convention.

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

7a51281a 02/18/2014 04:39 pm Jose A. Lopes

Fix whitespace and typos in comments

Signed-off-by: Jose A. Lopes <>
Reviewed-by: Hrvoje Ribicic <>

857a05fe 02/18/2014 12:30 pm Petr Pudlak

Disable deprecation warnings in PyRPC

Since on Debian Squeeze we have TH version 2.4, we need to use 'report'
instead of 'reportWarning/reportError'. However, 'report' is deprecated
in later versions, therefore we need to disable the warning.

The warning doesn't manifest on Debian Squeeze or Wheezy, but causes...

a317d77a 02/17/2014 03:40 pm Klaus Aehlig

Make the lock allocation part of WConfD's state

As WConfD is supposed to be the authoritative source for
configuration and locks, it needs to have access to the lock
state as well.

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

95eb97c8 02/17/2014 03:40 pm Klaus Aehlig

Add a module for the Ganeti lock structure

Already provide a module holding the structure of the locks
available in Ganeti, so that the overall structure of WConfD
can be implemented. The actual locks still have to be added.

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

3f173b09 02/17/2014 03:40 pm Klaus Aehlig

Derive Ord JobId

Make the type JobId an instance of Ord. While the order itself
does not matter, it is a prerequisite to be an instance of Ord
to be used as the type of lock owners.

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

15208e95 02/17/2014 03:40 pm Klaus Aehlig

Add function describing lock updates

Add the pure part of the mechanism of updating locks. To allow
for efficient waiting on locks, return the set of owners of the locks
on which the operation is blocked.

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

a1da8a50 02/17/2014 03:40 pm Klaus Aehlig

Add a function to leave the list monad

The list monad provides convenient syntax for non-deterministic
algorithms. Add a function leaving that monad with this intuition
in mind.

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

c2b8d366 02/17/2014 03:40 pm Klaus Aehlig

Add data structure representing current lock status

To allow for jobs as processes, a central daemon (wconfd) will
handle allocation and release of locks. Add an appropriate data
structure to describe the current status of the locks.

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

a53772a0 02/14/2014 04:57 pm Klaus Aehlig

Merge branch 'stable-2.11' into master

  • stable-2.11
    Update design doc wrt to improved SSL design
    Test node certificate renewal in QA
    Use node UUID as client certificate serial number
    Revert "Temporarily remove SSL changes from NEWS file"
    Revert "Disabling client certificate usage"...
ab4b1cf2 02/14/2014 03:51 pm Helga Velroyen

Use node UUID as client certificate serial number

It turns out, that some implementations of OpenSSL are more
pedantic in checking the certficates than others. In this
particular case, the SSL connection could not be
established when the serial number of the certificates...

d5104ca4 02/14/2014 03:51 pm Helga Velroyen

Revert "Disabling client certificate usage"

This reverts commit 45f75526b848, which was introduced to
temporarily disable the implementation of SSL client
certificates. As this patch series fixes the reason for
the disabling, we are rolling back the patch....

a2a1a8ca 02/14/2014 11:47 am Petr Pudlak

Add functions for atomic operations on files

Function 'atomicUpdateFile' extends 'atomicWriteFile' that allows any
action to be run on a temporary file.

Function 'atomicUpdateLockedFile' additionally locks the original file
using flock and checks if its state conforms to the last one....

e465608f 02/14/2014 11:47 am Petr Pudlak

Add mtime/ctime to ConfigData

It's used on the Python side, it's been missing on the Haskell side.

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

31daf7db 02/14/2014 11:47 am Petr Pudlak

Re-export liftIO from BasicType

This makes usage of ReaderT's liftIO more convenient.

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

81959e7b 02/14/2014 11:47 am Petr Pudlak

Generate WConfD Python stubs from Haskell

The generation is included in hs2py.hs, together with other
Haskell to Python code generators.

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

f952ed9f 02/14/2014 11:47 am Petr Pudlak

Generate Python stubs by inspecting functions using TH

The names of the arguments of generated Python methods are derived from
Haskell types to be as descriptive as possible.

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

59881a0b 02/14/2014 11:47 am Petr Pudlak

Add the WConfD daemon itself

The daemon exposes the declared functions in Ganeti.WConfd.Core to RPC
clients (currently just 'echo').

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

fb0fa957 02/14/2014 11:47 am Petr Pudlak

Add the WConfD daemon to build configuration files

Also list it in the Haskell datatype, constants, Python constants and
test configuration.

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

13f59e11 02/14/2014 11:47 am Petr Pudlak

Add a module for WConfd core functions

There are no exported functions yet, except for `echo`, which just
returns its argument back to a client.

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

12121213 02/14/2014 11:47 am Petr Pudlak

Add a MonadLog instance for strict variant of RWS

This allows to log in monad stacks containing RWS.

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

9515a7d2 02/14/2014 11:46 am Petr Pudlak

Add a monad for running all WConfD functions

This monad encapsulates working with the daemon and client state, as
well as failures and IO operations.

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

a85aef5c 02/14/2014 11:46 am Petr Pudlak

Add a generic RPC module

The main function in this module takes a list of names of functions and
uses TH to create an RPC server, represented as a value of type Handler
(from Ganeti.UDSServer). This can be readily used to create a daemon
that dispatches RPC requests to the given functions....

f3a522ff 02/14/2014 11:46 am Petr Pudlak

Add common functions for working with TH's Type

In particular, functions for extracting types of arguments from a
function type, and for uncurrying functions with an arbitrary number of
arguments.

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

f20038fd 02/14/2014 11:46 am Petr Pudlak

Another workaround for GHC linking error "unknown symbol"

This error appears after adding the dependency to lifted-base.
See also #683 and ee7caf27.

I surmise that something like this is happening: Some code, that uses
the library, is only referenced through Template Haskell. A probable bug...

d5868411 02/14/2014 11:46 am Petr Pudlak

Add instances of MonadBase and MonadControl for ResultT

This allows to use lifted operations like 'fork' or 'bracket' inside
ResultT.

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

b172b0ab 02/14/2014 11:46 am Petr Pudlak

Allow clients of UDSServer to use different monads

.. as long as they're instances of "MonadBaseControl IO" and "MonadLog".
This allows the UDSServer to call functions like "fork" within monads
such as "ResultT e IO" or "ReaderT IO".

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

81869422 02/13/2014 06:09 pm Klaus Aehlig

Merge branch 'stable-2.8' into stable-2.9

  • stable-2.8
    Fix integer overflow problem in hbal
    Add missing space

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Helga Velroyen <>

95ee8abb 02/13/2014 03:52 pm Michele Tartara

Fix integer overflow problem in hbal

waitForJobs in src/Ganeti/Jobs.hs has an integer overflow that (at least on
amd64) causes it to break after waiting for ~10 minutes. This results in hbal
sleeping forever (when compiled with squeeze's ghc 6.12.1) or crashing (when...