Statistics
| Branch: | Tag: | Revision:

root @ 7b6e99b3

# Date Author Comment
7b6e99b3 12/30/2010 11:38 am Iustin Pop

Add a new type ClusterData

This will be used to hold all the disparate uses of the cluster data:
we have either tuples with these four elements, or functions taking
these four arguments, etc.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

45cb5963 12/30/2010 11:38 am Iustin Pop

Ajust hspace manpage for the new simulation syntax

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

6c7448bb 12/30/2010 11:38 am Iustin Pop

Simulation backend: read the allocation policy too

This patch moves the allocation policy from hardcoded to be read from
the given specification, and extends the error message for invalid
specifications.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

9983063b 12/30/2010 11:36 am Iustin Pop

Simulation backend: allow multiple node groups

This patch changes the behaviour of the --simulation option to be an
incremental option, where each new use defines a new node group. This
allows simulation of more complex clusters.

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

54cffd50 12/23/2010 05:52 pm Iustin Pop

Merge branch 'stable-0.2'

  • stable-0.2:
    Move man files to man/ subdirectory

Conflicts (all removed):
man/hail.1
man/hbal.1
man/hscan.1
man/hspace.1

ab0521f9 12/23/2010 05:38 pm Iustin Pop

Move man files to man/ subdirectory

This is just change on the 0.2 branch to synchronize with the master
branch. It allows automated builds to work better across the two
versions.

Signed-off-by: Iustin Pop <>
Reviewed-by: Adeodato Simo <>

50211c86 12/23/2010 05:17 pm Iustin Pop

Merge branch 'stable-0.2'

  • devel-0.2:
    Update NEWS file for 0.2.8 release
    hbal: return meaningful exit code for job failures
    Change the balancing function
d7f18640 12/23/2010 04:16 pm Iustin Pop

Update NEWS file for 0.2.8 release

Signed-off-by: Iustin Pop <>
Reviewed-by: Adeodato Simo <>

23448f82 12/23/2010 02:26 pm Iustin Pop

hbal: return meaningful exit code for job failures

Currently, LUXI job failures only display a warning message, while
still returning a success exit code. We change hbal to return
true/false from within execJobSet/runJobSet, and add a wrapper for
simpler code....

4715711d 12/23/2010 02:25 pm Iustin Pop

Change the balancing function

Currently the balancing function is a modified version of the standard
deviation (stddev divided by list length), due to historical reasons.

While this works fine for small clusters, for big clusters it makes
the balancing effect too "weak", and in some cases it refuses to...

949397c8 12/23/2010 11:16 am Iustin Pop

Move some tiered spec functionality to Cluster.hs

This splits out a bit of code from hspace.hs and moves it into its own
function in Cluster.hs.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

10ef6b4e 12/20/2010 02:23 pm Iustin Pop

Change the Node.group attribute

Currently, the Node.group attribute is the UUID of the group, as until
recently Ganeti didn't export the node group properties. Since it does
so now, we make the following changes (again apologies for a big
patch):

- we change the group attribute to be an index, similar to the way an...

e4d8071d 12/20/2010 02:23 pm Iustin Pop

Text.hs: also save the group data when serialising

This should have been in the previous patches, but sent separate for
clarity.

The live-test script is updated to read the first node from the
cluster, now that the text files don't start anymore with the node...

e0c85e08 12/20/2010 02:23 pm Iustin Pop

hbal: display the group name in the multi-group case

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

aec636b9 12/20/2010 02:23 pm Iustin Pop

hail: display group names in info messages

This patch switches from the group index to the group name for the
informational messages in the hail results.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

748d5d50 12/20/2010 02:23 pm Iustin Pop

Generalise the sepSplit function

Currently it works on splitting strings by individual chars, but we
can generalise it to split lists by list elements, which means we can
reuse it later in the Text module for splitting both lists of chars by
'|' or lists of lines by empty newlines. The change also makes the...

a604456d 12/20/2010 02:23 pm Iustin Pop

Text.hs: change to use sepSplit

The new sepSplit function can split based on empty lines, so we remove
the hackish text splitting from before and simply use sepSplit. This
is needed as the addition of extra sections would have increased the
code linearly, which we don't want :)...

afcd5a0b 12/20/2010 02:23 pm Iustin Pop

Text.hs: also read cluster tags from the data file

This means that a file with the correct information is as accurate as
the other backends (Luxi, Rapi). Serialization of tags is in the next
patch.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

716c6be5 12/20/2010 02:23 pm Iustin Pop

Text.hs: serialize cluster tags when writing data

This is the complement to the reading part. Now the live-test works
correctly against clusters with configured exclusion tags.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

1a3cc8ad 12/20/2010 02:23 pm Iustin Pop

live-test: support multi-group clusters

Since currently hbal can only work on single groups at a time, we need
to be able to specify the target group when running the live test.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

b2ba4669 12/20/2010 02:23 pm Iustin Pop

Implement a JSON instance for AllocPolicy

This will allow reading this attribute via the Rapi/Luxi backends.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

2ddabf4f 12/20/2010 02:23 pm Iustin Pop

Rapi: read the allocation policy from the cluster

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

c4c37257 12/20/2010 02:23 pm Iustin Pop

Luxi: read the allocation policy from the cluster

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

f4c7d37a 12/20/2010 02:23 pm Iustin Pop

Text: read/write the allocation policy

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

01fec0a1 12/20/2010 02:23 pm Iustin Pop

hail: allow overriding cluster data from requests

Currently, it's not easy to generate “fake” IAllocator request files
for hail. As such, testing on simulated clusters is hard to do.

To workaround this, we change hail to also take the ‘-t’ and
‘--simulate’ options, so that we can override the cluster data read...

73206d0a 12/20/2010 02:23 pm Iustin Pop

IAllocator: respect the alloc_policy for groups

This patch changes the allocate mode to respect the alloc_policy for
groups. It does this by changing the sort key from simply the solution
score, to a tuple with two elements: the alloc policy (which is now an...

a679e9dc 12/20/2010 02:23 pm Iustin Pop

Rework the data loader pipelines to read groups

This (invasive) patch changes all the loader pipelines to read the node
groups data from the cluster, via the various backends. It is invasive
as it needs coordinated changes across all the loaders.

Note that the new group data is not used, just returned....

f4531f51 12/20/2010 02:22 pm Iustin Pop

Add lookupGroup utility function

This will be used in the various backends similar to the lookupNode
function.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

0dc1bf87 12/20/2010 02:20 pm Iustin Pop

Add a new Group.hs module describing node groups

This is not yet used by the rest of the code.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

edd0a48f 12/20/2010 02:20 pm Iustin Pop

Add the new OpQueryGroups opcode definition

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

133f1791 12/15/2010 12:54 pm Iustin Pop

Update hscolour usage

This patch fixes two issues related to coloured sources generation.
First, recent hscolour has changed the css file (and we need to update
it), but it also can output it at runtime, so there's no need to store
it anymore in the source tree....

dec88196 12/09/2010 04:08 pm Iustin Pop

Improve error reporting for small clusters

When doing a two-node allocation on a cluster/group in which only one
node is online, or a one-node allocation without any online nodes, we
didn't show a valid error mesage. The patch changes tryAlloc to "fail
hard" in this case, to make the failure explicit....

9b1584fc 12/09/2010 04:08 pm Iustin Pop

hail/allocate: implement multi-group support

This is a bit hackish. We add a new function that takes the input data,
splits it into groups, runs the original tryAlloc for each group, and
then chooses the best solution, but adds the log messages from all the...

db4d9a9b 12/09/2010 04:08 pm Iustin Pop

hail: remove the custom info message generation

Since the solutions are "self-annotated", we can remove the custom code
from hail, and just keep a very small processResults function.

After this change, allocation/failure shows the new detailed
information....

859fc11d 12/09/2010 04:08 pm Iustin Pop

Add a 'log' attribute to allocation solutions

And also a couple of functions for describing a given solution; these
will be used in the future instead of the ones currently in hail.

The patch also enhances the description of failure messages.

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

85d0ddc3 12/09/2010 04:08 pm Iustin Pop

Change AllocSolution from tuple to its own type

Tuples are good for two, three, at most four elements. Beyond that, the
continuous pattern matching and construction/deconstruction becomes
tedious.

Since in the future we'll probably keep more information in the...

a334d536 12/01/2010 07:08 pm Iustin Pop

Cleanup AllocSolution after AllocElement changes

Since we added the score to AllocElement, we don't need to wrap
AllocElement in yet another tuple, just to attach the cluster score. So
we simplify the AllocSolution type.

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

7d3f4253 12/01/2010 07:08 pm Iustin Pop

AllocElement: extend with the cluster score

AllocElement, a type used as a result of allocations, holds the status
of the nodes after the allocation. In most cases, we'll compare this
allocation result with others, to see which allocation decision makes
the most sense. This comparison is done via the cluster score....

06fb841e 12/01/2010 07:08 pm Iustin Pop

Add two utility functions for the Result type

Actually, this just moves the functions from the QC module to Types, and
removes a duplicate entry from Cluster.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

99b63608 12/01/2010 07:08 pm Iustin Pop

Rework the types used during data loading

This improves on the previous change. Currently, the node and instance
lists shipped around during data loading are (again) association lists.
For instances it's not a big issue, but the node list is rewritten
continuously while we assign instances to nodes, and that is very slow....

2d0ca2c5 12/01/2010 07:08 pm Iustin Pop

Loader functions: move from assoc lists to maps

When loading big clusters, the association lists become a bit slow, so
we'll replace this with a simple Map String Int; the change is trivial
and can be reverted easily, while it brings up a good speedup in the...

6ff78049 12/01/2010 07:08 pm Iustin Pop

Convert some leftovers to NameAssoc

The type alias NameAssoc has been introduced a long time ago, but there
are some few not-yet-converted cases. In preparation for changes to that
type, let's make sure we use it consistently.

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

646aa028 12/01/2010 03:00 pm Iustin Pop

hbal: implement handling of multi-group clusters

On a single-group cluster, we proceed as before. On multi-group
clusters, we require selection of the desired group (currently via UUID
only).

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

f4161783 12/01/2010 03:00 pm Iustin Pop

Add Cluster.splitCluster for node groups

This splits a top-level cluster information into the component node
groups. Instance go to the group of their primary node, but otherwise we
don't disallow split instances.

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

ae16cf83 12/01/2010 03:00 pm Iustin Pop

Add the man html files to gitignore

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

5ef78537 12/01/2010 03:00 pm Iustin Pop

Rework Container.hs and improve test coverage

Since some of the functions we export from Container.hs are 1:1
identical to IntMap, we can just export the originals and remove the
wrappers. This reduces the code we need to unittest.

Furthermore, we add two simple unittest for the two non-trivial...

a423b510 12/01/2010 03:00 pm Iustin Pop

Add new command-line option for group selection

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

32b8d9c0 12/01/2010 03:00 pm Iustin Pop

Add two functions for checking cluster consistency

For now, we don't support instances allocated across two groups, and we
will reject such clusters. The isClusterConsistent function will return
a list of inconsistent instances, potentially allowing operation without...

d8bcd0a8 12/01/2010 03:00 pm Iustin Pop

Add function for nodes to (nodgroup, nodes) split

Unittests included. The function will be needed for consistency checks
in the algorithms.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

c4d98278 12/01/2010 03:00 pm Iustin Pop

Add a type alias for UUIDs

This is to pottentially allow easier changes later.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

e474b5b5 11/28/2010 07:02 pm Iustin Pop

Also build HTML versions of man pages

b7b29191 11/24/2010 03:55 pm Iustin Pop

RAPI: read the group UUID from the server

This depends on future support from Ganeti (2.4+).

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

31463db5 11/24/2010 03:55 pm Iustin Pop

IAlloc: read group uuid from the input message

This makes the code incompatible with JSON files from Ganeti pre-2.4.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

b3707354 11/24/2010 03:55 pm Iustin Pop

Text: read/save the node group UUID

Compatibility with old text files is kept by using the default UUID if
the file (or even some records) don't have a UUID.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

f5ed8632 11/24/2010 03:55 pm Iustin Pop

Luxi: read the node uuid from the cluster

This makes the code incompatible with Ganeti pre-2.4.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

a68004b7 11/24/2010 03:55 pm Iustin Pop

Node: add the node group's UUID

This is not used anywhere yet, and the backend are all just adding the
default UUID, not the real one.

The patch also allows displaying the group UUID in the node list.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

9b9da389 11/24/2010 03:54 pm Iustin Pop

Utils: add a default UUID

This will be used as a placeholder for the cases when we need a UUID
(any UUID), but we don't have one handy.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

a3e8da03 11/23/2010 04:46 pm Iustin Pop

Merge branch 'devel-0.2' into master

7570569e 11/23/2010 12:58 pm Iustin Pop

Improve the standard deviation computation

This does just two passes, instead of three, over the list. This reduces
the overall runtime well enough (~25%) in some tests, but it's not
reproducible using profiling, so I don't know how much the function
itself is being sped-up....

543e859d 11/23/2010 12:58 pm Iustin Pop

hbal: change handling of signal

Currently, hbal does a one-two signal handling, where the first signal
causes graceful termination, and the second one an immediate on (either
SIGINT or SIGTERM can be used, interchangeably). However, this poses a
timing problem: if two programs want to send a graceful termination...

5e718042 11/19/2010 01:35 pm Iustin Pop

Simu loader: move the loading to non-IO code

While we don't actually have IO code in the Simu loader, we do have the
same interface. So we move the code again to a separate parseData
function which is exported.

b3f0710c 11/19/2010 01:08 pm Iustin Pop

Luxi loader: split parsing from loading

748bfcc2 11/19/2010 01:06 pm Iustin Pop

Rapi loader: split parsing from loading

The change is similar to the text loader change.

dadfc261 11/19/2010 01:00 pm Iustin Pop

Text loader: split parsing from loadData

This change, which will be followed by similar changes in the other
loaders, splits the parsing of the data from the actual loading from
disk. Since the parsing doesn't usually involve IO actions, we will be
able to better test the parsing. The loading becomes a smaller part of...

9d775204 11/11/2010 01:02 pm Iustin Pop

Ignore nodes which are not vm_capable

This break compatibility with Ganeti pre-2.3.

92d43268 11/09/2010 09:51 am Iustin Pop

Merge branch 'devel-0.2'

  • devel-0.2:
    Fix tag exclusion weight
306cccd5 11/09/2010 09:37 am Iustin Pop

Fix tag exclusion weight

Currently, the tag exclusion metric has a weight of one, which means
there might be cases where we won't move instances around because it
upsets the cluster metrics. However, we do want to make a higher effort
for cleaning up tag collisions, so we increase the weight to an...

718f135d 10/26/2010 12:37 pm Iustin Pop

Force UTF-8 locale for pandoc invocation

Pandoc 1.5.x uses the locale information to parse its input files (only
1.5, pre and post version use always UTF-8). Hence we need to enforce a
UTF-8 locale for proper parsing of input files.

49148d15 10/25/2010 06:39 pm Iustin Pop

Move from hand-written man pages to RST/pandoc

This simplifies the maintenance of the man pages, and unifies the rst-to-*
converter to pandoc.

92921ea4 10/21/2010 04:58 pm Iustin Pop

Add design for htools/Ganeti 2.3 sync

This is a work in progress, will be modified along with the progress
of Ganeti 2.3.

ca8e1c6a 10/07/2010 04:09 pm Iustin Pop

Update NEWS file for 0.2.7 release

e3ae9508 10/07/2010 03:42 pm Iustin Pop

Fix some warnings in unittests

4886952e 10/06/2010 04:23 pm Iustin Pop

Add a hack for normalized CPU values in hspace

Currently, the key metrics/tiered spec computations show the virtual cpu
count. However, since we do have a maximum ration Vcpu/Pcpu, we can also
show the “normalized” cpu count, i.e. the equivalent physical cpu count...

03c6d8fa 10/06/2010 03:56 pm Iustin Pop

Improve the error message for tiered alloc option

03cb89f0 09/15/2010 06:30 pm Iustin Pop

hbal: implement user-friendly termination requests

Currently, hbal will abort immediately when requested (^C, or SIGINT,
etc.). This is not nice, since then the already started jobs need to be
tracked manually.

This patch adds a signal handler for SIGINT and SIGTERM, which will, the...

5f715404 09/03/2010 06:10 pm Iustin Pop

Document the gain options in hbal's manpage

848b65c9 09/03/2010 06:02 pm Iustin Pop

Use the mingain options in the balancing algorithm

Also adds them in hbal.

4f807a57 09/03/2010 03:35 pm Iustin Pop

Add new CLI options for min gain during balancing

Recent hbal seems to run many steps for small improvements (< 1e-3), so
we should stop early in this case.

We add a new option (-g), that will be used for the minimum gain during
balancing. This check will only become active when the cluster score is...

d78ceb9e 09/02/2010 03:45 pm Iustin Pop

Makefile: make the rst2html converter more strict

This will make the automated builds flag any problems.

49d977db 09/02/2010 03:43 pm Iustin Pop

Update NEWS file

74e89a14 09/02/2010 03:43 pm Iustin Pop

Fix ReplaceSecondary moves for offline nodes

The addition of a new secondary on a node is doing two memory tests:
- in strict mode, reject if we get into N+1 failure
- reject if the new instance memory is greater than the free memory (not
available memory) on the node...

adc5c176 09/02/2010 03:43 pm Iustin Pop

Add some more debugging functions

These are just variations of the standard debug, but are provided for
simpler code, since lazyness is something causing non-computation of
debug statements.

748654f7 08/30/2010 12:12 pm Iustin Pop

Implement cluster state saving in hbal

Also move the LUXI execution (-X) to the end, after all the output
messages are printed. No good in waiting for the messages for a long
while, especially as they are not up-to-date stats after the job
execution, just an estimation of what the state will be.

94d08202 08/30/2010 12:12 pm Iustin Pop

Change iterateAlloc to return the instance list

The Cluster.iterateAlloc and tieredAlloc functions are changed to also
return the updated instance list, since it is needed to have a “full”
cluster view.

3e9501d0 08/30/2010 12:12 pm Iustin Pop

Implement cluster state saving in hspace

This also uncovered a few issues with the allocation model (instances
not being marked up, etc.).

Compared to hbal, hspace will generate either one or two files (for both
the standard and the tiered allocation mode), depending on the input...

10852adb 08/30/2010 12:12 pm Iustin Pop

hspace: mark new instances as running

Otherwise the saved cluster state and the in-memory one are wrong.

db43d7b3 08/30/2010 12:12 pm Iustin Pop

Update man pages for the new -S option

4a273e97 08/30/2010 12:12 pm Iustin Pop

Abstract the cluster serialization from hscan.hs

This is currently hardcoded in an internal function in hscan.hs, and we
move it to Text.hs for later use.

02da9d07 08/25/2010 07:40 pm Iustin Pop

Add a new option --save-cluster

This option will in the future be used to serialize the cluster state in
hbal and hspace after the rebalance/allocation steps.

50811e2c 08/25/2010 07:04 pm Iustin Pop

Add unittest for Node text serialization

This checks that the Node text serialization and deserialization
operations are idempotent when combined other.

a070c426 08/25/2010 06:53 pm Iustin Pop

Switch unittest to custom hostnames

Currently, the hostnames are almost fully arbitrary chars, which breaks
the assumption that nodes/instances will be normal DNS hostnames.

This patch adds some custom generators for these hostnames, that will
allow better testing of text loader serialization/deserialization.

3bf75b7d 08/24/2010 07:30 pm Iustin Pop

Move text serialization functions to Text.hs

Currently these are in hscan, and cannot be reused easily.

57ef88df 07/29/2010 07:03 am Iustin Pop

Fix a couple of typos in the manpages

Again, thanks to lintian.

0ca66853 07/27/2010 09:44 pm Iustin Pop

hail: fix error message for failed multi-evac

Currently we show the instance index, but this makes no sense outside
the current running program. Instead, we show the instance name.

303bb0ed 07/27/2010 03:03 am Iustin Pop

NEWS: Add double blank lines before headers

This looks better for text-only viewing…

84edb64b 07/27/2010 03:03 am Iustin Pop

Update NEWS file for the 0.2.6 release

f688711c 07/23/2010 03:50 am Iustin Pop

hscan: return exit code 2 for RAPI failures

If some clusters failed during RAPI collection, exit with exit code 2 so
that tests can detect this failure.

b7478ce1 07/23/2010 03:32 am Iustin Pop

More enhancements to live-test.sh

b8262965 07/22/2010 04:57 pm Iustin Pop

Fix another haddock issue

691dcd2a 07/22/2010 06:03 am Iustin Pop

Remove an obsolete function and add Utils tests