Statistics
| Branch: | Tag: | Revision:

root / htools @ 96dad12d

# Date Author Comment
96dad12d 08/28/2012 12:56 pm Agata Murawska

Implementation of AllInstancesInfo call and result

all_instances_info call takes a list of hypervisors and returns a list
of (name, memory, state, vcpus, time) - one element for each
instance.

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>

eaed5f19 08/28/2012 12:56 pm Agata Murawska

Infrastructure to execute RPC calls

Prepare and execute RPC call, prepare result for the call. These
procedures are generic in the sense that they only require the
Call and Result types to be connected.
We use curl library for sending http requests for RPC; as the library's...

d4709cce 08/28/2012 12:56 pm Agata Murawska

Datatypes for haskell RPC calls

We introduce typeclasses for RPC call and result and create a typeclass
that binds the two together. For that we need to use
MultiParamTypeClasses and FunctionalDependencies language pragmas, which
allow us to ensure that RPC result type can be deduced based on the...

c4f65a0e 08/28/2012 12:56 pm Agata Murawska

Add Hypervisor and start exporting AdminState

Very simple Hypervisor object, that we want to pass in some of RPC
calls is added. We also export AdminState data type, as it is used
in one of the calls that will be implemented in this patch series.

Signed-off-by: Agata Murawska <>...

951accad 08/27/2012 05:18 pm Iustin Pop

Merge branch 'devel-2.6'

  • devel-2.6:
    Make stable-2.6 compatible with newer pep8
    Fix computation of disk sizes in _ComputeDiskSize
    Add verification of RPC results in _WipeDisks
    Add test for checking that all gnt-* subcommands run OK
    Fix double use of PRIORITY_OPT in gnt-node migrate...
5d0389dd 08/24/2012 05:55 pm Agata Murawska

More descriptive Constants.hs header

Signed-off-by: Agata Murawska <>
Reviewed-by: Iustin Pop <>

13f2321c 08/13/2012 06:58 pm Iustin Pop

Add a server-side Luxi implementation

This is a trivial code change, but it allows us to finally test the
send-receive code on both client and server sides via a simple
in-process server.

The unittest works, but it won't handle timeouts very nicely; it will...

e821050d 08/13/2012 06:58 pm Iustin Pop

Switch the Luxi interface from Strings to ByteStrings

I'm doing this change for future performance optimisations. Currently
we use the Luxi interface just as a client, so not in the hot path,
but when we'll use this as a server interface, we're interested to...

76b62028 08/07/2012 12:48 pm Iustin Pop

Switch job IDs to numeric

This has been a long-standing cleanup item, which we've always
refrained from doing due to the high estimated effort needed.

In reality, it turned out that after some infrastructure improvements
(the previous patches), the actual job queue-related changes are quite...

619e89c8 07/31/2012 11:23 am Iustin Pop

htools: abstract function for parsing job ids

Both the job id and submit job result parsing are abstracted into
separate functions, so that later changes are more localised.

Also, this makes submitManyJobs itself easier to read.

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

ccc817a2 07/31/2012 11:21 am Iustin Pop

Introduce a type for the ganeti job type

This will be used for easier change later.

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

2ed0e208 07/27/2012 12:16 pm Iustin Pop

Fix 'explicitely' common typo

It seems that 'explicitely' is wrong, and that the right form is
'explicitly'. This is just fixing the typo plus adjusting affected
paragraphs.

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

7803e37c 07/19/2012 03:51 pm Iustin Pop

Merge branch 'stable-2.6'

  • stable-2.6: (21 commits)
    Release Ganeti 2.6.0 rc4
    Prepare NEWS for Ganeti 2.6.0rc4
    Add some rudimentary node group ipolicy checks
    Fix setting ipolicy on node groups
    Fix --no-headers for the new list-drbd command
    Add a simple QA test for gnt-node list-drbd...
d81ec8b7 07/19/2012 11:02 am Iustin Pop

Implement a node to drbd minors query function

This can be queried remotely since it's a pure configuration query.

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

7b2ead5a 07/19/2012 11:01 am Iustin Pop

Add support for computing instance all/secondary nodes

This fixes an old FIXME. Since we now how actual DRBD configuration
data, we can finally compute the instance's secondary nodes.

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

2e12944a 07/19/2012 11:01 am Iustin Pop

Add disk logical ID support in Objects.hs

This is a complex field, so we have to do a lot of manual work for now.

The complexity arises from the fact that the contents of the field,
and the way to parse it, depends on the disk type field, so we don't
have a single, static way of parsing it. Hence we needed the...

1c7bda0a 07/19/2012 11:01 am Iustin Pop

Extend the Template Haskell loadFn model

Currently, we only allow field-by-field de-serialisation. Since we
have cases where information about how to un-serialise a field is
split across two JSON fields (e.g. disk type and disk logical_id,
hypervisor and hvparams, etc.), we need to pass the entire object to...

c2e60027 07/19/2012 11:01 am Iustin Pop

Change how customFields are built

Instead of passing an expression (which cannot come from the current
module), we pass a name, which is allowed to reference functions from
the module we're in. Since we currently don't have custom fields, we
don't need to modify any callers....

0fc8e521 07/19/2012 11:01 am Iustin Pop

Implement lookup of partial names in Config.hs

This uses the recently-moved functions to implement partial lookup of
names on getNode and getInstance, similar to the Python codebase.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

2fc5653f 07/19/2012 11:00 am Iustin Pop

Reorganise the lookup functions

Currently, the LookupResult, MatchPriority and related functions are
locate in Loader.hs, since (so far) only hbal needs them in the
selection of instances. However, with the new functionality on confd
side, we need these functions there too, but we don't want to import...

ab0edd8b 07/19/2012 11:00 am Iustin Pop

Remove an unused function

This is not used, as we need a more complex serialisation, which is
done in the saveObjectField function.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

112aee5f 07/13/2012 06:00 pm Iustin Pop

Merge branch 'stable-2.6'

  • stable-2.6: (72 commits)
    Make Ganeti 2.6.0 rc3 release
    Allow reinstall even when secondaries are offline
    Prepare NEWS file for Ganeti 2.6.0 rc3
    QA updated to test instance removing when sec. is offline
    Ignore offline node errors when removing disks...
76ae2e5b 07/06/2012 04:53 pm Iustin Pop

Replace a few explicit case expressions

Since we're just talking about converting Maybe into another monad, we
can do that via the maybe function, instead of explicit casing.

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

96eccc1f 07/06/2012 04:16 pm Iustin Pop

Fix Haskell coverage results

There are two current issues with the coverage values:

- we don't import all modules, thus leading to incomplete
coverage results (too optimistic);
- we use hpc in its default mode (intersection), which means that even
modules which do have coverage results but are not used in all...

fce98abd 07/06/2012 04:16 pm Iustin Pop

Cleanup the QC.hs file w.r.t. compiler options

Currently, we build the Haskell unittests with custom GHC flags,
because we (I) were quite lazy when initially writing the
unittests. This is not a problem for the tests themselves, but it
creates problem when (for example) one would want to pass all...

b647b6d7 07/06/2012 12:11 pm Iustin Pop

Fix Query2.hs to compile without warnings

Since this is not yet used by any targets, we didn't detect yet the
compilation warnings. Just trivial exports/imports cleanup.

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

2a2e2610 07/05/2012 04:09 pm Iustin Pop

hbal: return exit status 0 in case of early exit

This derives from an internal bug, but the story is consistent across
both internal and external usage of hbal.

Basically right now, hbal returns exit code 1 if requested to exit
early, even if all jobs are successful. This is counter-intuitive due...

7f119c27 06/29/2012 08:34 pm Iustin Pop

hcheck: add two simple type aliases for readability

The same types are reused a couple of times, so let's add a couple of
type aliases for easier change later and readability.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

4b77c2a2 06/29/2012 08:34 pm Iustin Pop

hcheck: rework output mode

Looking at the output of hcheck, in human readable mode, it looks like
it always starts with a blank line. This is not nice, so I wanted to
redo this to start cleanly.

However, looking at the code, I realised that we need some internal...

85890a9d 06/29/2012 08:34 pm Iustin Pop

hcheck: reword and fix typo in instance/offline msg

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

0c76f280 06/29/2012 08:34 pm Iustin Pop

Add hlint warning for wrong use of 'length'

While removing split instances check from hcheck, I saw a wrong use of
'length': this should only be used when one needs the actual length of
the list, and not when one wants to check whether the list is empty or...

b1a9d630 06/29/2012 08:34 pm Iustin Pop

Remove can_rebalance functionality from hcheck

Since hbal can now run rebalances even in the presence of split
instances, we can remove this check and always run the rebalance.

Signed-off-by: Iustin Pop <>
Reviewed-by: Agata Murawska <>

cf279f03 06/28/2012 06:52 pm Iustin Pop

Correct a wrong --help option for --simulate

This was not update when the alloc policy was added to the parameter.

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

a7e1fd89 06/28/2012 06:51 pm Iustin Pop

hbal: relax restrictions on split instances

The recent patch series on hcheck made me realise how much pain we
have due to hbal not being able to work (at all) with split instances.

This is sub-optimal; ideally, hbal would degrade its behaviour, but
not completely refuse to work. This patch does this, by marking any...

81bcbbd3 06/28/2012 03:24 am Iustin Pop

Fix a few style issue in hcheck

This fixes a couple of issue I've seen while fixing the List import:

- removes over-use of printf with putStr/show
- wraps some lines
- removes superfluous parentheses in constructs like 'IO (a)'
- makes sure that in type signatures, the '->' are placed at the...

7568b296 06/28/2012 03:24 am Iustin Pop

Fix old-style import

Commit 1213f9d6 (re)added an old-style import, which fails with recent
compilers.

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

d64acbb5 06/27/2012 05:19 pm Agata Murawska

Style fix in hcheck

Signed-off-by: Agata Murawska <>
Reviewed-by: René Nussbaumer <>

3c0687b5 06/27/2012 05:19 pm Agata Murawska

Simplify stats printing

PrintGroupStats and printClusterStats had very similar code
structure. This patch abstracts those two into printStats, making it
a little more generic. Also, printStats has its arguments documented
as requested in previous patch series....

5cc97485 06/27/2012 05:19 pm Agata Murawska

Cleaner simulation of rebalance

This replaces the 'if .. then .. else ..' with a large block of code in
'else' branch by separating this code into a separate function.

Signed-off-by: Agata Murawska <>
Reviewed-by: René Nussbaumer <>

b5b19d5e 06/27/2012 05:17 pm Agata Murawska

Small reordering and renaming in hcheck

Reordered functions and shortened one function name.

Signed-off-by: Agata Murawska <>
Reviewed-by: René Nussbaumer <>

caa97388 06/27/2012 05:17 pm Agata Murawska

Move 'need rebalance' check from cluster check

As suggested by Rene, we should keep the check separate from printing.

Signed-off-by: Agata Murawska <>
Reviewed-by: René Nussbaumer <>

ecc39665 06/27/2012 05:17 pm Agata Murawska

Always print all variables in machine readable version

As discussed in cover letter of patch series introducing hcheck, in
machine readable version we should always print values of all variables.
When hbal simulation was not run, FINAL values are equal to INIT values....

592601b3 06/27/2012 05:17 pm Agata Murawska

Print idx <-> uuid mappings in machine readable mode

As per Iustin Pop's suggestion, we are printing group mappings
from group idx (known only to htools) to group uuid, which identifies
the group uniquely. This is required because group uuid and name
may contain characters such as '-' which are not valid parts of...

5cdbde9a 06/27/2012 05:17 pm Agata Murawska

Human readable group name improved

Instead of printing group id in human readable version of hcheck,
we now print group name.

Signed-off-by: Agata Murawska <>
Reviewed-by: René Nussbaumer <>

92eacdd8 06/27/2012 05:17 pm Agata Murawska

Print info about ability to rebalance

As suggested during offline discussion, this patch adds a new bash
variable and description field in hcheck, which informs if the
rebalance was possible. This is to determine if there are split
instances on the cluster, in which case rebalance is impossible....

e60fa4af 06/27/2012 05:17 pm Agata Murawska

Improve readability for hcheck-related changes

As suggested by Rene, I added comments to types for printKeys
and printFinal. Also, realigned some lines in Hspace.

Signed-off-by: Agata Murawska <>
Reviewed-by: René Nussbaumer <>

22b16dd0 06/25/2012 11:55 am Agata Murawska

Machine readable hcheck functionality

Machine readable output for hcheck.

Signed-off-by: Agata Murawska <>
Reviewed-by: René Nussbaumer <>

1213f9d6 06/25/2012 11:55 am Agata Murawska

Human readable hcheck functionality

Full hcheck functionality is implemented in this patch. Hcheck runs
per-group checks, provides summary for the entire cluster and simulates
rebalance if required, the printing the modified metrics.
In this patch, only the human-readable output is available....

e6685c53 06/25/2012 11:55 am Agata Murawska

Allowing rebalance to run silently

Part of hcheck's simulation required us to silently run hbal. For that
purpose we expose iterateDepth and allow it to run silently.

Signed-off-by: Agata Murawska <>
Reviewed-by: René Nussbaumer <>

79eef90b 06/25/2012 11:55 am Agata Murawska

Generalize functions used by both hspace and hcheck

As hspace and hcheck both use machine readable options, they require
similar functions - which are now generalized and moved to CLI and
Utils.

Signed-off-by: Agata Murawska <>
Reviewed-by: René Nussbaumer <>

22e513e7 06/25/2012 11:50 am Agata Murawska

Initial commit for introducting hcheck tool

Introduce infrastructure required to add Hcheck and build it
successfuly.

Signed-off-by: Agata Murawska <>
Reviewed-by: René Nussbaumer <>

232fc505 06/19/2012 11:39 am Iustin Pop

Fix corner case in quick-check generated tests

Thanks to Agata Murawska, a random seed that generates bad test cases
was found ("seed was 1768143307 2118231514, test size 74"). This is
due to the fact that some nodes were generated with tMem=0, fMem=0,
which means that pMem was NaN and thus the node was not comparing...

c664f05e 06/14/2012 07:15 pm Guido Trotter

Add query2 numeric comparison operators

These were recently added to the python version.

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

ac13f473 06/12/2012 04:55 pm Guido Trotter

Haskell data types for query2

This contains the types to express query2 queries, filters and results.

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

c5b4a186 06/08/2012 02:02 pm Iustin Pop

Fix prefix bug in Haskell ssconf implementation

This patch fixes a (brown-bag) bug in the ssconf implementation where
the looked-for filenames were not prefixed with the ssconf file
prefix.

Additionally, a test for this is added (which fails without the fix)....

36691f08 05/29/2012 12:09 pm Iustin Pop

Add support for SIGHUP handling in Haskell daemons

This patch adds support for handling SIGHUP and reopening the
stdout/stderr logfile in daemon mode (but not in foreground mode).

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

0c28bee1 05/29/2012 12:09 pm Iustin Pop

Rework logging setup for Haskell daemons

This fixes a missing functionality: closing of stdout/stderr when
forking daemons. Without this, starting the daemons from the command
line seems to work, but doing it from utils.RunCmd breaks, since
without closing the standard descriptors, RunCmd never finishes....

cdd495ae 05/08/2012 01:37 pm Iustin Pop

Add decoding of Luxi calls and unittests for LuxiOp

This patch adds a hand-coded decoder for LuxiCall arguments, as the
data-structure is not uniform enough for automated generation (even
for the serialisation, we had to add hints for some fields,
de-serialisation is even harder)....

5cefb2b2 05/08/2012 01:37 pm Iustin Pop

Some unit tests improvements

In preparation for unit-testing the Luxi definitions, this improves
the auto-generation of OpCodes: currently this uses unbounded plain
Strings for names and fields, and this creates too big test sizes
(e.g. when automatically generating job sets)....

95d0d502 05/08/2012 01:37 pm Iustin Pop

Auto-define a LuxiReq data type

We currently auto-generate a LuxiOp data type, which holds the entire
operation (including parameters). However, having a data type just for
the method call would be useful, so let's change THH to also
defineSADT for the Luxi constructors....

fae980e5 05/08/2012 01:37 pm Iustin Pop

Replace hardcoded constants with Constants.hs names

Now that luxi.py constants are exported, we can use them for more
consistency.

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

3ad57194 05/08/2012 01:37 pm Iustin Pop

Add a new JSON function

And its associated unittests.

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

79ac58fa 05/01/2012 08:11 pm Iustin Pop

Further fixes for new-style exception handling

Commit 30d25dd8 moved the htools code to new-style exception handling,
but the hconfd code hasn't been, which fails when compiling on newer
GHC versions.

This patch does the rest of the move; however, the situation is not...

30d25dd8 03/26/2012 11:54 am Iustin Pop

Switch to new-style exception handling

Currently, we're using Prelude.catch to handle I/O errors in
htools. This style of error handling has been deprecated for a while,
but it still used to work without warnings.

However, the GHC release 7.4 has started to emit deprecation warnings...

d80e3485 03/26/2012 11:54 am Iustin Pop

Change a type computation for compatibility with 6.12

This is the last warning related to TemplateHaskell that was 6.12
specific; for some reason, it doesn't "see" that traw/tname were used.

The patch just replaces the quoting syntax with an explicit type...

ffbd9592 03/26/2012 11:53 am Iustin Pop

Fix compatibility with TemplateHaskell from GHC 7.4

GHC 7.4 has updated the TemplateHaskell library, and it turns out that
the way we built the JSON instance implementation for showJSON was not
good (probably this is why GHC 6.12 was generating some warnings)....

30f2802f 03/26/2012 11:30 am Iustin Pop

Add trivial tests for gnt-* cli

While testing some other stuff, I realised that the gnt-* commands
could be broken (as in, the script fails with syntax errors), but make
check doesn't detect it. Since we have shelltest, we can now add
trivial tests for this case....

88a10df5 03/22/2012 07:30 pm Iustin Pop

Rework exit model

While updating the confd code, I realised that we have lots of
duplication in the exit model for the various programs.

So this patch attempts to abstract all the exits via a couple of new
functions; sorry for the somewhat big patch, but I hope the payoff is...

3e5012c6 03/22/2012 05:10 pm Iustin Pop

Fix out-of-tree builds

The new shell tests do not succeed out-of-tree, due to static paths
and other issues. This trivial patch fixes these issue, make distcheck
now passes.

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

53d4cdf1 03/22/2012 04:01 pm Iustin Pop

Convert manual shell tests to shelltestrunner

This is more of a RFC… Basically most of the shell-based tests are
converted from exec+grep to shelltestrunner.

Things are not all fine and nice though:

- we have dependencies between tests, as some generate some data files...

b714ff89 03/22/2012 03:58 pm Iustin Pop

Add command line option for controlling syslog use

… and enable it in hconfd.

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

a6e2a138 03/22/2012 03:58 pm Iustin Pop

Add support for syslog logging to Ganeti.Logging

Currently this is initialised to no from Daemon.hs, but will in the
future allow command-line options for controlling it.

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

f183de56 03/21/2012 12:37 pm Iustin Pop

Allow hail to read data from stdin

This patch makes hail treat '-' as denoting stdin, per the usual Unix
convention. This will help with testing.

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

19cff311 03/21/2012 12:37 am Iustin Pop

Update hconfd bind address handling

Instead of hardcoded IPv4 INADDR_ANY, this patch changes hconfd to use
either the any network for the configured cluster address family
(ipv4/ipv6), or whatever the user passes in via the --bind option.

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

aa3adf35 03/21/2012 12:25 am Iustin Pop

Add skeleton ssconf module

This currently has only one export function in it, which will be used
for future bind address functionality in daemons.

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

1091021c 03/21/2012 12:25 am Iustin Pop

Add two utility functions

These both are work with/on the Result type, so we add them to
BasicTypes. The functions will be used as more generic versions of
some more specialised functions that are right now spread across the
modules.

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

152e05e1 03/21/2012 12:25 am Iustin Pop

Add the bind-address option

This implements the same logic as the Python code: if the option is
not used, use the default appropriate for the cluster, otherwise try
to parse and use whatever was passed in.

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

896b2850 03/19/2012 05:34 pm Iustin Pop

Rename htools-hpc to hpc-tools to fix laziness

This is a stupid/trivial patch. I didn't realise when adding
htools-hpc that this will "break" tab completion on htools; as in, I
will have to add / manually always when completing files on the
command line....

e6812a1a 03/19/2012 12:00 pm Iustin Pop

htools: fix long version of --port for daemons

The dashes do not need to be in, if they are then the resulting option
is:

-p PORT  ----port=PORT     Network port (default: 1814)

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

f0753837 03/16/2012 12:35 pm René Nussbaumer

hspace: Make use of the spindle_use

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

5850e990 03/16/2012 12:08 pm Iustin Pop

htools: Fix some compiler warnings

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

9915fb20 03/15/2012 06:22 pm Iustin Pop

Add tests for custom text files

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

8d616d4d 03/15/2012 06:22 pm Iustin Pop

Add utilisation and instance selection tests

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

30084381 03/15/2012 06:22 pm Iustin Pop

Enable pipefail mode for shell tests

These allow more accurate checks.

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

55ffacfa 03/15/2012 06:22 pm Iustin Pop

Add RAPI shell-level unittest

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

d575c755 03/15/2012 06:22 pm Iustin Pop

Enhance the RAPI backend to accept file:// URLs

This will allow offline testing of this backend (except for the actual
curl part), also in the case where we didn't compile against curl.

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

6bbd76d2 03/15/2012 06:22 pm Iustin Pop

Add new hail (shell) tests

Using some hand-crafted files (manually modified from a real cluster
running master branch), we test that hail behaves as we expect:
doesn't load obvious wrong data, can do relocations/allocations, etc.

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

ec629280 03/15/2012 04:25 pm René Nussbaumer

htools: Reflect the rename of spindle_usage to spindle_use

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

fafd0773 03/15/2012 04:05 pm Iustin Pop

Add a helper function for mirrorType computations

We most always use `templateMirrorType . diskTemplate`, so let's add a
helper function for this.

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

64946775 03/15/2012 04:05 pm Iustin Pop

Enable all disk templates in unit-tests

After the many patches implementing the shared storage functionality
in iallocator, balances, etc., and after the patches preparing the
unit-tests to do the right thing for shared storage, we can finally
flip the bits that make instances have "random" disk templates as...

f9f6480e 03/15/2012 04:05 pm Iustin Pop

Enable evacuation/relocation for shared storage

This patch toggles the final bit and enables nodeEvacInstance to work
on shared storage instances. Diskless instances are handled the same
(as in, None is the same everywhere :).

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

91575c31 03/15/2012 04:05 pm Iustin Pop

Replace explicit case with 'either'

Instead of manually case-ing on the Either contents, let's just use
either with const functions (not really readable, but…).

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

a1741ae5 03/15/2012 04:04 pm Iustin Pop

Rename evacDrbdSecondaryInner to evacOneNodeInner

The function is now generic, so let's rename it and cleanup/improve
the docstrings.

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

6ab3ce90 03/15/2012 04:04 pm Iustin Pop

Abstract the secondary evac into a separate function

This is generic enough (no longer depending on the replace type) that
it will be used for other replace modes too. So all we need to do is
to abstract it to a separate function (that can be called from...

53bddadd 03/15/2012 04:04 pm Iustin Pop

Fix Node_addPriFD test for arbitrary disk templates

Currently, this test assumes localStorageTemplates, so let's make sure
we enforce that on the given instance

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

0c8cef35 03/15/2012 04:04 pm Iustin Pop

Extend the possible move types with FailoverToAny

This brings together all previous pieces and allows balancing to work
(with the known caveats related to disk space calculation) for shared
storage disk templates.

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

d953a965 03/15/2012 03:53 pm René Nussbaumer

htools: Add the new ipolicy field

Also add the spindle usage to QC

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

4c18f468 03/15/2012 12:29 pm René Nussbaumer

htools: Use the spindle usage in the algorithms

In the same transition also do a simple refactor of the caculation

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

b003b8c0 03/15/2012 12:29 pm René Nussbaumer

htools: Convert all the other backends as this is trivial

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

52cc1370 03/15/2012 12:29 pm René Nussbaumer

htools: Adapt the Text backend to spindle usage

The old text files remain compatible with this change.

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