| Branch: | Tag: | Revision:

root / htools / Ganeti / HTools @ f127e585

Name Size
CLI.hs 20.2 kB
Cluster.hs 66.9 kB
Container.hs 2.4 kB
ExtLoader.hs 4.6 kB
Graph.hs 7.7 kB
Group.hs 2.6 kB
Instance.hs 10.4 kB
Loader.hs 10.4 kB
Node.hs 24 kB
PeerMap.hs 2.9 kB
Program.hs 1.8 kB
Types.hs 11.7 kB

Latest revisions

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

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

369671f4 12/05/2012 09:04 pm Dato Simó

Hbal.hs: move job execution functions to Jobs.hs

Ganeti.Jobs now holds functions that can be used to submit and monitor the
status of jobs. In particular, execJobsWait and waitForJobs are factored
out of Hbal.hs.

Signed-off-by: Dato Simó <>...

42afc235 12/05/2012 09:04 pm Dato Simó

Hbal.hs: use Result (), not Bool, as return value for exec*

Previously, functions in Hbal.hs related to execution of jobsets were
returning only IO Bool, and printing any errors they found directly to
stderr on their own.

I'm going to be moving some of these functions to a library module in...

3b23f238 12/05/2012 09:04 pm Dato Simó

Hbal.hs: rename functions that deal with early termination

In Hbal.hs, it's easy to get lost in the flow of exec* functions
because their names are similar and don't convey their different
purposes (e.g. runJobSet, execJobSet, execWrapper).

This patch renames 'runJobSet' to 'execWithCancel', and 'execWrapper'...

9cd4288e 12/05/2012 09:03 pm Dato Simó

Hbal.hs: fix typo in signal handler names (hangle -> handle)

'hangleSigInt' and 'hangleSigTerm' are renamed to 'handleSigInt' and
'handleSigTerm', respectively.

Signed-off-by: Dato Simó <>
Reviewed-by: Michele Tartara <>

3bdbe4b3 12/05/2012 09:03 pm Dato Simó

Jobs.hs: move OpStatus and JobStatus ADTs to Types.hs

This leaves Ganeti/Jobs.hs and Test/Ganeti/Jobs.hs empty, but they're the
target of a future move of some functions, so we leave them around, and
don't delete them, to avoid unnecessary delete/create diffs....

dae1f9cb 12/04/2012 06:46 pm Guido Trotter

HTools/Node: add mkNodeGraph function

This function helps treating node node problems as graph problems.
It can transform a list of nodes plus a list of instances into a graph
which uses the nodes as vertices, and instances as edges connecting them
(as long as they have both a primary and a secondary node)...

8b50de5c 12/04/2012 06:46 pm Guido Trotter

Fix Dsatur and add Dcolor

Our Dsatur implementation was incorrect: while the paper defined the
degree of saturation of a vertex as the number of different colors it is
adjacent to, we were using the number of colors, without considering
uniqueness. This effectively implemented a different algorithm, which is...

c94f9990 12/04/2012 06:46 pm Guido Trotter

Add "proper coloring" unittest check

We have to check that for each edge its vertices have different colors.

This is very easy to do with a vertex-to-color map, but not so easy with
a color-to-vertex one. Since all our coloring algorithms created a
vertex-to-color map behind the scenes and then converted it, we flip...

View revisions

Also available in: Atom