| Branch: | Tag: | Revision:

root / htools / Ganeti / HTools / QC.hs @ 00152519

History | View | Annotate | Download (33.5 kB)

# Date Author Comment
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 <>

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

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

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

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

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

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

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

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

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

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

Replace instance states hardcoded with constants

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

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

c352b0a9 04/12/2011 11:55 am Iustin Pop

Add a new attribute to Instance.Instance

This will mirror Ganeti's be/auto_balance one, which we need to use to
properly match N+1 computations.

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

10028866 04/07/2011 01:56 pm René Nussbaumer

htools: Make opcode naming consistent with Ganeti codebase

This patch just cleans up the htools codebase to make it more consistent
with the naming of the Ganeti codebase.

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

a810ad21 04/07/2011 12:36 pm Iustin Pop

htools: add an utility function for JSON parsing

This allows extracting values from a JSON object that might miss, but
have a well-defined default value.

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

8d66f58a 04/06/2011 08:01 pm René Nussbaumer

htools: Use OpMigrateInstance with allow_failover option

Before hbal decided on the fly if an instance is migratable or not. As
we implemented failover fallback in commit d5cafd31456 we can start to
use that.

Signed-off-by: René Nussbaumer <>...

c478f837 03/23/2011 06:35 pm Iustin Pop

Another attempt at fixing htools build without curl

OK, my previous small fix was not good. There is another issue: haddoc
(the documentation generator) needs to pass the same compiler options
(i.e. in our case, -DNO_CURL) to ghc. But in case of no curl, then it...

2aa65bf0 03/23/2011 03:18 pm Iustin Pop

Fix Haskell unittests without RAPI

Since we don't test for now the RAPI backend directly, we can simply
skip the import. Later we can make a conditional import if needed.

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

dc384cf0 03/17/2011 06:04 pm Iustin Pop

Merge remote branch 'htools/master'

  • htools/master: (605 commits)
    Update NEWS file for version 0.3.1
    Update copyright years in the man pages
    Remove obsolete env vars from the manpages
    Fix dist archive generation
    luxi backend: show attribute names in errors...