Statistics
| Branch: | Tag: | Revision:

root / src / Ganeti / HTools @ 3e0c2a24

# Date Author Comment
241cea1e 04/11/2013 05:10 pm Klaus Aehlig

Make the disks parameter available to the constructor

In that way, tools building on Instance will benefit from the corrected
verification semantics of the instance policy on disk space.

Signed-off-by: Klaus Aehlig <>
Reviewed-by: Guido Trotter <>

e51e0f88 04/11/2013 05:09 pm Klaus Aehlig

Verify individual disks in Instance

Instance policy on disks is specified on a per-disk basis. So extend
the instance description by the sizes of the individual disks and modify
the instance policy verification to correctly check individual disks.

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

2d6bdcc5 03/08/2013 02:50 pm Iustin Pop

Change hbal behaviour in case of early exit

Currently, hbal exits with status 1 if early exit is requested, even
when all jobs are successful. This is counter-intuitive behaviour, so
let's fix it (Issue 386).

Note that the man page had conflicting information already, so it's a...

bfa99f7a 03/04/2013 12:35 pm Iustin Pop

Fix low verbosity levels in htools

In a few cases, we tested the verbosity level for (== 0), instead of
higher/lower than a certain value. If the user passes multiple
"--quiet" options, this can result in negative verbosity levels, which
behave like "extra verbosity"....

e247747c 02/12/2013 03:47 pm Iustin Pop

Add CLI-level option to override the priority

This just defined the new priority, with the same name as the Python one.

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

a81ca843 02/12/2013 03:47 pm Iustin Pop

Enable use of the priority option in hbal

This patch adds the option to hbal, and uses it to tweak the submitted
jobs. There are also two small shelltests for testing the parsing.

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

d41f6558 02/12/2013 03:47 pm Iustin Pop

Make hbal opcode annotation more generic

Currently, hbal code always uses annotateOpCode function, which means
we would have to pass the options data to all function in the call
chain if we wanted to make this more flexible.

By abstracting the type of the annotator and passing it as an argument...

72747d91 02/07/2013 06:14 pm Iustin Pop

Remove use of 'head' and add hlint warning for it

Since 'head' is unsafe to use in most cases, this patch removes its
use from most of the code, adds a lint warning for it (and for tail as
well), and adds override annotations in the few cases where it's
actually OK to use it (mainly when using head over the result of...

6d3d13ab 02/05/2013 03:14 pm Iustin Pop

Fix typo in a comment

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

516c52f2 01/29/2013 05:08 pm Dato Simó

CLI.hs: fix double spaces in option help strings

Some help strings with continuation backslashes ('\') were providing a
space both before and after the backslash, resulting in double spaces in
help output. Provide it only after the backslash, which fixes the issue and...

ef947a42 01/14/2013 05:54 pm Dato Simó

Loader.hs: ignore expired ArSuspended policies

At the moment, because 'mergeData' is pure, it may set instance auto-repair
policies that are of the form `ArSuspended $ Until timestamp_in_the_past`.
If later on the auto-repair tool notices this, it has lost access to what...

e79f576c 01/14/2013 05:54 pm Dato Simó

Loader.hs: rewrite extractExTags to use chompPrefix

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

55416810 01/14/2013 05:54 pm Dato Simó

Loader.hs: set instance auto-repair policy in mergeData

'getArPolicy' and 'setArPolicy' follow the precedence rules introduced in
b1eb71c: within an object, the most restrictive tag wins; across object,
the nearest tag wins.

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

23594127 01/14/2013 05:54 pm Dato Simó

Instance.hs: add an 'arPolicy' field for auto-repair policy

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

3e77a36c 01/14/2013 05:52 pm Dato Simó

Add initial constants and Haskell ADTs for auto repair

In this commit, the AutoRepairType and AutoRepairResult types are defined,
with the possible values specified in doc/design-autorepair.rst.

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

7ec2f76b 01/14/2013 05:52 pm Dato Simó

HTools/Types.hs: more auto-repair types

AutoRepairPolicy, AutoRepairStatus, and other auxiliary types are added.
These are used only internally by the auto-repair tool, and parsed from the
various object tags as defined in the design doc.

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

f6b9c6e5 12/28/2012 05:50 pm Iustin Pop

Fix a bad data type in Hcheck.hs

While trying to understand why some code was not being tested, I
realised that we have a bad data type in Hcheck.hs.

We have "data Level = GroupLvl | ClusterLvl", but then we need to pass
the group name/index as well, so we have functions that look like the...

2fd5a116 12/28/2012 05:50 pm Iustin Pop

Move src/Ganeti/HTools/Program.hs to Program/Main.hs

This removes one more tab conflict; this is the last module in our
code where we have both x.hs and x/.

Furthermore, we collapse all actual code into the new Main.hs module,
leaving the htools.hs basically empty (will allow better testing in...

3add7574 12/24/2012 11:38 pm Iustin Pop

Rename htools/ to src/

Per offline discussions, this is the first patch of the
renames. Tested with "make distcheck", seems to work fine.

The only change outside of the renaming is a bit of simplification in
the .gitignore rules; otherwise, simply s/htools/src/....