Statistics
| Branch: | Tag: | Revision:

root @ 8fcf251f

# Date Author Comment
8fcf251f 05/19/2010 04:09 pm Iustin Pop

Add more unit tests

This increases the overall coverage by 5%-10% (depending on coverage
type). Some modules are still not unittested at all, as HUnit is a
better choice for them.

1e3dccc8 05/19/2010 04:08 pm Iustin Pop

Shuffle some constants around

… and export more functions. This will help with unit testing.

f4c0b8c5 05/18/2010 07:31 pm Iustin Pop

Remove the noLimit values and always use limits

This patch moves from allowing no-limits for disk/cpu ratios, and always
use a real limit. For disk, it's simple since we use 0, which means no
reservations for disks. For CPU, we set an (arbitrary) limit of 64 v/p,...

317b1040 05/17/2010 05:40 pm Iustin Pop

hspace: change handling of N+1 bad clusters

Currently we just print a fake result and exit early. This is bad, since
it doesn't use the same codepaths for all the result printing, and has
already led to a bug where hspace looks like completely ignoring the...

e2436511 05/04/2010 02:42 pm Iustin Pop

Fix hspace's KM metrics

We returned the KM_POOL_* metrics as the final state, not as the delta
between the final and the initial state.

b1ddaad9 04/26/2010 06:02 pm Iustin Pop

Update NEWS file for the 0.2.5 release

1928a56b 04/15/2010 05:25 pm Iustin Pop

Update hspace man page

bd3286e9 04/15/2010 05:17 pm Iustin Pop

hspace: show more metrics

This patch adds the metrics of used/allocable/unallocable resources.

e87a419f 04/15/2010 05:16 pm Iustin Pop

Fix Node hiCpu computation

In case we're not enabling limits, let's restrict this to -1, instead of
-1 times the number of pcpus.

9b8fac3d 04/15/2010 12:50 pm Iustin Pop

Add a new function to compute allocation deltas

Given two cluster states, the new function can answer the following
questions:

- how much resources currently allocated
- how much resources finally allocated (delta from above is how much we
can actually allocate on the cluster)...

86ecce4a 04/15/2010 12:27 pm Iustin Pop

Introduce total vcpu tracking in CStats

We add a new field that tracks the available virtual cpus (expressed as
node cpus times the vcpu ratio).

bfefb674 04/14/2010 03:44 pm Iustin Pop

Merge branch 'master' into next

  • master:
    Fix iallocator crash when no solutions exist
    Fix IAllocator multi-evacuate message
57587760 03/31/2010 12:54 pm Iustin Pop

Fix iallocator crash when no solutions exist

Commit 5436576 added an un-guarded `head' call, which crashes with
“Prelude.head: empty list” when no results exists for the per-instance
allocation/relocation calls.

This patch fixes this, and also adds another check for an unguarded...

934c62dc 03/31/2010 12:51 pm Iustin Pop

Fix IAllocator multi-evacuate message

Since Ganeti passes full host names (not common-suffix-stripped), we
need to remove the suffix from the evac_nodes keys too. In case one node
is not part of the cluster, it will lead to a wrong error message, but
for now it fixes the problem.

e41f4ba0 03/09/2010 04:40 pm Iustin Pop

Fix iallocator crash when no solutions exist

Commit 5436576 added an un-guarded `head' call, which crashes with
“Prelude.head: empty list” when no results exists for the per-instance
allocation/relocation calls.

This patch fixes this, and also adds another check for an unguarded...

be811997 02/26/2010 03:42 pm Iustin Pop

Fix a haddock comment issue

For some versions of haddock, this can create problems.

a46f34d7 02/25/2010 03:47 pm Iustin Pop

Abstract instance running states into a list

This removes some manual checks from a few places in the code with a
single list defined once.

5182e970 02/25/2010 03:39 pm Iustin Pop

A number of small fixes from hlint

edb198a0 02/25/2010 02:49 pm Iustin Pop

Add a lint target that uses hlint

c939b58e 02/25/2010 02:35 pm Iustin Pop

Fix unused-do-binds for ghc 6.12

GHC 6.12 has some new warnings, which are valid in most cases except
(IMHO) printf usage.

0903280b 02/25/2010 02:34 pm Iustin Pop

Fix unused imports for ghc 6.12

GHC 6.12 has become more picky about unused imports, so we need to
remove/tighten some of them.

ee0cb5b7 02/24/2010 05:21 pm Iustin Pop

Allow overriding the ghc compiler used

… via a GHC make variable.

ba9349b8 02/23/2010 07:10 pm Iustin Pop

hscan: implement LUXI backend scanning

This allows hscan to work also with NO_CURL (but only for the local
machine, of course).

5ab2b771 02/23/2010 02:53 pm Iustin Pop

Loader: abort for unknown to-be-excluded instances

fcbf0da4 02/23/2010 02:41 pm Iustin Pop

Enable hbal to use the new command line option

c424cdc8 02/23/2010 02:13 pm Iustin Pop

balance function: use the movable flag directly

Instead of deciding based on secondary node, use the new flag.

39f979b8 02/23/2010 02:09 pm Iustin Pop

Update the loader pipeline to set the movable flag

This updates the movable flag on instances if they have only one node
(we don't rely on OpMoveInstance) or if they are set so via the command
line options.

This doesn't yet enable the use of the new flag.

a182df55 02/23/2010 01:56 pm Iustin Pop

Add a 'movable' flag on instances

This will be used instead of checking for no secondary and for
simplifying 'do not touch' instances.

10f396e1 02/23/2010 11:40 am Iustin Pop

Add an option for excluding instances from moves

7ef4d039 02/22/2010 04:19 pm Iustin Pop

Update NEWS file for the 0.2.4 release

d06d0636 02/22/2010 04:19 pm Iustin Pop

Update the hail man page

This adds a short note for the new iallocator mode.

Signed-off-by: Iustin Pop <>

54365762 02/22/2010 04:19 pm Iustin Pop

Implement IAllocator node evacuate request

This patch adds the new request loading/execution (trivial), but the
actual response formatting becomes more difficult as now the response
type differs by request.

Signed-off-by: Iustin Pop <>

12b0511d 02/22/2010 04:19 pm Iustin Pop

Add a tryEvac function

This will be used by the node evacuate IAllocator request type.

Signed-off-by: Iustin Pop <>

1fe81531 02/22/2010 04:19 pm Iustin Pop

Move a type declaration to Node.hs

We'll need AllocElement in both Cluster and IAlloc in the future, so we
move it to Node.hs which is imported by both.

Signed-off-by: Iustin Pop <>

23f9ab76 02/22/2010 04:19 pm Iustin Pop

Change an internal type from Maybe to list

In preparation for multiple responses, we change from Maybe to List
(both used in the container sense).

This allows us to keep the same workflow for all kind of requests.

Signed-off-by: Iustin Pop <>

20c891d0 02/22/2010 04:19 pm Iustin Pop

IAllocator: move some keys into per-request data

Since not all structures will have these keys in the future, we move
them into per-structure keys.

Signed-off-by: Iustin Pop <>

d1296fd9 02/22/2010 04:19 pm Iustin Pop

Document the evac mode

Signed-off-by: Iustin Pop <>

2e28ac32 02/22/2010 03:50 pm Iustin Pop

Implement evacuation mode in hbal

This mode restricts the list of instances to be moved to the instances
living on the offline (and drained) nodes.

Signed-off-by: Iustin Pop <>

f0f21ec4 02/22/2010 03:50 pm Iustin Pop

Add an evac mode CLI option

Signed-off-by: Iustin Pop <>

df18fdfe 02/22/2010 03:50 pm Iustin Pop

Reorder options in CLI.hs

This should be no code change, just reordering of the options.

Signed-off-by: Iustin Pop <>

2b7a98ae 02/04/2010 12:30 pm Iustin Pop

Update documentation for the text backend

62eb3aa2 02/04/2010 11:58 am Iustin Pop

Update NEWS file for the 0.2.3 release

146b37eb 02/03/2010 01:29 pm Iustin Pop

Fix secondary node selection for existing N+1

In case a secondary node is already N+1 failed, currently the node
selection will accept a node that cannot start (at all) the new instance
as valid. This is wrong, so we add a new simple check to prevent the...

a4a6e623 02/03/2010 10:24 am Iustin Pop

Rewrite the node add checks for simpler layout

This will make it clearer than many if…then choices.

a804261a 01/14/2010 06:38 pm Iustin Pop

Move instance relocation test upper in the chain

Currently we test each instance for relocation in checkMove; however, it
is a little more clear if we pass only the relocatable instances to
checkMove. The patch also slightly rewrites (indendation/style) the...

5ad86777 01/14/2010 06:05 pm Iustin Pop

Split the balancing function in two parts

Currently in the balancing function we do two thing:

- take the decision where to do a new balancing round or not
- and actually computing the balancing round

This is not nice, as the two parts are conceptually separate, so this...

210ed839 01/14/2010 04:15 pm Iustin Pop

Small update to the Makefile

0d478754 01/14/2010 04:09 pm Iustin Pop

Makefile: Switch from subshell to $(MAKE) -C

It seems that set -e does not affect subshell (only simple commands),
and thus we don't actually get failures from make check being run in a
subshell. Rather than trying to handle this better, we remove the
subshell and invoke make with the required subdirectory.

71e635f3 01/12/2010 12:18 pm René Nussbaumer

Fixing a typo in option description

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

9f4b0931 01/07/2010 02:58 pm Iustin Pop

live-test fixes for the text backend changes

66ea8434 01/07/2010 01:57 pm Iustin Pop

Update hscan to generate new-format text files

This also updates its manpage, some information were really old.

16c2369c 01/07/2010 01:57 pm Iustin Pop

Switch the text file format to single-file

This patch changes from the two separate files to a single file, with
sections separated by a blank line. Currently only the node and instance
data is accepted, later the cluster tags will be read too via this
format....

f5197d89 01/07/2010 12:44 pm Iustin Pop

Change the signatures of the text loader slightly

This is in preparation for the text format changes.

f6044dc4 12/29/2009 09:33 pm Iustin Pop

Update NEWS file for the 0.2.2 release

53c24840 12/29/2009 09:33 pm Iustin Pop

Update hbal man page to note that we use stddev

We actually use stddev and not the coefficient of variance (as wrongly
noted before), so we update the documentation appropriately.

We also note that the dynamic load values must be pre-normalized, since
we don't do such a normalization in the code.

57df9cb3 12/29/2009 08:50 pm Iustin Pop

Update comments in live-test about clusters

The live test needs a populated cluster, so let's write this down.

0d0503b2 12/28/2009 01:01 pm Iustin Pop

Improve the dist build rule

This changes the 'dist' rule to also do a check that the archive can
build all the programs and passes the check test itself, and shows the
sha1sum at the end automatically.

1901266d 12/28/2009 12:13 pm Iustin Pop

Remove Version.hs during clean too

Ganeti/HTools/Version.hs is generated at build time from version (which
is the only one shipped), so it must be removed by the clean rule.

0ccaab44 12/28/2009 12:09 pm Iustin Pop

Fix small typo

This was found, of all things, via lintian during the Debian packaging…

0c860cff 12/11/2009 07:01 pm Iustin Pop

Convert n1_score metric from % to count

This increases the priority of fixing N+1 failures compared to balancing
metrics.

8ce618f3 12/11/2009 06:54 pm Iustin Pop

Merge branch 'master' into next

  • master:
    Use the oper_ram field if available
    rapi, luxi: treat drained nodes as offline
673f0f00 12/11/2009 06:47 pm Iustin Pop

Metric: count of primary instances/offline nodes

This helps with evacuation/failover of instances on 2-node clusters with
one one offline.

e4d31268 12/11/2009 06:43 pm Iustin Pop

Offline instance metric: change from % to count

Currently we use the offline instance percentage (with range [0, 1]),
but this is not good, since we want the evacuation of such instances to
have a high priority; therefore we change this to a count of offline...

6402a260 12/11/2009 06:17 pm Iustin Pop

Use the oper_ram field if available

For the RAPI and LUXI backends, we can get the actual memory usage (if
instances are running) via the oper_ram, whereas backend/memory only
tell what the instance will use at the next boot.

Not using oper_ram means that the node model is flawed and we consider...

b45222ce 12/09/2009 12:30 pm Iustin Pop

rapi, luxi: treat drained nodes as offline

Commit e97f211 changed the iallocator backend to handle drained nodes as
offline. This commit completes that change by making the rapi and luxi
backend do the same (the text backend ignores any '?' values which are...

31728b11 12/02/2009 06:49 pm Iustin Pop

Add a live-test script

This can be used to test that all the existing commands work correctly. It
needs a running cluster with at least one instance to run all the tests.

1cea2e1e 12/02/2009 04:58 pm Iustin Pop

Fix typo breaking LUXI backend

This really shows the need for actual dist-time full testing (not
unittests).

ffeaa443 12/02/2009 12:57 pm Iustin Pop

Update NEWS file for the 0.2.1 release

434c15d5 12/02/2009 12:57 pm Iustin Pop

Fix unittests after instance tags addition

70c708fc 12/02/2009 12:25 pm Iustin Pop

Merge branch 'next'

  • next:
    Update documentation for the iextags
    Re-wrap the README
    Configure exclusion tags via the cluster tags
    hail: add '-p' option intended for debugging use
    Read cluster tags in the IAllocator backend
    Read cluster tags in the LUXI backend...
73b2e389 12/02/2009 12:24 pm Iustin Pop

Update documentation for the iextags

d3b1075f 12/02/2009 12:20 pm Iustin Pop

Re-wrap the README

… since we added the fill-column 72 setting.

f5e67f55 12/01/2009 02:49 pm Iustin Pop

Configure exclusion tags via the cluster tags

This patch adds reading of the exclusion tags from the cluster tags: any
tags starting with htools:iextags: will convert their suffix into an
exclusion tags prefix. In other words, "htools:iextags:service" will...

f3d53161 12/01/2009 02:45 pm Iustin Pop

hail: add '-p' option intended for debugging use

This prints the initial node list on stderr, since stdout is reserved for the
iallocator protocol (even though ganeti won't pass -p itself).

669ea132 12/01/2009 01:24 pm Iustin Pop

Read cluster tags in the IAllocator backend

f89235f1 12/01/2009 12:47 pm Iustin Pop

Read cluster tags in the LUXI backend

ea017cbc 12/01/2009 11:53 am Iustin Pop

Read cluster tags in the RAPI backend

This also shows them in hbal in verbose mode.

94e05c32 11/27/2009 05:13 pm Iustin Pop

Introduce support for reading the cluster tags

While these are not actually populated from the backends, and all the
programs ignore them, this patch contains the changes in the function
types required.

9739b6b8 11/24/2009 01:55 pm Iustin Pop

hspace: quote non-alphanum values in shell output

The tiered allocation output which contains spaces makes the output of
hspace non-sourceable. This patch adds a new function to ensure
non-alphanumeric values are quoted such that the output can be parsed...

185297fa 11/17/2009 11:44 am Iustin Pop

Collapse the statistical functions into one

This allows us to get rid of two duplicate list length computations,
with a minor speedup.

e27eb8ab 11/17/2009 11:44 am Iustin Pop

Specialize the math functions

The statistics functions are currently defined as polymorphic with a
Floating constraint. Changing this to monomorphic on Double type makes
them stricter and much more performant (~70% speedup). This is a cheap
way to recoup some of the loses incurred by the recent proliferation of...

d844fe88 11/17/2009 11:44 am Iustin Pop

Use conflicting primaries count in cluster score

This small patch adds the number of conflicting primaries in the cluster
score. This is different from the other non-CV metrics where we usually
compute the percentage of failing instances (for that metric); but for a...

1e4b5230 11/17/2009 11:44 am Iustin Pop

Node: add function for conflicting primary count

b2999982 11/17/2009 11:44 am Iustin Pop

Add a new node list field

This patch adds a new node list field (ptags), showing the primary
instance tags.

0f15cc76 11/17/2009 11:44 am Iustin Pop

Add a command-line option to filter exclusion tags

Since we don't want all instance tags to be used for exclusion, we add a
command line option to filter on these. Since the iallocator protocol
cannot accept command line options, currently it's not possible to...

5f0b9579 11/17/2009 11:44 am Iustin Pop

Introduce tag-based exclusion of primary instances

This patch introduces exclusion of primary instances based on tags. This
is incomplete as currently all tags are being excluded, and we don't
optimise towards relocation of instances sharing tags on the same node.

17e7af2b 11/11/2009 12:10 pm Iustin Pop

Add a tags attribute to instances

… and read it in all the loaders. hscan is modified to save it to the
files it generates.

The attribute is not yet used in any place.

27671a61 11/11/2009 11:39 am Iustin Pop

Small change in some list arguments

This is simpler than the concat operator.

1cd133d6 11/10/2009 07:24 pm Iustin Pop

Use either \- or \(hy in manpages

This reduces warnings from lintian when building Debian packages.

eefd790c 11/10/2009 03:58 pm Iustin Pop

Update NEWS file for the 0.2.0 release

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

5774167b 11/10/2009 03:23 pm Iustin Pop

Rewrite NEWS for better RST compatibility

The text-only version should still be very readable, but the RST output
will be better hopefully.

e98fb766 11/10/2009 02:59 pm Iustin Pop

Allow overriding the field list in -p

The print nodes option can now accept an optional field list to
customise the output. This is ugly, since the field names do not match
the header names, but it is at least barely customisable (at runtime).

5d4f9eed 11/09/2009 06:18 pm Iustin Pop

Update hspace manpage with tiered allocation info

Also fixes some other small issues in man pages.

76354e11 11/09/2009 05:49 pm Iustin Pop

Move more node-listing functionality in Node.hs

This will prepare for the runtime-selectable field list.

a7a8f280 11/09/2009 04:51 pm Iustin Pop

Change the default dynamic usage to baseUtil

This fixed the unbalanced secondary instances on partially empty
clusters, and helps in general for the cases where real utilisation data
is not available.

daee4bed 11/09/2009 03:43 pm Iustin Pop

Add a few comments in the scoring function

117dc2d8 11/06/2009 07:23 pm Iustin Pop

Enhance the error reporting for Rapi and Luxi

Currently the JSON conversion in Rapi and Luxi are giving something
like:
Error: failed to load data. Details:
Unable to read Double

This doesn't tell one where the error is (in a node specification? and...

262f3e6c 11/06/2009 07:23 pm Iustin Pop

Change the Utils.fromObj signature

Currently the fromObj function takes a JSON object which is then
converted into a list of (String, JSValue) in which we make a lookup.
However, most of the callers of this function call it repeatedly on the
same object, which means we do the object→list conversion repeatedly....

a160c28e 11/06/2009 07:14 pm Iustin Pop

Rework the tiered spec output format

12e6776a 11/06/2009 07:13 pm Iustin Pop

A small style change in Node.hs

This imports PeerMap as P and reindents some lines.