Statistics
| Branch: | Tag: | Revision:

root / htools / Ganeti / HTools @ 8353b5e1

# Date Author Comment
8353b5e1 07/22/2011 01:53 pm Iustin Pop

htools: add more functions for local disk storage

These will be used in Node.hs for proper add/remove instance
code. Furthermore, we restrict the movable status to the right disk
templates only, so that we don't attempt to move the 'wrong' instance
types....

0047d4e2 07/21/2011 02:52 pm Iustin Pop

htools: add two more small unittests

This adds tests for the opToResult and eitherToResult functions from
Types.hs, and changes two other tests for the same module to test JSON
serialisation (which automatically also tests the lower-level to/from
string conversion functions)....

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

9f8b97ce 07/21/2011 02:50 pm Iustin Pop

htools: add JSON instance for EvacMode

This abstracts the JSON parsing of the type EvacMode near its
definition, and simplifies its conversion in IAlloc.parseData.

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

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

519edd9f 07/19/2011 06:17 pm Iustin Pop

htools: add a machine-readable CLI flag

This will be used in hspace to toggle between "human" readable
and machine readable output formats.

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

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

33b9d92d 07/19/2011 05:54 pm Iustin Pop

htools: import the program modules in QC.hs

This adds the binaries code to the coverage, and thus the coverage
finally shows the real coverage over all logic code (except for the
htools.hs code, which is not logic code related to the algorithms, so
it doesn't matter — plus it's also very small)....

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

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

1adec4be 07/19/2011 05:12 pm Iustin Pop

htools: add a compatibility module

When compiling with the parallel-3.x library, we get a deprecation
warning, which makes understanding any other error messages
harder. This patch adds a compatibility module that will hold such
code for transitioning libraries....

a5f248ac 07/19/2011 05:12 pm Iustin Pop

htools: remove no-longer-needed tryMG* functionality

… which was deprecated by the previous patch.

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

fbe5fcf6 07/19/2011 05:12 pm Iustin Pop

htools: remove ialloc/relocate and multi-evacuate

Since the new node-evacuate mode does both their work and also
supports better multi-group clusters (including handling split
instances).

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

a86fbf36 07/19/2011 05:12 pm Iustin Pop

htools: fix potential bug in ialloc/change-group

Currently, the ChangeAll mode of nodeEvac computes the primary group
of the instance and then uses the resulting group index for computing
the group score. However, during the change-group operation (which...

96a12113 07/18/2011 06:33 pm Iustin Pop

htools: run IAllocator input through checkData

As the IAllocator backend is using a different data path than the
others, it doesn't get the full functionality that loadExternalData
does. This results in the current situation where checkData is not run
on the input cluster state, which means the node memory properties are...

8cd36391 07/18/2011 06:28 pm Iustin Pop

htools: abstract a function for displaying warnings

This will make it possible to reuse this in IAllocator too.

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

f9283686 07/18/2011 06:27 pm Iustin Pop

htools: return the final instance map in ialloc

Similar to the previous patch, this returns the final instance map
from the iallocator run, which will allow saving the cluster state for
further examination/post-processing.

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

ce6a0b53 07/18/2011 10:30 am Iustin Pop

htools: implement post-alloc cluster status display

This patch changes the IAllocator result formatting workflow to return
the final node list, which can be then used to display the final node
status too—currently only the initial status can be shown, which is...

4036f63a 07/15/2011 06:56 pm Iustin Pop

htools: return new state from new IAllocator modes

The old modes already return the node list (as part of AllocSolution),
this patch makes the new modes provide this new information.

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

5440c877 07/15/2011 06:56 pm Iustin Pop

htools: update the node-evac/change-group result

… per the new design changes. This also requires changes to
updateEvacSolution, as passing in the original instance is not
helpful; we just pass the instance index now and look up the actual
instance in the modified instance map....

d254d6ce 07/15/2011 04:29 pm Iustin Pop

htools: add function for getting all nodes of an instance

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

20b376ff 07/15/2011 04:25 pm Iustin Pop

htools: add change-group IAllocator mode

This builds a lot upon the node-evacuation mode, and its
implementation is therefore quite easy (once node-evac was added).

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

d72ff6c3 07/15/2011 04:24 pm Iustin Pop

htools: add group restrictions to findBestAllocGroup

While a normal multi-group allocation doesn't need to restrict the
list of target groups beyond the unallocable status of some groups,
when we relocate instances from one group to the other we need to
limit the subset of searched groups....

c9a9b853 07/15/2011 04:13 pm Iustin Pop

htools: generalise and rename availableLocalNodes

Currently this function works in the context of an instance, computing
its local group nodes. We can use generalise it to take a group index
argument, so that it's not bound to an instance, and we rename it...

57f07ff2 07/15/2011 04:12 pm Iustin Pop

htools: add ChangeGroup to IAllocator types/loader

This patch updates the types and functions in IAllocator.hs and
Loader.hs to the new design changes (elimination of multi-relocate
mode and replacement with change-group).

It also removes an extra re-export of EvacMode from Loader.hs....

8fd09137 07/15/2011 04:10 pm Iustin Pop

htools: split tryMGAlloc in two

Currently, this function does both identify the best group for an
instance, and format the results (partially). The former functionality
is useful in other contexts too, so let's split the function in two.

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

d52d41de 07/15/2011 04:10 pm Iustin Pop

htools: add node-evacuation of DRBD all nodes

This is much more complicated than either change primary (which is
trivial) and change secondary (which is also simple).

The main strategy is:

- choose a new secondary (that will become the final primary) and...

b4bae394 07/15/2011 04:00 pm Iustin Pop

htools: small optimisation in Cluster.collapseFailures

This makes fewer temporary data structures, and thus brings a bit of
improvement in total runtime.

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

8f48f67d 07/15/2011 03:59 pm Iustin Pop

htools: add optional limit to allocation count

Currently, the tieredAlloc/iterateAlloc functions will not return
until the allocation fails; this means unit-testing their
functionality (e.g. that an instance can be allocated) is slow, since
they will allocate all possible instances....

db56cfc4 07/15/2011 03:33 pm Iustin Pop

htools: add node-evacuation of DRBD secondaries

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

9bb5721c 07/15/2011 03:32 pm Iustin Pop

htools: rework compCV so that we can use [Node] too

In some cases, we have a [Node.Node] list, instead of a Node.List
structure. Instead of converting [Node.Node] to the latter, let's
rework compCV and add a compCVNodes such that we skip this
(potentially expensive) step....

3158250d 07/14/2011 01:14 pm Iustin Pop

Fix htool unittest failure due to invalid prereqs

Currently, the test prop_Node_rMem does some reserved memory checks on
nodes, and for the test to work correctly (can add more instances) we
require that the node free memory is greater than zero via a
prerequisite....

bef83fd1 07/14/2011 12:05 pm Iustin Pop

htools: add node-evacuate of DRBD8 primaries

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

47eed3f4 07/14/2011 12:05 pm Iustin Pop

htools: add more IAlloc data types and functions

These move the 'not supported' message deeper into the workflow;
assuming that the workflow as added by this patch is correct, all that
remains is:

- for disk template DRBD8, plug in the currently existing mechanisms...

a30b473c 07/14/2011 12:05 pm Iustin Pop

htools: add two monad-conversion utility functions

For monadic operations, these function will make it easier to convert
other monads (or monad-like structure) to our 'Result' type.

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

63a78055 07/14/2011 12:05 pm Iustin Pop

htools: add a function for computing evacuated nodes

The new IAllocator interface is based on instances, not nodes, so we
need to backtrack and compute on which nodes we can't allocate
instances during the current operation. This patch adds a function for...

97936d51 07/14/2011 12:05 pm Iustin Pop

htools: rename an internal constant

'emptySolution' is fine while we have only one Solution type
(AllocSolution), but in the future we'll introduce another one and
thus we should rename it.

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

1f4ae205 07/14/2011 12:05 pm Iustin Pop

htools: abstract and simplify a multigroup function

In the future, this 'split/associated instance idx list' functionality
will be used by other code, so let's move it to its own code.

The new method of computing the split also requires exporting one more...

247f77b7 07/14/2011 12:05 pm Iustin Pop

hspace: add support for units in the options

This patch converts hspace to allow units in all disk and memory
specifications, and updates the man page accordingly. It also correct
a mistake in the man page for the --max-cpu option.

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

1cb92fac 07/14/2011 12:05 pm Iustin Pop

htools: add parseUnit function

This is similar, but not identical, to Utils.ParseUnit. The biggest
difference is that we don't round up/down; as we only use integral
types, the result will always be rounded down.

Moreover, since (real-world) disk sizes come in SI units, the function...

22fac87d 07/13/2011 07:45 pm Guido Trotter

htools: simplify select tests

Rather than running all possible tests in one go, split them out in
three cases: "normal", undefined default value, undefined list values
(both of which require a valid response before them).

Signed-off-by: Guido Trotter <>...

424ec11d 07/13/2011 05:09 pm Guido Trotter

htools: lookup instance names in select/exclude

Currently we just match the passed name with fqdns. With this change we
do a proper search for either the fqdn or the initial name component, as
in Ganeti itself.

Signed-off-by: Guido Trotter <>...

efe98965 07/13/2011 04:52 pm Guido Trotter

htools: infrastructure for looking up names

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

bfe6c954 07/13/2011 04:52 pm Guido Trotter

htools: Add if' and select as functions

if' is just a functional version of the if-then-else construct. Using it
we can manipulate ifs as functions, and also build other functionality.

select allows to choose a result depending on truth value of statements,...

043a3929 07/13/2011 01:46 pm Iustin Pop

htools: remove obsolete option INodes

hspace no longer uses it, hence it can be removed.

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

a10a476a 07/13/2011 01:45 pm Iustin Pop

htools: add an utility function for disk templates

In the future we'll use this instead of requiring the number of nodes
from the user.

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

c4bb977b 07/13/2011 01:44 pm Iustin Pop

htools: define the --disk-template option

Also sorts the export list correctly.

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

6429e8d8 07/13/2011 01:40 pm Iustin Pop

htools: read/save the disk template in Text backend

This requires that we change the signature of loadInst in order to
properly annotate the error messages, which in turn requires more
unittest changes.

Also, this invalidates yet again saved data files…...

b3c5e8de 07/13/2011 01:38 pm Iustin Pop

htools: read the disk_template in the Luxi backend

We need to request the disk template in the Luxi query and then use it
when parsing the response.

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

5a4a3b7f 07/13/2011 01:37 pm Iustin Pop

htools: read the disk template in Luxi and Rapi

Both these backends already have the data, we just need to use it.

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

d25643d1 07/13/2011 01:37 pm Iustin Pop

htools: add DiskTemplate to instance definition

Currently always fixed to DRBD8, as that is what we assume already.

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

3c002a13 07/13/2011 01:37 pm Iustin Pop

htools: add some unittests for Types.hs

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

cc25e437 07/13/2011 01:36 pm Iustin Pop

htools: add a DiskTemplate type

This will be used later in the Instance type.

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

ca848e2a 07/13/2011 01:15 pm Iustin Pop

htools: small simplification to parseUtilisation

We eliminate the local variable as it's used only once.

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

0e09422b 07/13/2011 01:14 pm Iustin Pop

htools: rename Instance.auto_balance

… to autoBalance, per the recommended style.

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

34c5a24a 07/13/2011 01:13 pm Iustin Pop

htools: simplify some JSON-related code

Instead of manually encoding the JSValue(s), we can use showJSON as
long as we use data types that can be auto-converted.

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

7c14b50a 07/13/2011 01:13 pm Iustin Pop

htools: allow different result types

This patch extends the previous patch changes to allow that each
Cluster function returns a different result type, as long as we have
an auxiliary function that processes that into the standard
IAllocResult type.

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

d6cf394e 07/13/2011 01:09 pm Iustin Pop

htools: start reorganising the IAllocator workflow

Currently, all IAllocator requests return the same result type: a list
of strings (usually nodes, but can also be instance:nodes). This won't
be true in the future, with the new request types that will return...

00152519 07/13/2011 01:08 pm Iustin Pop

htools: split more code from hail/main

The logic of request processing is not separated into its own
function, and (beside CLI interaction, e.g. verbosity handling) all
logic is now in IAllocator.hs.

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

cabce2f4 07/13/2011 01:05 pm Iustin Pop

htools: move code from hail.hs to IAllocator.hs

This will make it easier to unittest the code, and keeps all login in a
single module.

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

4e84ca27 07/13/2011 01:03 pm Iustin Pop

htools: add parsing of input node-evac messages

This is a lot of duplication with modeMreloc, which will get sorted
out once we convert mreloc to change-group.

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

3667467d 07/13/2011 01:03 pm Iustin Pop

htools: remove pre-2.4 compatibility from RAPI

This was potentially hiding issues in the group query, so let's remove
it since we're now bound to the current Ganeti version.

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

1fe412bb 07/13/2011 01:02 pm Iustin Pop

htools: introduce new data type for node-evac

The evac-mode goes into the Types.hs module since it needs to be
available to Cluster.hs too.

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

525bfb36 07/13/2011 01:01 pm Iustin Pop

htools: docstring fixes and improvements

No code changes (except one definition being moved around in QC.hs)
are contained in this patch.

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

7034694d 07/01/2011 06:06 pm Iustin Pop

One Haskell and integer sizes fix

Haskell has two main integer types:

- Int, which is a native-type, and is guaranteed to have at least
[-2²⁹, 2²⁹-1] range; on 64-bit platforms, it has much higher range
- Integer, which is a software type (implemented using libgmp), and...

752635d3 06/28/2011 06:37 pm Iustin Pop

htools: fix prop_Node_rMem corner case

This patch fixes a bug in the test specification where we allowed nodes
with zero free memory (hence no instance can be added, at all) and adds
a simple labeling of the way this test can fail.

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

309e7c9a 06/28/2011 06:37 pm Iustin Pop

htools: fix corner case in prop_Text_Load_Instance

This unittest had a corner case where it could fail if the same
primary/secondary node names were generated.

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

509809db 06/28/2011 06:37 pm Iustin Pop

htools: allow unittest to be replayed

This just adds glue to allow replaying of tests using a given RNG state
and test size (both are needed for exact replayability).

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

a1cd7c1e 06/28/2011 06:37 pm Iustin Pop

htools: improve more unittests

Using new functionality in QuickCheck 2 (the suchThat function), we
generate now better test cases, such that (heh) we have no longer
incomplete tests.

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

00c75986 06/28/2011 06:37 pm Iustin Pop

htools: more fixes to unsatisfiable tests

Currently the way we generate nodes in some cases is by creating a
totally random node, then restricting the test based on whether the node
'size' (as defined by multiples of base unit) satifies some high/low
rules. This results in hard-to-satisfy conditions, so we change this...

41085bd3 06/28/2011 06:37 pm Iustin Pop

htools: Rework some unittests

The new scaffolding which replaced the batch driver of QuickCheck 1 now
shows how many passes we have for incomplete tests. Some tests show very
low pass counts, so we rework them to have more actually valid test
cases.

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

8e4f6d56 06/28/2011 06:37 pm Iustin Pop

htools: Switch to QuickCheck 2.x

Since current distros don't package anymore QuickCheck 1.x, let's move
to 2.x.

This requires also a few changes to the code:

- Test.QuickCheck.Batch doesn't exist anymore, so we need to write some
scaffolding code to replace it...

cc532bdd 06/28/2011 06:35 pm Iustin Pop

htools: some lint fixes

Removal of duplicate parantheses, removal of extra 'do', conversion from
nested if to guards, use hierarchical imports. All per hlint.

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

88253d03 06/28/2011 06:35 pm Iustin Pop

htools: rewrite Cluster.filterMGResults

filterMGResults was built using a sequence of map and filter calls;
while this was logically correct, it used some incomplete pattern
matching which with the new GHC 7 triggers a warning.

The patch rewrites it using a single foldl that does both the filtering...

e4491427 06/28/2011 06:35 pm Iustin Pop

htools: use the new Group.isAllocable

… instead of the hardcoded test against AllocUnallocable.

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

0ec6344e 06/28/2011 06:35 pm Iustin Pop

htools: add a helper function

… that checks if a group is allocable.

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

fcd731d9 06/17/2011 11:41 am Guido Trotter

Check that the selected instances are known

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

c6ccc073 06/17/2011 11:38 am Guido Trotter

Loader.updateMovable: evaluate selected instances

This also adds docstrings for the function arguments and renames exinst
to exinsts, which is how it is called in other functions, since it's a
list.

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

2d1708e0 06/17/2011 11:38 am Guido Trotter

Add instance selection list to Loader.mergeData

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

ddef0585 06/17/2011 11:38 am Guido Trotter

Add --select-instances hbal flag

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

6c30ce16 06/17/2011 11:38 am Guido Trotter

Remove double whitespace in help string

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

28f19313 06/01/2011 06:04 pm Iustin Pop

htools: introduce a type alias for JSON objects

This makes the type definitions a bit more readable/simpler.

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

b5cec17a 06/01/2011 05:29 pm Iustin Pop

hail: stop using old-style 'nodes' key

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

695c1bab 06/01/2011 05:29 pm Iustin Pop

hail: add parsing of multi-relocate request

This is not handled yet, this patch just adds parsing of the incoming
request.

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

2c3273e7 06/01/2011 05:29 pm Iustin Pop

hail: add new data types for the multi-reloc mode

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

e08424a8 05/31/2011 07:38 pm Guido Trotter

Implement balancing with no instance moves

Note that --no-disk-moves and --no-instance-moves are not incompatible,
but if both are used no solution can possibly exist.

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

8fcfb767 05/31/2011 07:38 pm Guido Trotter

Add --no-instance-moves cli htools option

This option doesn't currently do anything.

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

a69ff623 05/24/2011 06:22 pm Iustin Pop

Misc other conversions

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

2e5eb96a 05/24/2011 06:22 pm Iustin Pop

Convert group policies to constants

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

e82271f8 05/24/2011 06:22 pm Iustin Pop

Replace instance states hardcoded with constants

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

df5227dc 05/24/2011 06:22 pm Iustin Pop

IAllocator.hs: replace a few strings with constants

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

6a062ff9 04/18/2011 12:58 pm Iustin Pop

htools: make some error messages more explicit

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

9cbc1edb 04/14/2011 11:35 am Iustin Pop

Add some tests for the auto_balance attribute

It tests node add/remove secondary, rather than cluster-level N+1
checks, but it's better than nothing.

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

929b60d8 04/14/2011 11:35 am Iustin Pop

Node operations: take into account auto_balance

This patch changes the add to secondary/remove from secondary code to
not deduct/add the instance's memory if the instance is not
auto_balanced.

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

bc782180 04/14/2011 11:35 am Iustin Pop

Read/write auto_balance via Text

This also means another change in the text format; we really should
move to json…

The unittests are also update for the new 9-column layout and
additionally a bit of improvement is done.

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

a041ebb5 04/14/2011 11:34 am Iustin Pop

Read auto_balance via Rapi

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