Statistics
| Branch: | Tag: | Revision:

root / lib @ e07f7f7a

# Date Author Comment
e07f7f7a 03/30/2012 03:03 pm Michael Hanselmann

Add job support to query2 via LUXI

This enables the use of filters through query2 when listing jobs.

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

dc2879ea 03/30/2012 03:03 pm Michael Hanselmann

jqueue: Cache prepared field list in _JobChangesChecker

… instead of re-calculating it on every file change.

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

12e0ee0d 03/30/2012 03:03 pm Michael Hanselmann

NEWS: Deprecate LUXI calls replaced with query2

Adding the “luxi” namespace is necessary in “sphinx_ext”.

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

a06c6ae8 03/30/2012 03:03 pm Michael Hanselmann

jqueue: Convert GetInfo to query2

This rather inefficient implementation (fields are evaluated on every
call to GetInfo) is not good for WaitForJobChanges and doesn't support
filters, but that will be rectified in later patches.

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

9665bb3a 03/30/2012 03:03 pm Michael Hanselmann

query: Add definitions for job fields

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

03ec545a 03/30/2012 03:02 pm Michael Hanselmann

qlang.MakeFilter: Enable use of different name field

Jobs don't have a “name” field, so we must be able to control
the field used for simple filters.

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

26a72a48 03/30/2012 03:02 pm Michael Hanselmann

Merge cli.FormatTimestamp and utils.FormatTime

… to some degree at least. Unittests are included.

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

0b04b188 03/30/2012 03:02 pm Michael Hanselmann

constants: Don't hardcode priorities for LOCK_ATTEMPTS_TIMEOUT

Also include unittest for LOCK_ATTEMPTS_TIMEOUT.

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

66abb9ff 03/30/2012 03:02 pm Michael Hanselmann

jqueue._QueuedOpCode: Change a docstring

There was a typo and it's not necessary to repeat the class name.

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

c6a2c16e 03/30/2012 03:01 pm Michael Hanselmann

locking: Remove unused OldStyleQueryLocks

No longer used after commit 090377807.

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

8ccecf10 03/28/2012 12:27 pm René Nussbaumer

LUNodeAdd: Make the version call only dependend on DNS

Also move the version check into prereq to abort before alter cluster
state if the version mismatch.

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

bd6d1202 03/28/2012 12:27 pm René Nussbaumer

RPC: Add a new client type for DNS only

This patch moves the “call_version” to a new RPC client definition and
then adds a new runner using the DNS resolver for getting the host
address.

The standard “BootstrapRunner”, where the call was before, tries to...

b8203e1e 03/27/2012 06:10 pm Iustin Pop

Update default instance kernel version

We switch from vmlinuz-2.6-… to vmlinuz-3-…. To do this nicely, we
also add a ./configure-time setting for the KVM instance kernel.

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

63b4bb1e 03/27/2012 12:27 pm Iustin Pop

Fix escaping of percent signs in the shell lexer

Of course, we do have cases where we want to escape the percent signs,
and our regexes were not fully correct for this case.

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

7142485a 03/26/2012 06:26 pm Iustin Pop

Add a special lexer for sphinx/pygments

This will be used throughout our docs for better formatting example
shell sessions, with custom markup for comments, user fixed input and
user variable input.

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

3c4afa2e 03/26/2012 11:04 am Iustin Pop

Fix hardcoded Xen kernel path

We already have a ./configure-time variable for this, but it seems to
be actually unused.

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

a5183d3d 03/20/2012 02:11 pm Alexander Schreiber

Typo fix: s/aditional/additional/

Trivial fix for a typo in message output of LUInstanceSetParams

Signed-off-by: Alexander Schreiber <>
Reviewed-by: René Nussbaumer <>

3c6b7403 03/19/2012 05:45 pm Iustin Pop

Fix exported constants

I "forgot" to run the unittests before commit :(

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

47334810 03/19/2012 05:34 pm Iustin Pop

Export the AF_INET/AF_INET6 constants

These are needed to ensure that htools uses the same numeric values as
Python.

By the way, I'm not sure what's the best option: importing socket into
constants (this patch), or adding custom exports to
autotools/convert-constants....

5ec23388 03/19/2012 11:50 am Iustin Pop

Update gnt-node evacuate man page/help text

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

36c70d4d 03/16/2012 01:40 pm Iustin Pop

Fix gnt-group --help display

Copy-paste mismatch :)

Signed-off-by: Iustin Pop <>
Reviewed-by: Bernardo Dal Seno <>

34700f5b 03/15/2012 04:25 pm René Nussbaumer

Rename spindle_usage to spindle_use on Ganeti side

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

1d42996b 03/15/2012 04:05 pm Iustin Pop

Fix TLMigrateInstance use of IAllocator

hail now expects correctly that relocate_from is of equal length with
the number of required nodes (fixme: there's a lot of not well
documented behaviour here… not nice for any other potential
IAllocators). As such, we need to pass just the instance's primary...

553cb5f7 03/15/2012 03:53 pm René Nussbaumer

ipolicy: Keep track of spindle usage

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

37b918c2 03/15/2012 12:29 pm René Nussbaumer

iallocator: Add the spindle_usage to iallocator

This adapts the Ganeti side to export the spindle_usage

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

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

constants: Add new spindle_usage parameter to BE

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

81f7ea25 03/09/2012 04:46 pm Iustin Pop

Fix lint error in commit 035b33e2

Commit 035b33e2 forgot one blank space, and current pylint in Debian
Sid doesn't run on our code… so I didn't realise this until after
commit, sorry.

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

035b33e2 03/07/2012 10:59 pm Iustin Pop

Fix tempfile reset code & test on newer Python

Python 2.7.3 (rc status) and 3.2.3/3.3 (rc, respectively alpha status)
have fixed http://bugs.python.org/issue12856 which we worked around
ourselves.

This means two things:

- we don't need to manually reset the module...

7bfb3367 03/06/2012 08:58 pm Iustin Pop

Merge remote-tracking branch 'origin/devel-2.5'

Conflicts:
Makefile.am (trivial, test data files added on both branches)
lib/opcodes.py (trivial, master renamed filter→qfilter, 2.5
fixed the type of the parameter)...

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

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

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

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

048eeb2b 02/15/2012 05:43 pm Iustin Pop

Workaround changed LVM behaviour

The vgreduce command has changed behaviour from when we initially
wrote the code (2.02.02 versus 2.02.66, 4 years delta):

- if there are LVs which will be impacted, it requires --force
- otherwise refuses to proceed, but it still returns exit code 0...

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

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

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

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

5d0566de 02/07/2012 01:52 pm Iustin Pop

Accept both PUT and POST in noded

This is a partial cherry-pick from
7530364ddbe949bc34fc26f25ba3f5d921beb021 on master:

Currently, noded requires PUT, even though the semantics of the RPC
calls do not match a PUT. We change the code accept both PUT and POST,...

dd9b9d7b 02/01/2012 10:25 am Michael Hanselmann

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    Fix type check for OpQuery.filter
    Fix explanation of gnt-node evacuate --primaries-only
    Makefile.am: fix permissions for Python scripts on install
    devel/upload: Fix permissions for installed directories...
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 <>...

545d0362 01/31/2012 02:32 pm Michael Hanselmann

Fix type check for OpQuery.filter

Just using ht.TListOf as a type check doesn't work correctly. The
function must be called with the expected item type. In this specific
case TListOf was always called with the filter as a value, and the
result of that call evaluated to truth. Since filters can be quite...

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

f1dff7ec 01/26/2012 08:31 pm Iustin Pop

Fix explanation of gnt-node evacuate --primaries-only

Furthermore, correct the --help display on evacuate.

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

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

1e7acc3b 01/26/2012 03:34 pm Iustin Pop

Fix gnt-cluster modify check of passed options

… and add the disk_templates/vcpu_ratio new entries. Since the default
ispecs_* are dicts, we can't compare them to none.

Additionally, add a QA test for this case (empty cluster modify).

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

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

Export the cluster ipolicy in iallocator

And remove a strange comment (the commit which introduced it,
d61df03e, doesn't explain it). Also document these new keys in
iallocator.rst.

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

976b78ba 01/26/2012 03:34 pm Iustin Pop

Add ipolicy_vcpu_ratio to command line

This allows changing this value from the command line.

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