| Branch: | Tag: | Revision:

root / htools / Ganeti / HTools / Program / Hbal.hs @ 2a2e2610

History | View | Annotate | Download (14.8 kB)

# Date Author Comment
2a2e2610 07/05/2012 04:09 pm Iustin Pop

hbal: return exit status 0 in case of early exit

This derives from an internal bug, but the story is consistent across
both internal and external usage of hbal.

Basically right now, hbal returns exit code 1 if requested to exit
early, even if all jobs are successful. This is counter-intuitive due...

0547d608 03/13/2012 11:29 am René Nussbaumer

htools: Make it possible to load an IAlloc request

This is only useful in the stand-alone command line tools:

- hbal
- hspace
- hinfo

This change also documents the flag in all man-pages.

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

2922d2c5 02/28/2012 02:26 pm René Nussbaumer

hinfo: Adding basic skeleton based on hbal

It prints the information which hbal prints in a nice formatted manner and of
course without doing any actions. An example output looks like this:

$ hinfo -m
Loaded 4 nodes, 2 instances
Cluster has 1 node group(s)...

21839f47 01/16/2012 02:49 pm Iustin Pop

Parse options in htools.hs, not in each program

This patch moves the call to getArgs/parseOpts into htools.hs, as
opposed to the current situation where htools.hs only calls the main
file of each program, which in turn calls these two functions.

By doing it only once we remove some duplicate code and we also export...

e77bc89b 01/13/2012 03:16 pm Iustin Pop

Load cluster ipolicy via Luxi

Also show it in hbal's verbose output (helpful for debugging).

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

71375ef7 01/13/2012 03:16 pm Iustin Pop

Extend ClusterData with the cluster instance policy

This attribute is always initialised to the default, and is not (yet)
read/saved in the various backends.

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

3603605a 12/08/2011 10:00 am Iustin Pop

Cleanup hlint errors

First, we update the recommended hlint version to what I used to get a
clean output (1.8.15). Most of the changes are:

- remove unneeded parentheses
- some simplifications (intercalate " " → unwords, maybe … id →
fromMaybe, etc.)
- removal of some duplicate code (in previous patches)...

7345b69b 11/18/2011 07:20 pm Iustin Pop

htools: adjust imports for newer compilers

While testing with ghc 7.2, I saw that some imports we are using are
very old (from ghc 6.8 time), even though current libraries are using
different names.

We fix this and bump minimum documented version to ghc 6.12, as I...

0e82dcf9 11/18/2011 01:48 pm Andrea Spadaccini

Merge branch 'devel-2.5'

  • devel-2.5: (24 commits)
    LUInstanceCreate: Release unused node locks
    htools: rework message display construction
    hbal: handle empty node groups
    Document OpNodeMigrate's result for RAPI
    Ensure unused ports return to the free port pool...
2ba17362 11/17/2011 03:49 pm Iustin Pop

htools: reindent hbal

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

2072221f 11/16/2011 04:01 pm Iustin Pop

hbal: handle empty node groups

This patch changes an internal assert (which can only be triggered
when a node group is empty) into properly handling this case (and
returning empty node/instance lists).

While we could handle this in the backend (Cluster.splitNodeGroup)...

5296ee23 10/14/2011 01:37 pm Iustin Pop

A bit of cleanup in hspace

The node offline/mcpu is identical to hbal's setNodesStatus, so let's
move that to CLI.hs and reuse it in hspace (also, rename it and drop
one 's').

Also, the check for the number of nodes is obsolete, as we compute
that from the disk template....

e19ee6e4 10/11/2011 11:25 am Iustin Pop

Remove the oneline output option in hbal

This was, AFAIK, never used, and complicates the output code enough
that it's better to remove it.

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

5dad2589 10/11/2011 11:24 am Iustin Pop

Rework/split hbal's main function

This is just moving code around. A subsequent patch will do a bit more
cleanup and changing the output.

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

1b0a6356 07/21/2011 02:51 pm Iustin Pop

htools: a few more hlint fixes

Tested only on GHC 7.x, will test on 6.1x too before commit.

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

179c0828 07/21/2011 02:50 pm Iustin Pop

htools: further docstring fixes

This adds parameter documentation for Cluster.iMoveToJob (I think it
was not clear if the new or old node list is needed) and fixes other
docstring style issues.

After this patch, all modules except for CLI.hs (which has many...

4938fa30 07/20/2011 05:44 pm Guido Trotter

Do proper name lookup for the -O option

hspace and hbal treat -O differently, and use aliases for short names
(although hbal succeeds in that, and hspace doesn't). Uniform this with
a name lookup, using the same functions we used for instance

201b6c34 07/19/2011 05:54 pm Iustin Pop

htools: switch hbal to the generic binary

In addition, the patch adds a separate Makefile variable for holding
the binary roles to make it more clear what we symlink.

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