Statistics
| Branch: | Tag: | Revision:

root / src / Ganeti / HTools @ a5ec6d88

# Date Author Comment
53822ec4 04/29/2013 06:54 pm Bernardo Dal Seno

hspace: Handle multiple ipolicy specs

With tiered allocation, hspace uses all the max specs in turn as the
initial instance spec.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Helga Velroyen <>

41044e04 04/29/2013 06:53 pm Bernardo Dal Seno

Add multiple min/max specs in instance policy

Now instance policies can contain more than one min/max specs. This is the
main element of the "Constrained instance sizes" section in the
"Partitioned Ganeti" design doc.

This is a big patch, but changing the type of a configuration item requires...

30dd3377 04/22/2013 07:43 pm Klaus Aehlig

Extend the simulation backend to also simulate a master node

In a simulated cluster as created by the simulation backend to
the htools, make the first node of the first node group the master
node. In this way, hools (like hroller) that require a master node...

000ca91a 04/22/2013 07:43 pm Klaus Aehlig

Extend Text format by marking the master node

Sometimes, e.g., for hroller, it is necessary to know which node
is the master node. Therefore this information has to be included
in the text format as well. Since we never use an offline node as
master node, we can put this information can be put in the "is...

7dbe4c72 04/19/2013 02:54 pm Klaus Aehlig

Make hroller insist on finding precisely one master node

As people rely on the master node being the last node of the last
group, make hroller fail, if no master node could be found in the
cluster. This happens, e.g., if a backend format is used that does not...

bf028b21 04/19/2013 02:54 pm Klaus Aehlig

In Rapi, set master correctly

The cluster data contains the information about the master
node. Use this information to set the isMaster bit correctly.

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

f40fe08c 04/19/2013 02:54 pm Klaus Aehlig

In Luxi, set the master correctly

The cluster data contains the information about the master
node. Use this information to set the isMaster bit correctly.

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

09ab9fb2 04/19/2013 02:54 pm Klaus Aehlig

Utility function to set the master node in a node list

The information about which node is the master node is a cluster-wide
setting, in most formats provided independently of the node information.
Most backends therefore have to set the isMaster bit indepently in the...

5b658b83 04/19/2013 02:54 pm Klaus Aehlig

Make Hroller present master node last

If in the list of nodes to be scheduled for maintaince,
one is marked as being the master node, schedule it
as the last node in the last group.

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

6c332a37 04/19/2013 02:53 pm Klaus Aehlig

Extend the node description by isMaster

Extend the description of the node by the property
of being the master node; also provide and appropriate
setter function. This property will be used, e.g., by
hroller to schedule reboot of the master last.

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

ffc18bb2 04/17/2013 10:29 pm Thomas Thrainer

Fix warnings hlint 1.8.43 complained about

These lines are ok according to previous versions of hlint but trigger
an error with version 1.8.43.

Signed-off-by: Thomas Thrainer <>
Reviewed-by: Helga Velroyen <>

723ec678 04/12/2013 12:31 am Guido Trotter

Merge branch 'devel-2.7'

  • devel-2.7: (26 commits)
    Fix burnin install path
    Fix format of the NEWS file
    NEWS: Add news entry for the hail disk policy fix
    Add shelltests verifying hail applies disk ipolicy per disk
    Make the disks parameter available to the constructor...
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 <>...

da5f09ef 03/27/2013 12:46 pm Bernardo Dal Seno

Refactor ispecs in ipolicy structures

Minimum and maximum instance specs are put together into a single element
of the instance policy. This is in preparation for introducing multiple
min/max specs.

Signed-off-by: Bernardo Dal Seno <>...

4f73cfc9 03/08/2013 05:46 pm Iustin Pop

Merge branch 'devel-2.7'

  • devel-2.7:
    Change hbal behaviour in case of early exit
    Fix build/sphinx_ext.py with tuple defaults for op params
    Fix bug in man build rule
    Fix hscolour style sheet building

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

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

491d02ca 03/05/2013 01:56 pm Iustin Pop

Merge branch 'devel-2.7'

  • devel-2.7: (23 commits)
    Add export lists for files which didn't have them
    Fix Haskell compatibility tests with disabled file storage
    Fix QA with disabled file storage
    Fix convert-constants handling of booleans
    Fix handling of disabled (shared) file storage...
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"....

544029d3 02/25/2013 08:05 pm Guido Trotter

HRoller: print only online nodes

To make the graphs work even when instances live on offline nodes (eg.
because we're offlining them just to exclude them, or because they have
instance still on them) we just filter them out at the end, when we're
going to print out the result....

2fce67b6 02/25/2013 08:05 pm Guido Trotter

HRoller: allow filtering by node group

Accept the -G option, and if it's passed require that it matches a
nodegroup, then only output nodes belonging to that group.

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

1ca709c1 02/20/2013 06:47 pm Iustin Pop

Switch the curl bindings from optional to required

Currently, we support curl being optional via some sporting exercises:
ifdefs in the code, data types that represent 'Curl is disabled'
state, etc. However, with the future work on RPC, we would have to
even make the dependencies list conditional on it, etc. This is too...

fe502d25 02/15/2013 03:04 pm Iustin Pop

Merge branch 'devel-2.7'

  • devel-2.7:
    Rename lib/objectutils to outils.py
    Fix typo in gnt-group manpage
    Fix wrong type in a docstring of the RAPI subsystem
    Finish the remote→restricted commands rename
    Enable use of the priority option in hbal
    Add CLI-level option to override the priority...
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...

3c296f56 02/12/2013 03:25 pm Michael Hanselmann

Merge branch 'devel-2.7'

  • devel-2.7: (23 commits)
    QA: Support additional arguments for initialization
    qa_utils: Fix order of arguments passed to _AssertRetCode
    Improve reporting on errors.AddressPoolError exceptions
    Add note about lv-tags rename...
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...

546a1dcf 02/07/2013 05:02 pm Dato Simó

Harep.hs: fix a couple typos in comments and docstrings

Signed-off-by: Dato Simó <>
Reviewed-by: Guido Trotter <>

83251115 02/05/2013 06:55 pm Michael Hanselmann

Merge branch 'devel-2.7'

  • devel-2.7:
    Redirect output for gnt-* list/list-fields commands
    Add function to execute QA commands with redirected output
    Implement option to skip logging of QA commands
    Fix typo in a comment
    Add some more Haskell/Python equivalence tests...
6d3d13ab 02/05/2013 03:14 pm Iustin Pop

Fix typo in a comment

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

8072af6c 01/30/2013 07:39 pm Dato Simó

harep: create repair jobs

Implement 'doRepair' to create a repair job from a list of opcodes if
the instance's policy allows it (otherwise set an ENOPERM result label),
and the instance was previously healthy (i.e. not in ArFailed or
ArPendingRepair).
...

8af72964 01/30/2013 07:39 pm Dato Simó

harep: do not wait for repair job completion to set tags

Because of instance locks, after submitting a repair job we weren't able to
set the "pending" tag until at least the first opcode of the job finished.
Introduce a small delay in the repair job so as to allow the subsequent...

41238d27 01/30/2013 07:39 pm Dato Simó

harep: finish execution with a summary of instance states

The harep tool prints messages for every action that it performs (or that
it doesn't perform). In case nothing is to be done at all, always print
some statistics of the current state of the cluster....

3416e3e7 01/30/2013 07:39 pm Dato Simó

harep: initial parsing of tags

Parse auto-repair tags to set each instance in one of ArHealthy, ArFailed,
or ArPendingRepair. The implementation tries to be well behaved when old
tags have been left behind, which future patches will still try not to do....

a5e58418 01/30/2013 07:39 pm Dato Simó

harep: check for completed jobs at the start of the program

As a first step before detecting any brokeness with instances, see if any
of our previous repairs have completed, and move instances to ArFailed or
ArHealthy accordingly. Do nothing if there are still running jobs for the...

4ba5f148 01/30/2013 07:39 pm Dato Simó

harep: pure function to detect brokeness with instances

Add a 'detectBroken' function that determines whether an instance is in an
unhealthy state, and what's needed to repair it. The repair is specified as
an AutoRepairType constant, and a list of opcodes. The opcodes will only be...

b6d9bec8 01/30/2013 07:38 pm Dato Simó

Program/Harep.hs: add skeleton for the new auto-repair tool

harep(1) detects certain kind of problems with instances and applies the
allowed set of solutions. See doc/design-autorepair.rst.

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

de9d75c8 01/30/2013 07:37 pm Dato Simó

HTools/Types.hs: minor adjustments to auto-repair types

In particular:

- make ArHealthy take an optional AutoRepairData; this allows to
represent the situation where a repair completed successfully, and
hence there's an associated tag we might want to know about....
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/....