Statistics
| Branch: | Tag: | Revision:

root / htools @ 3c1e4af0

# Date Author Comment
3c1e4af0 01/26/2012 08:45 pm Iustin Pop

Fix integer overflow in Node unittest

When using a really random "extra cpus" variable, this can overflow
(especially on 32 bit) and thus the final value can be < 0, thus the
test will fail to fail.

It doesn't make sense to test with huge values, so let's just generate...

e8fa4ff6 01/26/2012 03:34 pm Iustin Pop

Add vcpu_ratio definition to the IPolicy type

This will be "naturally" read in the JSON-based backends (Luxi/Rapi),
and we add explicit code for handling it in the Text backend.

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

487e1962 01/26/2012 03:34 pm Iustin Pop

Remove Node.mCpu, replaced with the ipol vcpu_ratio

Since the iPolicy contains the vcpu_ratio now, we can remove the
per-node mCpu value (which was the initial way to set this attribute).

Furthermore, we need to re-set the hiCpu value when changing the
policy....

5f3b040a 01/26/2012 03:34 pm Iustin Pop

Temporary fix for hspace's NPU calculation

hspace computes the NPU (normalised CPU units) via the
(used|pool|avail) VCPU divided by the (currently cluster-wide) max
vcpu_ratio.

However, in the future we'll have variable vcpu_ratios, so we can't
the calculation as such. We temporarily change to computing the...

284e9822 01/26/2012 03:34 pm Iustin Pop

Change meaning of the --max-cpu option

Instead of always overriding, we should update the nodes's maxcpu
setting only when the option is specified. Otherwise this will be read
from the cluster or from the Ganeti constant for non-live backends.

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

e54d6628 01/26/2012 03:34 pm Iustin Pop

Remove obsolete constant for vcpu_ratio

This is superseded now.

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

33e17565 01/26/2012 03:34 pm Iustin Pop

Re-indent code for readability

Otherwise the docstrings for members take too many lines.

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

90c2f1e8 01/26/2012 03:34 pm Iustin Pop

Track 'normalised' used CPUs in Cluster.CStats

This will be used in hspace for proper tracking of used/pool/unavail
npus.

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

76a20994 01/26/2012 03:34 pm Iustin Pop

Add a new type for holding allocation statistics

The current RSpec type doesn't cut it anymore (and it's used in other
places), so let's introduce a separate type for holding these
statistics.

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

80d7d8a1 01/26/2012 03:34 pm Iustin Pop

Switch over some hspace stats from RSpec to AllocInfo

This patch changes the allocation delta stats from RSpec to
AllocInfo. There's nothing interesting about it, but it should allow
more correct computations of Npus in hspace.

I also moved the AllocStats type alias from Cluster.hs to Types.hs...

37483aa5 01/26/2012 03:34 pm Iustin Pop

Expand the tiered alloc unittest to check allocation stats

This was missing before, so with the new metric (NCpus), it's a good
time to test this.

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

ad0e078e 01/26/2012 01:46 pm Iustin Pop

Remove two extraneous imports

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

468b828e 01/16/2012 02:50 pm Iustin Pop

Another small optimisation in test data generation

It seems that QuickCheck will happily generate huge data structures,
if that's what one requests. For this test, where we ask for [[Char]],
it could happen that we get a huge number of chars, so let's limit...

15e3d31c 01/16/2012 02:50 pm Iustin Pop

Generate tags using the helper in Node tests

Otherwise we test very big lists (slow) without any advantage in doing
so.

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

45c4d54d 01/16/2012 02:50 pm Iustin Pop

Combine two Node unittests

These two tests are very similar, so let's run them together instead
of generating the data twice. Also improve the test a bit.

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

a292b4e0 01/16/2012 02:49 pm Iustin Pop

Add unit-tests for --help/--version as common options

After reorganizing the way we process options, we can finally add a
test that all program personalities accept --help and --version and
that they exit early for these two.

This trivial patch has a higher than expected impact on the coverage,...

9f13be88 01/16/2012 02:49 pm Iustin Pop

Split the list of program personalities into a module

… a mini-module, actually. This is only done for unit-testing, as we
don't want to duplicate the personalities list in the tests.

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

21839f47 01/16/2012 02:49 pm Iustin Pop

Parse options in htools.hs, not in each program

This patch moves the call to getArgs/parseOpts into htools.hs, as
opposed to the current situation where htools.hs only calls the main
file of each program, which in turn calls these two functions.

By doing it only once we remove some duplicate code and we also export...

89298c04 01/16/2012 02:49 pm Iustin Pop

Add some very basic options test

Just tests that passing a string argument returns it correctly. We're
not interested in the flags themselves that much just that the
function itself parses some options at least correctly.

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

51c3d88f 01/16/2012 02:49 pm Iustin Pop

Split CLI.parseOpts into IO/non-IO parts

This will allow unittesting the CLI options much more easily. The
patch also fixes an inconsistency: usage help was displayed with an
extra new line in the error case (but not in --help).

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

a7ea861a 01/16/2012 02:49 pm Iustin Pop

Add test for CLI.parseYesNo

Also fix a tiny typo in the docstring.

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

8b5a517a 01/16/2012 02:49 pm Iustin Pop

Fix bug in CLI.parseISpecString and add test

'zip' finishes on the shortest list, so parseISpecString accepted any
string of 3 values or more, which is not good. Fix this and add test
for both successful and failed parsing.

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

e1dde6ad 01/16/2012 02:49 pm Iustin Pop

Add a unittest for the 'Simu' backend

This only test successful parsing, but for this case it tests
reasonably well the resulting cluster properties, I think (coverage
is >70% for expressions).

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

59ed268d 01/16/2012 02:49 pm Iustin Pop

Further optimise instance test data generation

Following on the lessons from this week (commit 7806125e), this patch
replaces generation of instances `suchThat` they are smaller than on
node with direct generation of instances with upper bounds on
memory/disk/cpu....

7806125e 01/13/2012 04:58 pm Iustin Pop

Fix very slow unit-test data generation in some cases

Learning, learning. It turns out that for objects with even just five
fields, generating them and filtering can be costly, especially when
the filtering is nested (as it was in this case, arbitrary1 →...

746b7aa6 01/13/2012 04:58 pm Iustin Pop

Fix one bad unit-test data generation case

It could happen that the node is generated with 0 disk available, in
which case the operation will fail due to disk issues, not CPU. Fix
this by using the recently-introduced genOnlineNode helper.

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

aa1d552d 01/13/2012 03:24 pm Iustin Pop

Further JSON unit-tests for various Types.hs types

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

96bc2003 01/13/2012 03:24 pm Iustin Pop

Add a unit-test helper function

… instead of always using "printTestCase … False".

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

6a855aaa 01/13/2012 03:24 pm Iustin Pop

Extend node evacuation unittests

Currently they only check for change secondary, via iallocator's
relocate method. We add two separate unittests that checks all the
node evacuate modes (ChangeAll, ChangePrimary) and also the group
change request. All of these are done only for DRBD instances....

a2a0bcd8 01/13/2012 03:24 pm Iustin Pop

Fix a few issues in unittest data generation

This patch fixes two ugly but non-critical issues:

- the getFQDN wrongly generated only the first component as
limited-length name, the rest could be any length, and that makes
the generated name bad for display purposes...

16670b57 01/13/2012 03:24 pm Iustin Pop

Remove some dead code

While wondering why Cluster.tryReloc is not unit-tested, I realised
that this is no longer uses. Apparently, last summer's new IAllocator
modes and related changes have silently deprecated this function.

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

3074ccaf 01/13/2012 03:24 pm Iustin Pop

Fix another data generation issue in tests

Another "good" seed value manages to generate nodes with identical
names, which of course makes the sets be of smaller value than the
lists. Avoid this issue by generating unique node names.

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

d6f9f5bd 01/13/2012 03:24 pm Iustin Pop

Add a help function for generating test nodes

This abstracts the concept of "give an sane, online node" in a single
place, rather than spread around the tests. We also change the
signature for isNodeBig for easier usage.

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

e73c5fe2 01/13/2012 03:24 pm Iustin Pop

Generate clusters with unique node names in tests

Nothing breaks otherwise in the cluster routines, but serialisation
to/from text gets confused otherwise.

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

dce9bbb3 01/13/2012 03:24 pm Iustin Pop

Add a complex allocation/serialisation/load test

This is unfortunately a complex test that checks if:

- starting from a empty cluster
- allocating a few instances on it
- serialising it via the Text backend
- loading it back into internal data structures...

b37f4a76 01/13/2012 03:24 pm Iustin Pop

Implement saving/restoring of policies in Text backend

This adds a new optional (so we're backwards-compat) section to the
cluster data so that we can reliably save/restore the policy data.

Note that different from the other sections, we save all policies...

bcd17bf0 01/13/2012 03:24 pm Iustin Pop

Further unittests for ipolicy/ispec text serialisation

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

55bd1414 01/13/2012 03:23 pm Iustin Pop

Fix a couple of bugs in handling offline instances

The addition of the offline state for instances has introduced a few
bugs related to their handling. The current code adds a helper
function for making the check whether an instances uses reserved
memory on the secondary (and uses it instead of just autoBalance),...

9cd6c325 01/13/2012 03:17 pm Iustin Pop

Add a helper function for 'not offline' instances

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

00b70680 01/13/2012 03:17 pm Iustin Pop

Unittests for the instance policy checks on allocation

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

1f5635a9 01/13/2012 03:17 pm Iustin Pop

Show explicit message when hspace fails to alloc

Currently, in the human-readable mode, hspace doesn't show any
messages when no instances can be allocated in tiered-alloc mode. This
is confusing, so let's add an explicit message.

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

aa5b2f07 01/13/2012 03:17 pm Iustin Pop

Obey instance policy in allocation routines

This currently checks the minimum/maximum sizes and the disk
template. Unittests will come later.

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

d6eec019 01/13/2012 03:17 pm Iustin Pop

Set group policy on nodes

In order to be able to use the group policy during allocation, we have
a few choices:

- pass the group policy as a separate argument to all involved
functions, or
- add the policy as an attribute to nodes, or
- add the group (not only the group index) as an attribute to nodes...

cdbab531 01/13/2012 03:17 pm Iustin Pop

A trivial optimisation in Loader.mergeData

During loading, we can eliminate some intermediate data
structures. This only matters for big clusters, and even there it's
less than 1% less memory allocated, but still, it's a no-brainer.

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

74c35f2f 01/13/2012 03:17 pm Iustin Pop

Trivial performance optimisation

This is not in the hot-path, but still, no sense in doing O(n) instead
of O(1).

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

6cff91f5 01/13/2012 03:17 pm Iustin Pop

Add ipolicy attribute to group objects

This is straightforward; as before, so far the text and simu backends
have no way to use a non-default ipolicy.

Furthermore, we do some unit-test preparation for future changes
(these seem a no-op for now, but they are needed for later patches)....

3c3c796e 01/13/2012 03:17 pm Iustin Pop

Enable Eq instances for TH-built objects

This is needed for the next patch.

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

9fdd3d0f 01/13/2012 03:16 pm Iustin Pop

Switch hspace to read the disk template from the cluster

The default disk template is the first enabled template.

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

fc42a408 01/13/2012 03:16 pm Iustin Pop

Read the disk templates part of the ipolicy

The default value is badly defined (hardcoded defaults)…

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

89c758c6 01/13/2012 03:16 pm Iustin Pop

Move DiskTemplate definition around

This is needed since we'll need the DiskTemplate definition in the
IPolicy one.

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

be468da0 01/13/2012 03:16 pm Iustin Pop

Switch hspace defaults to the cluster policy

This changes from the current hardcoded defaults to the cluster
policy. The command line options now override the defaults from the
cluster, and the tiered spec mode is always enabled.

Also fixes a tiny typo in the man page (together with the man page...

304f9292 01/13/2012 03:16 pm Iustin Pop

Add a helper function converting ispecs to rspecs

The rspec type is simpler than the ispec one; most likely it should be
deprecated later.

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

8564fb47 01/13/2012 03:16 pm Iustin Pop

Abstract creation of instance from a spec

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

df5d5433 01/13/2012 03:16 pm Iustin Pop

Load cluster ipolicy via Rapi

This requires changing from querying the /tags resource to the /info
resource.

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

135f64a3 01/13/2012 03:16 pm Iustin Pop

Update memory/maxmem reading in Rapi backend

Recent changes to the instance beparams have replaced memory with
maxmem in Rapi bulk queries. Until this is either reverted (for
backwards compat) or we decide to go ahead with only maxmem, we change
the backend to read both; this only affects the "instance down" code...

e77bc89b 01/13/2012 03:16 pm Iustin Pop

Load cluster ipolicy via Luxi

Also show it in hbal's verbose output (helpful for debugging).

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

71375ef7 01/13/2012 03:16 pm Iustin Pop

Extend ClusterData with the cluster instance policy

This attribute is always initialised to the default, and is not (yet)
read/saved in the various backends.

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

d02f941e 01/13/2012 03:16 pm Iustin Pop

Add default ipolicy declarations

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

a07343b2 01/13/2012 03:16 pm Iustin Pop

Add object definitions for the ispec and ipolicy

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

b69be409 01/13/2012 03:16 pm Iustin Pop

Stop exporting JSON functionality from Utils.hs

This completes the Utils/JSON split started in commit f047f90f. The
import graph should be cleaner now.

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

f3f76ccc 01/13/2012 03:16 pm Iustin Pop

More reshuffling of code

Following the split Types/BasicTypes, we can remove the last
JSON-related stuff from Utils.hs, and do some more cleanup.

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

0c37d1e4 01/13/2012 03:15 pm Iustin Pop

htools: split parts of HTools/Types.hs into BasicTypes.hs

The 'Result' type is common and:

- might be used outside of HTools-specific code too
- is better split as we need these basic types for building the more
complex ones in Types.hs

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

410a8a76 01/11/2012 01:12 pm Iustin Pop

Rename optISpec to optStdSpec

More consistency with the tiered allocation mode.

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

294bb337 01/11/2012 01:12 pm Iustin Pop

Change how hspace reads cmdline args for std specs

For the standard specs, hspace currently takes separate options for
the memory, disk and VCPUs. For the tiered specs, which were
introduced later, it takes a single option with all three values
combined....

7da760ca 01/11/2012 12:59 pm Iustin Pop

Abstract tiered specs command line parsing

This will be used in the future for the standard specs too, so let's
abstract it away.

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

5a1e31b4 12/13/2011 12:11 pm Iustin Pop

Add infrastructure for, and two extra hlint rules

This will allow us to easily use add new lint rules that we
standardise on, if any.

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

ba1260ba 12/08/2011 12:03 pm Iustin Pop

Some small test simplifications

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

3603605a 12/08/2011 10:00 am Iustin Pop

Cleanup hlint errors

First, we update the recommended hlint version to what I used to get a
clean output (1.8.15). Most of the changes are:

- remove unneeded parentheses
- some simplifications (intercalate " " → unwords, maybe … id →
fromMaybe, etc.)
- removal of some duplicate code (in previous patches)...

2f9198be 12/08/2011 10:00 am Iustin Pop

Abstract some common hspace code into a function

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

255f55a9 12/08/2011 10:00 am Iustin Pop

Abstract some common Cluster.hs code into a function

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

a1505857 12/07/2011 12:00 pm Iustin Pop

Convert opcode TH code to the use of Field type

This makes more explicit the field behaviour - previously an optional
field was detected via a "Maybe" constructor, and an optional one via
a "Just defval" one. With this, field behaviour become more explicit...

6bd26f00 12/06/2011 11:38 am Iustin Pop

htools: small change in error message in THH.hs

We should also display the value we can't parse, otherwise debugging
is very hard.

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

706f7f51 12/06/2011 11:38 am Iustin Pop

htools: improvements to JSON deserialisation

This fixes two problems:

- first, when we deserialise a big object, showing its value is not
useful, as it will hide the actual error message
- second, we shouldn't deserialise a container at once, because then...

879273e3 12/06/2011 11:37 am Iustin Pop

htools: add new template haskell system

This system based on explicit types instead of ad-hoc rules
(e.g. instead of deducing from "Maybe Int" an optional field, we now
can say explicitly OptionalField ''Int). In the first phase, this will
be used for the equivalent of lib/objects.py, which has slightly...

7345b69b 11/18/2011 07:20 pm Iustin Pop

htools: adjust imports for newer compilers

While testing with ghc 7.2, I saw that some imports we are using are
very old (from ghc 6.8 time), even though current libraries are using
different names.

We fix this and bump minimum documented version to ghc 6.12, as I...

0e82dcf9 11/18/2011 01:48 pm Andrea Spadaccini

Merge branch 'devel-2.5'

  • devel-2.5: (24 commits)
    LUInstanceCreate: Release unused node locks
    htools: rework message display construction
    hbal: handle empty node groups
    Document OpNodeMigrate's result for RAPI
    Ensure unused ports return to the free port pool...
0c1441eb 11/18/2011 12:41 pm Michael Hanselmann

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    htools: rework message display construction
    hbal: handle empty node groups
    Document OpNodeMigrate's result for RAPI
    Fail if node/group evacuation can't evacuate instances
    LUInstanceRename: Compare name with name...
b99d1638 11/17/2011 03:49 pm Iustin Pop

Fix unittest bug related to offline instances

Currently, the code in Node.hs is overly strict: once a node's free
memory reaches 0, it will refuse to add any instances (offline or
not). I think this is a safe safeguard (I don't expect nodes to run
without at least 1MB of free memory), so rather than change this...

9fc18384 11/17/2011 03:49 pm Iustin Pop

htools: finish re-indenting Cluster.hs

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

fd7a7c73 11/17/2011 03:49 pm Iustin Pop

htools: re-indent Node.hs

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

d5dfae0a 11/17/2011 03:49 pm Iustin Pop

htools: re-indent QC.hs

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

cd08cfa4 11/17/2011 03:49 pm Iustin Pop

htools: reindent CLI.hs

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

2ba17362 11/17/2011 03:49 pm Iustin Pop

htools: reindent hbal

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

3c3690aa 11/17/2011 03:49 pm Iustin Pop

htools: reindent hspace

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

00dd69a2 11/17/2011 03:49 pm Iustin Pop

htools: re-indent IAlloc.hs

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

ebf38064 11/17/2011 03:49 pm Iustin Pop

htools: reindent the rest of the files

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

bdd8c739 11/16/2011 04:01 pm Iustin Pop

htools: rework message display construction

While diagnosing some (unrelated) memory usage in htools, I've
stumbled upon some very bad behaviour in checkData: mapAccum is
non-strict, and the tuple we use also, so that results in the list of
list of messages being very bad space-wise (hundreds of MB of memory...

2072221f 11/16/2011 04:01 pm Iustin Pop

hbal: handle empty node groups

This patch changes an internal assert (which can only be triggered
when a node group is empty) into properly handling this case (and
returning empty node/instance lists).

While we could handle this in the backend (Cluster.splitNodeGroup)...

f23f21c3 11/16/2011 03:59 pm Iustin Pop

Start converting the indentation to 2-chars

… also do some other small style cleanups.

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

e1bf27bb 11/16/2011 03:16 pm Agata Murawska

htools: Nicer arbitrary instantiation

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

61bbbed7 11/16/2011 03:16 pm Agata Murawska

htools: change behaviour for offline instances

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

8a8ed513 11/16/2011 03:16 pm Agata Murawska

htools: remove 'running' from instance options

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

7dd14211 11/16/2011 03:15 pm Agata Murawska

htools: change runSt type to InstanceStatus

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

3771d104 11/16/2011 03:15 pm Agata Murawska

htools: create InstanceStatus ADT

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

5f828ce4 10/26/2011 05:35 pm Agata Murawska

Generalize the generation of ADT from raw types

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

260d0bda 10/26/2011 05:35 pm Agata Murawska

Luxi support for Query status in htools

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

07abe80a 10/26/2011 12:59 pm Iustin Pop

hail: don't select the primary as new secondary

This just adds the primary node of the instance as 'non-allocable'
during the choosing of the new secondary.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>
(cherry picked from commit 7073b3a86856bcd8d8a62c0b72f82deaabb8d8f1)...

e0baa26f 10/26/2011 12:59 pm Iustin Pop

hail: add an extra safety check in relocate

If we select the primary as new secondary, better to fail than return
wrong data to Ganeti.

Signed-off-by: Iustin Pop <>
Reviewed-by: Guido Trotter <>
(cherry picked from commit f25508bef4e85032f0468e5a6f0f8930ff154e66)...

e86f7f65 10/14/2011 01:37 pm Iustin Pop

Further cleanup in hspace

This moves the checking of results from the allocation functions to a
separate function, so that we have less code duplication. It also does
a bit of simplification in the printing functions.

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

5296ee23 10/14/2011 01:37 pm Iustin Pop

A bit of cleanup in hspace

The node offline/mcpu is identical to hbal's setNodesStatus, so let's
move that to CLI.hs and reuse it in hspace (also, rename it and drop
one 's').

Also, the check for the number of nodes is obsolete, as we compute
that from the disk template....