Statistics
| Branch: | Tag: | Revision:

root / hail.hs @ 4bc33d60

History | View | Annotate | Download (3.7 kB)

# Date Author Comment
4bc33d60 01/07/2011 05:39 pm Iustin Pop

Instance relocation: stay within the current group

This patch adds a new top-level relocation function that restricts the
relocation to the instance's group, and switches hail to it.

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

017a0c3d 12/30/2010 11:44 am Iustin Pop

Move part of the loader pipeline to ClusterData

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

34c00528 12/30/2010 11:40 am Iustin Pop

Convert Loader.RqType to ClusterData

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

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

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

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

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

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

3e4480e0 05/20/2010 12:07 pm Iustin Pop

Stop modifying names for internal computations

Currently the name used internally is modified and holds the shortened
name of the nodes/instances. This has caused issues before, since we
always have to strip the suffix from input data and reapply it if we...

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.

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

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

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

fbb95f28 09/28/2009 05:09 pm Iustin Pop

Turn on, and fix, more warnings

The Makefile was intented to be -Wall and not simply -W, but I missed
that. This enables more warnings and also enables -Werror (except for
the tests).

0427285d 07/15/2009 11:31 am Iustin Pop

Unify the command line options and structures

This patch moves all the command line options and their internal
representation into CLI.hs. This means that duplicated options between
any two binaries are no longer declared twice, and that we no longer
need the two *Option classes.

478df686 07/09/2009 03:44 pm Iustin Pop

Change the tryAlloc/tryReloc workflow

Currently, the tryAlloc and tryReloc function return a list with all the
results, both failures and successes. This is fine for hail, which does
one round of allocations, but is not so good for hspace, which does
iterative rounds; since at each (successful) step we only take the best...

8880d889 07/08/2009 07:38 pm Iustin Pop

Slight change to the internal allocation results

Currently the Cluster.AllocSolution type is defined as a list of
‘(OpResult Node.list, …)’ and the results for applyMove are defined as
‘(OpResult Node.List, …)’. Both these means that the failure/success
indication is hidden in the first elements of this tuple, which makes is...

2795466b 07/07/2009 12:20 pm Iustin Pop

Show errors on stderr instead of stdout

Currently many of the exit and warning conditions mistakenly display error
messages on stdout, which makes parsing the output of programs harder. This
patch attempts to fix such occurrences.

9f6dcdea 07/06/2009 11:50 pm Iustin Pop

Fix hlint-generated warnings

This big patch cleans up the code per hlint indications. Many removals
of extra parentheses, replacements of concat . map with concabtMap,
extra dollar signs, eta reductions, etc. were performed.

The code still compiles and passes a couple of manual tests on sample...

f2280553 07/05/2009 03:53 pm Iustin Pop

Introduce a new type for allocation results

Currently the allocation/move operations workflow return ‘Maybe a’,
which is very convenient but loses all details about the failure mode.

This patch introduces a new data type which encodes the specific failure...

c6484f0b 06/12/2009 02:29 am Iustin Pop

Fix 'unused X' warnings

This removes some unused functions and imports to cleanup the warnings.

78694255 06/12/2009 02:22 am Iustin Pop

Fix the various monomorphism warning

In a few places (e.g. tryRead or any printf call) it's a little bit hard
to add the correct type signatures, but in the it is possible to fix
these warnings (which can bite one in subtle cases).

9dcec001 06/01/2009 04:48 pm Iustin Pop

Rework the tryAlloc/tryReloc functions

Currently tryAlloc/tryReloc do not return the new instance, as this is
not needed for IAllocator alloc/reloc requests. However, for computing
the space, the new instance is useful, so we modify these functions to
return this information too....

e2fa2baf 06/01/2009 12:55 pm Iustin Pop

Add copyright/license information

This doc-patch adds copyright and license information to (hopefully) all
needed files.

dbba5246 06/01/2009 12:18 pm Iustin Pop

Move some alloc functions from hail into Cluster

These are generic enough to be used from multiple places, they belong
better in Cluster.hs than in the hail source.

19f38ee8 06/01/2009 12:18 pm Iustin Pop

Move the RqType and Request types to Loader.hs

These two will be more generic than now, and belong somewhere else -
Loader.hs is a generic module for data loading, thus we move them there.

608efcce 05/27/2009 10:45 pm Iustin Pop

Add type synonyms for the node/instance indices

This is a first step towards full datatype renaming. That requires more
changes, so at first we only want to document clearly what is a node
index, what is an instance index, and what is a plain Int.

262a08a2 05/27/2009 02:17 am Iustin Pop

Change the module import hierarchy

This patch makes the Types module a base module, and Node/Instance ones
import it, from the previous (opposite) situation. This will allow in
the future to use newtypes for the index and name types.

8a6f10ce 05/25/2009 11:12 pm Iustin Pop

hail: don't relocate to current primary node

This patch fixes the relocate-to-primary-node problem, and doesn't mark
the excluded nodes as offline anymore (we don't use them anyway, so
let's not use a different/fake cluster state).

8c2ebac8 05/25/2009 09:50 pm Iustin Pop

hail: do not allocate on offline/drained nodes

This patch implements filtering out of the offline/drained nodes and
fixes a bug in IAllocator.hs parsing (similar to an older bug in Rapi.hs
from where the code was copied).

842e3764 05/25/2009 09:35 pm Iustin Pop

hail: cleanup unused options

5e15f460 05/25/2009 09:31 pm Iustin Pop

hail: Implement non-mirrored instance allocation

This patch implements non-mirrored instance allocation, by allocating as
secondary node “noSecondary”.

f826c5e0 05/25/2009 08:45 pm Iustin Pop

hail: unify the post-processing of results

Both allocate and relocate compute new node lists, whose score must be
ranked and the best option chosen. This means we can convert the code to
a generic function.

4a340313 05/25/2009 02:09 am Iustin Pop

Implement hail allocate (for 2-node requests)

This patch implements allocate for two node requests. One node requests
can be done as soon as we have a valid allocateOn function for single
nodes.

58709f92 05/25/2009 02:06 am Iustin Pop

Working implementation if relocate

This patch completes the implementation of hail relocate. It maps all
valid destination nodes through a ReplaceSecondary IMove, filters out
the failed relocations, computes the resulting scores and picks the
lowest one.

ed41c179 05/25/2009 01:09 am Iustin Pop

Start implementing the hail functionality

This patch implements a very stupid (and broken) version of hail
‘allocate’.

24e1140f 05/24/2009 02:29 am Iustin Pop

Remove a function in hail

This is not yet used.

dbd6700b 05/24/2009 02:05 am Iustin Pop

Remove some extraneous uses of ktn/kti

Since we have Node/Instance.name, we can now simplify a few constructs.

75d1edf8 05/23/2009 03:34 am Iustin Pop

Introduce a class for CLI options

This patch generalizes a little the CLI handling by not passing in a
special function for help and such, but instead requiring that the
options object supports some common functionality.

e4c5beaf 05/23/2009 02:29 am Iustin Pop

More code reorganizations

This new big patch does a couple of more cleanups in the loading of data
chapter:
- introduce a Types module that holds most types (except the base
Node/Instance/etc.) so that multiple other modules can use these
(instead of only Cluster and its users)...

585d4420 05/22/2009 01:14 am Iustin Pop

Initial work on hail

This makes hail compile and get a request parsed via IAlloc, but nothing
more.