Statistics
| Branch: | Tag: | Revision:

root / htools / Ganeti / HTools / Program @ bebe7a73

# Date Author Comment
c3f8cb12 03/03/2012 09:46 pm René Nussbaumer

htools: Refactor some of IAlloc.readRequest to Hail

This makes it possible to reuse that function when we want to use IAlloc
as a data source backend

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

14fbd75b 03/03/2012 09:46 pm René Nussbaumer

hinfo: Adjust the verbosity

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

d0a14556 03/01/2012 08:48 pm René Nussbaumer

hinfo: Gather and print group statistics

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

19e310cc 02/28/2012 05:02 pm René Nussbaumer

hinfo: Reorganize the code to separate functions

Also rename some functions as they don't reflect their actions anymore

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 xen.example.com
Loaded 4 nodes, 2 instances
Cluster has 1 node group(s)...

5f3b040a 01/26/2012 03:34 pm Iustin Pop

Temporary fix for hspace's NPU calculation

hspace computes the NPU (normalised CPU units) via the
(used|pool|avail) VCPU divided by the (currently cluster-wide) max
vcpu_ratio.

However, in the future we'll have variable vcpu_ratios, so we can't
the calculation as such. We temporarily change to computing the...

80d7d8a1 01/26/2012 03:34 pm Iustin Pop

Switch over some hspace stats from RSpec to AllocInfo

This patch changes the allocation delta stats from RSpec to
AllocInfo. There's nothing interesting about it, but it should allow
more correct computations of Npus in hspace.

I also moved the AllocStats type alias from Cluster.hs to Types.hs...

ad0e078e 01/26/2012 01:46 pm Iustin Pop

Remove two extraneous imports

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

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

1f5635a9 01/13/2012 03:17 pm Iustin Pop

Show explicit message when hspace fails to alloc

Currently, in the human-readable mode, hspace doesn't show any
messages when no instances can be allocated in tiered-alloc mode. This
is confusing, so let's add an explicit message.

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

9fdd3d0f 01/13/2012 03:16 pm Iustin Pop

Switch hspace to read the disk template from the cluster

The default disk template is the first enabled template.

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

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

Switch hspace defaults to the cluster policy

This changes from the current hardcoded defaults to the cluster
policy. The command line options now override the defaults from the
cluster, and the tiered spec mode is always enabled.

Also fixes a tiny typo in the man page (together with the man page...

8564fb47 01/13/2012 03:16 pm Iustin Pop

Abstract creation of instance from a spec

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

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

410a8a76 01/11/2012 01:12 pm Iustin Pop

Rename optISpec to optStdSpec

More consistency with the tiered allocation mode.

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

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

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

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

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

htools: reindent hspace

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

ebf38064 11/17/2011 03:49 pm Iustin Pop

htools: reindent the rest of the files

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

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

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

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
selection/exclusion....

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

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

7b695a0d 07/19/2011 05:54 pm Iustin Pop

htools: switch hscan to the generic binary

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

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

458a286a 07/19/2011 05:54 pm Iustin Pop

htools: switch hail to the generic binary

This converts the first binary to the generic 'htools' binary.

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