Statistics
| Branch: | Tag: | Revision:

root @ 14fbd75b

# Date Author Comment
14fbd75b 03/03/2012 09:46 pm René Nussbaumer

hinfo: Adjust the verbosity

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

d0a14556 03/01/2012 08:48 pm René Nussbaumer

hinfo: Gather and print group statistics

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

f35ea63a 02/29/2012 06:17 pm Iustin Pop

Explicitly remove the .x.in man pages on failure

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

e8f936b0 02/29/2012 06:17 pm Iustin Pop

More -- fixes

Because .DELETE_ON_ERROR doesn't work consistently (works when the
target we're talking about is a final target, but not for
intermediates), I missed a lot of man checks.

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

c3024b7e 02/29/2012 04:22 pm René Nussbaumer

htools: Adding printTable helper

This helper abstract away all the unlines and unwords call you've to do
after you got a formatTable back.

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

5c52dae6 02/29/2012 04:19 pm Iustin Pop

Fixup a Node unittest

This fixes the prop_Node_rMem test, which cares about memory only;
otherwise we could fail due to other problems (e.g. not enough disk).

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

ee4ffc8a 02/29/2012 04:18 pm Iustin Pop

Allow overriding the target test count

This is not perfect, as the override applies identical target test
values to both the 'fast' and 'slow' tests (making the slow tests take
a long time), but it allows a quick override for manual runs.

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

eae69eee 02/29/2012 04:18 pm Iustin Pop

Add two more unittests for Node add/remove

These just test that add/remove are idempotent. This is not perfect,
as we use unsorted lists for some values (instead of sets), so when
using non-empty nodes this would break (but for empty nodes, a
1-element list is sorted, so it's fine)....

084565ac 02/29/2012 04:18 pm Iustin Pop

Use the spindles metric in cluster scores

This makes balancing use the new metric.

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

82f19570 02/29/2012 04:17 pm Iustin Pop

Track instance-used spindles in node set/add/remove

This simply tracks the instance-used spindles (using hard-coded '1'
per instance), and additionally prevents additions in soft-mode when
we go over the limit.

Note: there's an assymetry between addSec and removeSec (basically...

7959cbb9 02/29/2012 04:17 pm Iustin Pop

Shorten some function names

Since we use the functions always module-qualified, let's drop the
`instance` prefix and use a shorter one.

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

f87c9f5d 02/29/2012 04:17 pm Iustin Pop

Simplify logic in Node operations

This patch adds two helper functions and uses them for a somewhat
simplified logic in the add/remove pri/sec node functions.

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

0c7d4422 02/29/2012 04:16 pm Iustin Pop

htools: support spindles in simu backend

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

f951bd09 02/29/2012 04:16 pm Iustin Pop

htools: support spindles in text load/save

If missing, we'll default to 1 spindle.

This also updates the text file format with the ipolicy, which was
forgotten.

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

34ace266 02/29/2012 04:16 pm Iustin Pop

htools: add support for listing spindles for nodes

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

8bc34c7b 02/29/2012 04:16 pm Iustin Pop

htools: add spindle-related attribute to nodes

This adds the spindleCount, hiSpindles and instSpindles attributes.

The spindleCount is equivalent to spindle_count on the ganeti side (a
node parameter). hiSpindles is the maximum instance-used spindles, and...

c22d4dd4 02/29/2012 04:15 pm Iustin Pop

Add spindle ratio to htool's IPolicy

Just the usual data/type declarations, read/save in the text backend,
etc. Also does a bit of unit-test cleanup (the way we build
ipolicies).

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

e2bdaf25 02/29/2012 03:33 pm René Nussbaumer

hinfo: Adding man page

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

19e310cc 02/28/2012 05:02 pm René Nussbaumer

hinfo: Reorganize the code to separate functions

Also rename some functions as they don't reflect their actions anymore

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

1fdfa87a 02/28/2012 03:01 pm Iustin Pop

Two tiny fixed related to runtime functionality

Adds an assert and fixes a typo.

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

2922d2c5 02/28/2012 02:26 pm René Nussbaumer

hinfo: Adding basic skeleton based on hbal

It prints the information which hbal prints in a nice formatted manner and of
course without doing any actions. An example output looks like this:

$ hinfo -m xen.example.com
Loaded 4 nodes, 2 instances
Cluster has 1 node group(s)...

4f511a13 02/27/2012 06:37 pm Iustin Pop

Add automated checking for non-escaped --

This checks to see if any man output has [em] in it, as that will not
be correctly show in ASCII. Unfortunately the check will depend on
whether the other man check is done, but I didn't want to introduce
yet another short script for this (can be done, no issue)....

f624fa95 02/27/2012 06:37 pm Iustin Pop

Fix man pages to not use unescaped --

I've seen that man pages, as generated by the version of pandoc we
use, show single dashes in option names instead of double ones (
versus -
). After bringing it up with upstream
(http://groups.google.com/group/pandoc-discuss/browse_thread/thread/9c4589a4001d42f9/95ee8dae8932dc93),...

cc67d8eb 02/27/2012 06:35 pm Michael Hanselmann

Add job result descriptions to RAPI documentation

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

fe8d2553 02/27/2012 03:52 pm Iustin Pop

Remove a superfluous warning in LUNodeRemove

Since we run the post-hooks explicitly in the Exec() function (via
_RunPostHook) after we removed the target node from the config, we
will get a:

WARNING Node 'node2', which is about to be removed, was not found in...
b02c6bdf 02/23/2012 06:00 pm Michael Hanselmann

opcodes: Remove dependency on query module

There's no need to verify the field definitions on every query. They are
static for all intents and purposes anyway and verified at module load
time.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

d859a2cf 02/22/2012 03:13 pm Michael Hanselmann

http.server: Factorize request handling even more

This splits even more parts of the request handling code into a separate
class. Doing so allows us to reuse this part of the code for tests (e.g.
mocks). Unlike before now the error handling can also be reused....

377ae13e 02/22/2012 03:12 pm Michael Hanselmann

http.server: Move error message formatting to handler class

Like before this patch moves more functionality from the actual server
class into a separate handler class. At the same time the function is
changed to return both content-type and body instead of relying on a...

cca5b3fc 02/22/2012 03:12 pm Michael Hanselmann

noded: Shorter docstring for mlockall(2) executor

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

e0003509 02/22/2012 03:12 pm Michael Hanselmann

Split handling HTTP requests into separate class

Until now HTTP requests were handled in the same class as incoming
connections (http.server.HttpServer). With this change the request
handling is delegated to a separate class which can be re-used in tests...

c81f452f 02/22/2012 03:12 pm Michael Hanselmann

http.server: Factorize request handling

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

09037780 02/22/2012 02:03 pm Michael Hanselmann

Remove deprecated “QueryLocks” LUXI request

This has been deprecated since Ganeti 2.4 and hasn't been used by
Ganeti's code since. I'm not aware of any external users.

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

48796673 02/21/2012 09:18 pm Michael Hanselmann

Add result checks for OpTags*

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

415feb2e 02/21/2012 05:34 pm René Nussbaumer

opcodes: Annotate the OP_RESULT of query operations

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

3ccb3a64 02/21/2012 05:23 pm Michael Hanselmann

Replace single- with double-quotes

In at least two cases "%s" is replaced with str(), too.

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

0f85ebd9 02/21/2012 04:34 pm Iustin Pop

Fix asyncnotifier unit tests

On my workstation, if I run the following two tests in this exact
order:

- TestSingleFileEventHandler.testError
- TestSingleFileEventHandler.testReplace

the second test will fail, because there is no "unregister" of
previous tests (and the poll() done by asyncore will fire on the...

3bd0f3d8 02/21/2012 04:32 pm Iustin Pop

Small fixup to rapi docstrings

The fast that most classes don't override the @cvars means that direct
references to FillOpcode can fail (they do on my workstation, but not
on buildbot?). Anyway, for safety, it's best to qualify the name.

Additionally a small typo is fixed....

09cbac87 02/21/2012 04:32 pm Iustin Pop

Small update to LogicalUnit.ExpandNames docstring

… to make even more obvious what's the difference between a declared
lock level with an empty list of locks and no lock level.

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

37e61a77 02/21/2012 02:35 pm Iustin Pop

Export ndparams in RAPI node query

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

8930b0f0 02/21/2012 02:33 pm Iustin Pop

Add ndp/* fields to group/node query

Also change the meaning of group ndparams to mean the actual (not
custom) nd params, and add custom_ndparams for the current meaning of
ndparams.

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

f25b8f58 02/21/2012 02:33 pm Iustin Pop

Export ndparams in iallocator

Strangely, these were not exported at all before.

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

a194dc28 02/21/2012 02:32 pm Iustin Pop

Add ipolicy parameter spindle_ratio

This will represent the instance (count) per spindle_count of their
node(s). Debatable whether we need to add a per-instance
spindle_weight.

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

432e8e2f 02/21/2012 02:32 pm Iustin Pop

Add new spindle_count node parameter

Currently this is not handled by Ganeti, just recorded.

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

2a27dac3 02/21/2012 02:30 pm Iustin Pop

Fix upgrading of ndparams

Currently, we only upgrade the ndparams if they are missing
completely, which creates problems if we add any new parameters on an
already-upgraded cluster.

Fix this by adding an UpgradeNDParams function.

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

765ada2b 02/21/2012 02:28 pm Iustin Pop

Small fixes to objects.UpgradeDiskParams

Fix a typo, and cleanup the code a bit.

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

202fb4e0 02/20/2012 06:57 pm Michael Hanselmann

opcodes: Add result checks for OpBackup*

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

5fa3d337 02/20/2012 02:57 pm Michael Hanselmann

Improve opcode result check test to have a whitelist

Only whitelisted opcodes may not have a result check.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

82c54b5b 02/20/2012 01:27 pm Michael Hanselmann

config: Add check for disk's “iv_name”

This check verifies “iv_name” of all instance disks. If one is wrong
(which shouldn't happen in the first place), cluster verification will
warn:

“ERROR: cluster: Instance 'inst.example.com' has wrongly named disks:...

aa12a891 02/20/2012 12:50 pm René Nussbaumer

opcodes: Fix OP_RESULT for OobCommand

The result is a list of a list with elements with size of 2.

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

956631b6 02/17/2012 06:54 pm Michael Hanselmann

cli: Handle negative numbers when parsing key-value assignments

To remove the last disk, or to add a NIC to the end, one can use the
index 1. This wouldn't work as intended as “” is a special prefix.

Signed-off-by: Michael Hanselmann <>...

5401c39d 02/17/2012 05:39 pm Michael Hanselmann

utils.text: Add function to truncate string

The function adds an ellipse if the string was actually truncated. Also
start using it in mcpu for result checks (where the message is also
slightly changed to use a colon).

Signed-off-by: Michael Hanselmann <>...

8c2d770c 02/17/2012 03:16 pm Michael Hanselmann

Fix breakage introduced by fa6dd6bb56

Forgot “enumerate”.

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

0356a13d 02/17/2012 03:16 pm Michael Hanselmann

LUInstanceSetParams: Update disk's “iv_name”

When modifications are made, disks may not have the same index anymore.
Updating all disks fixes this.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

35554b4f 02/17/2012 01:34 pm Michael Hanselmann

ApplyContainerMods: Fix issues with indices

When adding an item the index given to the callback function would be
incorrect under certain conditions. This patch also adds assertions and
more tests.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

fa6dd6bb 02/17/2012 12:52 pm Michael Hanselmann

cmdlib: Remove some users of “iv_name”

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

e2569c1d 02/17/2012 12:52 pm Michael Hanselmann

ConfigWriter: Stop using “iv_name”

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

ea642319 02/17/2012 12:52 pm Michael Hanselmann

ConfigWriter.RenameInstance: Stop using iv_name, safer operation

Stop using the disk index encoded in “iv_name” when renaming an instance.

This patch also changes the code to operate on a copy of the instance
until the major changes have been applied. In the case of a failure we...

a71f835e 02/17/2012 12:52 pm Michael Hanselmann

gnt-instance modify: Support new-style NIC/disk modifications

This patch adds support for adding/removing NICs/disks at arbitrary
indices on the command line. To add a disk at a specified index, use
“--disk 3:size=16G”. To remove the second disk, use “--disk 2:remove”....

c363310d 02/17/2012 10:59 am René Nussbaumer

opcodes: Adding missing OP_RESULTs

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

ee938820 02/17/2012 10:59 am René Nussbaumer

mcpu: Make the op result exception more verbose

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

002f91c5 02/15/2012 05:16 pm Michael Hanselmann

cmdlib: De-duplicate code in _GenerateDiskTemplate

There has been a lot of duplicated code in _GenerateDiskTemplate,
and some cases of very similar, but not quite same duplicates. This
patch merges them.

Generating a disk's “logical_id” attribute is done via a...

a8e3e009 02/15/2012 05:16 pm Michael Hanselmann

Add unittest for cmdlib._GenerateDiskTemplate

This is in preparation to de-duplicating significant chunks of code in
cmdlib._GenerateDiskTemplate.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

a85f23fa 02/15/2012 12:20 pm Michael Hanselmann

rapi.testutils: Add exported functions to verify opcode input/result

These can be used by third-party code to verify mock code. Further work
on mocks is forthcoming, so this is only a start.

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

e6a8d799 02/14/2012 02:44 pm Michael Hanselmann

cmdlib: Fix “unpack non-sequence” error

The callback is expected to return a two-valued tuple.

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

d505bc48 02/13/2012 08:04 pm Iustin Pop

Fix doc bug introduced in 12637df

Commit 12637df changed/generalised how we build fields in the sphinx
extension, however it resulted in this uncaught-so-far result:

$ echo QUERY_FIELDS_GROUP | ./autotools/docpp
<generator object BuildValuesDoc at 0x28fd370>...

bdd6931c 02/13/2012 07:17 pm Guido Trotter

htools: allow rbd disk template

Notes:
- it'd be nice if there was a way to automatically generate the
DiskTemplate list instead of manually specifying it. After all we
have C.diskTemplates
- Of course this actually does nothing, as for other...

efcfa99d 02/13/2012 07:16 pm Michael Hanselmann

ApplyContainerMods: Return changes from callbacks

… instead of passing the list of changes as a parameter.

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

cd79cd83 02/13/2012 05:44 pm Iustin Pop

Use the ipolicy constants for key names

Sorry, I missed this when I wrote the code originally.

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

c0f1033f 02/13/2012 05:20 pm Michael Hanselmann

LUInstanceSetParams: Convert to generic algorithm for NIC/disk changes

Unfortunately this got a bit messier than I intended, but then again it
cleans up a lot of messy code with heaps of local variables
(“this_nic_override”) and LU attributes (“nic_pnew”, “nic_pinst”). Most...

8301885b 02/13/2012 05:20 pm Michael Hanselmann

cmdlib: Add generic algorithm for modifying NICs/disks

While preparing this patch series I identified at least three different
implementations of the algorithm for adding/removing/changing
NICs/disks. These two functions and corresponding unittests provide a...

0813170b 02/13/2012 04:02 pm Michael Hanselmann

Fix unittest breakage after commit a2aadb34b

Thou shalt run “make check” before sending patches.

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

b8925b86 02/13/2012 03:25 pm Michael Hanselmann

LUInstanceSetParams: Assertion on disk template/disk changes

Disk changes aren't allowed at the same time as a disk template change.

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

a2aadb34 02/13/2012 03:23 pm Michael Hanselmann

OpInstanceSetParams: Make two type checks public

They'll be used for tests in cmdlib.py.

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

e9c3d864 02/13/2012 03:23 pm Michael Hanselmann

OpInstanceSetParams: Accept more flexible NIC/disk modifications

Start accepting a new form of NIC/disk modifications for adding/removing
arbitrary NICs/disks. Unlike before the index must always be given. An
index of “-1” stands for the last item.

Signed-off-by: Michael Hanselmann <>...

bf629e45 02/13/2012 03:23 pm Michael Hanselmann

constants: Add constant for modifying existing NIC/disk

Until now it would not be possible to add/remove a NIC/disk in an
arbitrary position. This constant will be used in the data structures
necessary to add/remove arbitrary NICs/disks.

Signed-off-by: Michael Hanselmann <>...

20a32e74 02/13/2012 03:23 pm Michael Hanselmann

opcodes: Add comments to two parameter tests

These comments appear in the RAPI documentation.

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

7ed400f0 02/10/2012 05:10 pm Stratos Psomadakis

rbd disk template documentation and manpages

Add documentation and modify manpages for the RBD disk template.

Signed-off-by: Constantinos Venetsanopoulos <>
Signed-off-by: Stratos Psomadakis <>
Signed-off-by: Iustin Pop <>...

631aedf9 02/01/2012 10:24 am Michael Hanselmann

Re-added constant mistakenly removed in 58f0ce16873

“INSTANCE_DOWN” is still being used.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

f0fd35b1 02/01/2012 10:11 am René Nussbaumer

rapi.client: Removing constants not needed anymore

They were not referenced through the whole code and were marked internal
only.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

ddc1de7c 02/01/2012 08:24 am Michael Hanselmann

Add stricter checks for OpInstanceSetParams.{nics,disks}

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

ff8067cf 02/01/2012 08:24 am Michael Hanselmann

Add ht.TMaybeListOf type check

Replaces some uses of TOr(TNone, TListOf(…)).

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

8f227489 02/01/2012 08:24 am Michael Hanselmann

Stricter check for OS modifications passed to OpClusterSetParams

Don't just check the first element of each item, but also make sure the
OS name is a string and not empty.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: René Nussbaumer <>

58f0ce16 02/01/2012 08:19 am Michael Hanselmann

LUInstanceSetParams: Allow no-op change of instance offline status

With this patch marking an instance already marked offline (or online)
as offline/online again becomes a no-op. Also removed the unused
INSTANCE_UP variable.

Signed-off-by: Michael Hanselmann <>...

3016bc1f 01/31/2012 07:44 am Michael Hanselmann

OpInstanceSetParams: Merge {off,on}line_inst parameters

Instead of having two separate parameters, a single boolean parameter is
used. Unfortunately we need a third state to say “no change”, so the
value can be None, True or False (similar to other parameters). There...

784b6603 01/27/2012 05:44 pm René Nussbaumer

ipolicy: Make the keys of the dict consistent

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

827ac163 01/27/2012 04:56 pm Guido Trotter

N+1: verify using minimum memory

Since instances can be started, failed over and migrated with less than
their maximum memory N+1 will use the minimum memory for verification.

Note that this accounts only for the instances being moved being
resized, and not for the ones already on the node, as ganeti will not...

d4fcd298 01/27/2012 04:56 pm Guido Trotter

admin.rst: add information about maxmem/minmem

- Specify how maxmem and minmem are used at startup, failover and
migrate
- Add a paragraph about how to manually change the runtime memory, and
what Ganeti will and won't do automatically as of version 2.6...

2a50e2e8 01/27/2012 04:56 pm Guido Trotter

walkthrough.rst: updates for maxmem/minmem

- Fix two example outputs
- Improve N+1 resolution section specifying how different memories
affect N+1 calculation depending on the node

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

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

e14ddb6e 01/26/2012 06:33 pm Guido Trotter

Use allow_runtime_chgs in cmdlib

- Report the attribute value in the hooks runtime variable.
- Use it to abort migration if not enough memory is available on the
target node.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

8c0b16f6 01/26/2012 06:33 pm Guido Trotter

cli/opcodes: add a --no-runtime-changes migrate opt

This will be used for now to avoid ballooning memory at live migration time.

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

e57602c2 01/26/2012 06:33 pm Guido Trotter

Migrate/Failover: allow less-than-max-mem op

Failover works magically after we relax the check: the start operation
will just use less memory, if less memory is available.

For migrate we need to balloon down the source memory before the
migration, if the target node doesn't have enough capacity....

c113a9ab 01/26/2012 06:33 pm Guido Trotter

Failover and Migrate: acquire node resource locks

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

081d8528 01/26/2012 06:33 pm Guido Trotter

cmdlib._CheckNodeFreeMemory: return free memory

Signed-off-by: Guido Trotter <>
Reviewed-by: Michael Hanselmann <>

1b01390b 01/26/2012 04:30 pm René Nussbaumer

doc/rapi.rst: Document ipolicy parameter

Signed-off-by: René Nussbaumer <>
Reviewed-by: Michael Hanselmann <>

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