| Branch: | Tag: | Revision:

root / htools / Ganeti / HTools / Program / Hspace.hs @ 294bb337

History | View | Annotate | Download (16.4 kB)

# Date Author Comment
294bb337 01/11/2012 01:12 pm Iustin Pop

Change how hspace reads cmdline args for std specs

For the standard specs, hspace currently takes separate options for
the memory, disk and VCPUs. For the tiered specs, which were
introduced later, it takes a single option with all three values

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

2f9198be 12/08/2011 10:00 am Iustin Pop

Abstract some common hspace code into a function

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

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

3c3690aa 11/17/2011 03:49 pm Iustin Pop

htools: reindent hspace

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

7dd14211 11/16/2011 03:15 pm Agata Murawska

htools: change runSt type to InstanceStatus

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

5f828ce4 10/26/2011 05:35 pm Agata Murawska

Generalize the generation of ADT from raw types

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

e86f7f65 10/14/2011 01:37 pm Iustin Pop

Further cleanup in hspace

This moves the checking of results from the allocation functions to a
separate function, so that we have less code duplication. It also does
a bit of simplification in the printing functions.

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

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

2c9336a4 10/03/2011 12:17 pm Iustin Pop

Rename some helper functions for consistency

This changes the names for some helper functions so that future
patches are touching less unrelated code. The change replaces
shortened prefixes with the full type name.

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

b8a2c0ab 09/29/2011 10:16 am Iustin Pop

Add an allocation limit to hspace

This is very useful for testing/benchmarking.

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

375969eb 07/21/2011 02:49 pm Iustin Pop

htools: add human-readable output to hspace

Currently, hspace can only output a machine-readable format that
(while detailed) is hard to parse quickly by people. This patch adds
(and enables by default) a human-readable output that shows the most
important metrics in a simple format....

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

756df409 07/19/2011 05:54 pm Iustin Pop

htools: move tiered spec map helper to Hspace.hs

This is used just in hspace, so let's help in making Cluster.hs
smaller. We also split the function in two, as computing the spec map
and formatting it are two different tasks.

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

1494a4cc 07/19/2011 05:54 pm Iustin Pop

htools: switch hspace to the generic binary

This is the last patch of the binaries conversion.

As information, we now have a single binary that is approx. 5.4MiB in
size, compared to 4 binaries that were approx. 5.1-5.2MiB in size;
this will result in a smaller package and install size, and the single...