Statistics
| Branch: | Tag: | Revision:

root / htools / Ganeti / Confd @ cefd4a4a

# Date Author Comment
63e166a5 12/07/2012 12:40 pm Michele Tartara

Fix typo in comment

There was a typo in the docstring of the parseMessage function of the
confd server.

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

139c0683 11/30/2012 03:54 pm Iustin Pop

Remove read instances from our Haskell code

It turns out that optimising 'read' derived instances (via -O) for
complex data types (like OpCode, or the various objects) can be slow
to very slow. Disabling such instances results in (time make
$all_our_haskell_binaries) large compile-time savings and also smaller...

32a569fe 11/15/2012 12:20 pm Iustin Pop

Cleanup THH function use from built module namespace

Currently, THH.hs "injects" into the built code names of library
functions like Text.JSON.makeObj, Ganeti.JSON.fromObj, etc. built
directly from strings, via (e.g.)

varE (mkName "makeObj")

This means that the "makeObj" name must exist in the target module,...

29a30533 11/12/2012 01:21 pm Iustin Pop

Remove unsafePerformIO usage

We need to change a few things, most importantly CLI options defaults,
but otherwise we already used the path to files from functions which
were already in the I/O monad, so we don't have to change much of the
code flow.

Additionally, Path.hs now has an explicit export list, to stop...

4c3f55b8 11/12/2012 12:02 pm Iustin Pop

Split queryd run into prepare and exec

This will help with the general daemon split of prepare/run, and flag
errors earlier in the startup.

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

ef3de7b0 11/12/2012 12:02 pm Iustin Pop

Move preparation steps of confd in prepMain

This does the address parsing earlier, before we fork, for
better/faster error reporting.

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

cdc2392b 11/08/2012 02:58 pm Iustin Pop

Rename Confd.hs to Confd/Types.hs

This should be the last module rename, promise!

We rename this to conform to the other hierarchies (e.g. Query), and
to not have both Confd.hs and Confd/*.hs.

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

2ac2e420 11/07/2012 05:58 pm Iustin Pop

Implement base checkFn/prepFn/execFn model for daemons

This mirrors the code in the Python code base, and is required for
clean error reporting during startup.

This patch implements the basic infrastructure; the confd daemon is
not yet modified to take advantage of this, just the types are...

b9612abb 11/07/2012 03:06 pm Iustin Pop

Merge branch 'devel-2.6' into submit

  • devel-2.6:
    Fix compatibility with newer Haskell libraries
    Fix gnt-instance console with xl

Conflicts:
Makefile.am (reordering, fixed)
htools/Ganeti/Confd/Server.hs (hlint fixes on master)
htools/Ganeti/Daemon.hs (hlint)...

1251817b 11/07/2012 10:46 am Iustin Pop

Fix compatibility with newer Haskell libraries

This small patch fixes compatibility with a few newer Haskell libraries:

- base 4.6, included with ghc 7.6, removed the deprecated 'catch'
function from Prelude, so our "import Prelude hiding (catch)" is now...

5183e8be 10/25/2012 01:05 pm Iustin Pop

Convert query path from string errors to GanetiException

This patch converts all the call paths from 'Result' (which contains
just string errors) to 'ErrorResult', which holds
GanetiException-encoded errors. We can now return proper
OpPrereq/OpExec errors to the clients of the luxi/query socket....

4cd79ca8 10/11/2012 01:03 pm Iustin Pop

Cleanup network timeouts and htools imports

This patch removes the last HTools module imports from non-htools code
(the HTools.Types module), but it requires an associated cleanup:
using luxi-specific constants for luxi timeouts (the only effect is
that one timeout decreases from 15 to 10, the default value in the...

26d62e4c 10/08/2012 12:35 pm Iustin Pop

Rename Ganeti/HTools/Utils.hs to Ganeti/Utils.hs

This is, I believe, the last non-htools specific file that still lived
in the htools directory; it's already widely used in non-htools code,
so let's move it before we add more functionality to this module....

9eeb0aa5 09/18/2012 06:11 pm Michael Hanselmann

Use autoconf-based paths from Haskell instead of constants

Future changes will change Path.hs to use an environment variable.

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

5b11f8db 09/05/2012 05:31 pm Iustin Pop

Further hlint fixes

Commit 2cdaf22, “Re-enable standard hlint warnings”, got it almost
right. The only problem is that (confusingly) the default set of hints
is not in HLint.Default, but in HLint.HLint (it includes Default and
some built-ins).

After changing the lint file to correctly include the defaults, we had...

f3baf5ef 09/04/2012 04:51 pm Iustin Pop

Move JSON.hs and Compat.hs out from under HTools/

These two files are not htools-specific, so let's move them out of the
HTools subdirectory/module hierarchy and directly under Ganeti.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

4cab6703 09/04/2012 02:00 pm Iustin Pop

Rename the Qlang and Queryd modules

Per the new query module hierarchy, rename Qlang to Query/Language and
Queryd to Query/Server. This way, all query-related functionality is
now "contained" in the Query/ directory.

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

62377cf5 08/28/2012 06:16 pm Iustin Pop

Reduce some more code duplication and split code

The Qlang module defines ResultStatus, but it was already defined in
Ganeti/Luxi.hs; let's remove the duplicate definition from there since
the proper place is in the newer module.

Also, in order to ease testing, we split some confd functions into a...

2cdaf225 08/28/2012 05:59 pm Iustin Pop

Re-enable standard hlint warnings

Commit 5a1e31b4 (Add infrastructure for, and two extra hlint rules)
was intended to add two extra hlint rules, but I didn't realise at
that time that "--hint" when first used overrides the built-in
lints. As such, since then we were basically running with just those...

1bf11fff 08/28/2012 05:59 pm Iustin Pop

Run the query thread from confd

This enables the query functionality in confd.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

84835174 08/28/2012 05:59 pm Iustin Pop

Improve the TH 'Container' type

This is the first part of the changes related to the 'Container' type.

We currently handle this type as follows: it's a simple type alias
over the Data.Map type, which means:

- it's easy to use the Data.Map functions to change the type...

d81ec8b7 07/19/2012 11:02 am Iustin Pop

Implement a node to drbd minors query function

This can be queried remotely since it's a pure configuration query.

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>

79ac58fa 05/01/2012 08:11 pm Iustin Pop

Further fixes for new-style exception handling

Commit 30d25dd8 moved the htools code to new-style exception handling,
but the hconfd code hasn't been, which fails when compiling on newer
GHC versions.

This patch does the rest of the move; however, the situation is not...

88a10df5 03/22/2012 07:30 pm Iustin Pop

Rework exit model

While updating the confd code, I realised that we have lots of
duplication in the exit model for the various programs.

So this patch attempts to abstract all the exits via a couple of new
functions; sorry for the somewhat big patch, but I hope the payoff is...

19cff311 03/21/2012 12:37 am Iustin Pop

Update hconfd bind address handling

Instead of hardcoded IPv4 INADDR_ANY, this patch changes hconfd to use
either the any network for the configured cluster address family
(ipv4/ipv6), or whatever the user passes in via the --bind option.

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

358a0a8f 03/13/2012 03:12 pm Iustin Pop

htools: add confd server module

This contains a more-or-less complete implementation for the
server-side confd.

Note that most of the code is behaving identical to the Python code,
with a notable exception: the asyncore/inotify code was changed (since
Haskell doesn't have asyncore) to 3-thread system. While otherwise I...