Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ 415feb2e

History | View | Annotate | Download (536.6 kB)

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

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

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

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

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

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

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

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

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

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

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

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

ff6c5e55 01/26/2012 01:53 pm Iustin Pop

Add new ipolicy parameter vcpu_ratio

This adds the new parameter and changes the validation routines to
handle IPOLICY_PARAMETER value as floats. Very very ugly code :(,
should be redone much cleaner.

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

12378fe3 01/26/2012 01:47 pm Iustin Pop

Rename IPOLICY_PARAMETERS to IPOLICY_ISPECS

As opposed to the initial situation, the PARAMETERS will be more than
just the min/std/max ispecs. Let's rename it, before re-adding the
PARAMETERS constant with a different meaning.

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

735e1318 01/25/2012 03:36 pm Michael Hanselmann

gnt-instance recreate-disks: Allow specifying new size

With this change a new disk size can be specified when recreating disks.

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

cf572b13 01/25/2012 03:24 pm René Nussbaumer

LUClusterSetParams: When ipolicy is updated warn for new violations

We need to loop over all node groups to apply their modification to make
sure that the new ipolicy actually affects their instance

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

68ab64cf 01/25/2012 03:24 pm René Nussbaumer

LUGroupSetParams: Warn if the new ipolicy will violate some ipolicies

If we modify the ipolicy we need to verify if any instance would now
violate the new ipolicy and warn about it. Any instance which already
violates the old one is ignored.

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

92ff96e8 01/25/2012 03:24 pm René Nussbaumer

cmdlib: Add a helper function for a set of violating instances

This helper will be used with the Op*SetParams and ipolicy verifications

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

7181fba0 01/23/2012 07:53 pm Constantinos Venetsanopoulos

Implement rbd disk template

Introduce the rbd disk template, which handles provisioning and
management of instance disks as block devices mapped to rbd volumes
on a RADOS cluster.

The rbd template is of type DTS_EXT_MIRROR, meaning rbd-based
instances can failover or migrate to any node, without...

c90d8e61 01/23/2012 03:17 pm Iustin Pop

Fix iallocator group objects

… this is yet another manual serialisation of objects :(

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

f626cef4 01/23/2012 01:37 pm Michael Hanselmann

LUInstanceRecreateDisks: Actually acquire node resource locks

Before this change an assertion would fail as the resource locks weren't
actually acquired.

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

a81075bf 01/23/2012 01:21 pm Michael Hanselmann

cmdlib._CheckInstanceState: Use instance name in error message

The variable “instance” is an instance object, so to not get a
serialized version of the instance, the “name” attribute must be
used.

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

e9ed4f2e 01/20/2012 07:55 pm Michael Hanselmann

cmdlib: Drop use of “len(…) != 0”

Found by Constantinos Venetsanopoulos.

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

2ea64524 01/20/2012 07:48 pm Guido Trotter

Merge branch 'devel-2.5'

  • devel-2.5:
    Migrate: don't check for free memory on cleanup
    Revert "cli: Disable abbreviation matching for options"

Conflicts:
lib/cli.py
- trivial
lib/cmdlib.py
- merge new condition

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

72dc3fb3 01/20/2012 07:34 pm Guido Trotter

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    Migrate: don't check for free memory on cleanup

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

6b826dfa 01/20/2012 06:24 pm Guido Trotter

Migrate: don't check for free memory on cleanup

Cleanup just updates the config with the correct location of the
instance, or informs of its down status, but never starts it. As such
there's no point in checking for enough free memory. Actually this check...

5b3f5fc8 01/20/2012 11:44 am Guido Trotter

LUInstanceStartup: check for minimum memory

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

5d1ab3a6 01/20/2012 11:44 am Guido Trotter

Instance startup: lock primary node

This will be used to balloon other instances on the node if needed.

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

2c0af7da 01/18/2012 06:03 pm Guido Trotter

gnt-instance modify -m|--runtime-memory

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

d2fe2bfb 01/16/2012 10:36 am René Nussbaumer

TLReplaceDisk: Add ipolicy checks

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

57dc299a 01/13/2012 03:24 pm Iustin Pop

Further fixes to instance policy validation

As a followup from "Remove extraneous check in policy creation", there
are more places where we build an ipolicy, and then manually check for
its validity. This is very bad style, as it duplicates the
verification code across many places....

2cc673a3 01/13/2012 03:16 pm Iustin Pop

Add new disk_templates parameter to instance policy

This is a bit more complex patch, as it requires changing the
assumption that all keys in the policy dict points to values that are
themselves dicts. Right now we introduce an assumption that any
non-dicts are lists, we'll see in the future if this holds or whether...

363c0106 01/13/2012 03:16 pm Iustin Pop

Fix handling of errors from InstancePolicy.Check...

This code raises a configuration error, but we need to transform it
into a prereq error (or possibly exec error), depending on when we
call this function.

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

50761ebd 01/12/2012 02:31 pm Constantinos Venetsanopoulos

Fix acquisition of node lock in LUInstanceGrowDisk

Ensure node level locks are recalculated properly
in LUInstanceGrowDisk.

Signed-off-by: Constantinos Venetsanopoulos <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

89e8508e 01/11/2012 10:13 am René Nussbaumer

cmdlib: _VerifyInstancePolicy has been replaced and is dead code

This removes this method

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

0e68bf27 01/11/2012 10:13 am René Nussbaumer

cmdlib: Rename _CheckMinMaxSpecs to _ComputeMinMaxSpec

This is to reflect the fact that _Check functions do raise Op*Error
which is not the case for _CheckMinMaxSpec.

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

20875652 01/10/2012 03:09 pm Michael Hanselmann

LUInstanceCreate: Release node resource lock

… after running iallocator. Otherwise an assertion later in the code
would fail (for a good reason).

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

ff02b60f 01/10/2012 02:34 pm René Nussbaumer

_CheckTargetNodeIPolicy: instance.primary_node is not objects.Node

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

c879832c 01/10/2012 02:34 pm René Nussbaumer

cmdlib: node.group is not a nodegroup object

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

26ece371 01/10/2012 02:34 pm René Nussbaumer

LUInstanceCreate: self.disks is a dict not a disk object

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

922c57bf 01/09/2012 07:27 pm Guido Trotter

InstanceStartup: use overridden beparams in prereq

Without doing this memory checks happen on instance default parameters
rather than any overridden ones.

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

a41fd46e 01/09/2012 06:16 pm Michael Hanselmann

Merge branch 'devel-2.4' into stable-2.5

  • devel-2.4:
    Add UnescapeAndSplit unittest for multi-escapes
    Fix a bug in command line option parsing code
    ConfigWriter: Fix epydoc error
    LUGroupAssignNodes: Fix node membership corruption
    Ensure unused ports return to the free port pool...
9fa567b3 01/06/2012 02:47 pm René Nussbaumer

gnt-node: Add instance policy to migrate

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

43f52ae3 01/06/2012 02:47 pm René Nussbaumer

cmdlib: Adapt LUClusterVerifyGroup for instance policy

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

10889e0c 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding instance policy to add

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

1559e1e7 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding verification of instance policy to modify

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

92cf62e3 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding instance policy to move

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

3ed23330 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding instance policy to migrate

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

b6aaf437 01/06/2012 02:46 pm René Nussbaumer

gnt-instance: Adding instance policy to failover

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

0fb81174 01/06/2012 02:45 pm René Nussbaumer

cmdlib: Adding helper for instance policy

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

73e6cf8d 12/19/2011 04:07 pm Andrea Spadaccini

Fix cluster destroy failure

Cluster destroy would fail if there were errors while deactivating the
master IP address. This patch demotes such errors to warnings, allowing
the cluster to be destroyed even if the master IP address turndown
fails.

Signed-off-by: Andrea Spadaccini <>...

085e0d9f 12/16/2011 10:30 am René Nussbaumer

gnt-node: Add hv/disk state to add

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

e4c03256 12/16/2011 10:30 am René Nussbaumer

gnt-group: Add hv/disk state to add

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

8584e922 12/12/2011 04:04 pm Andrea Spadaccini

Add the remaining DRBD dynamic sync disk params

Add the c-plan-ahead, c-fill-target, c-delay-target, c-max-rate,
c-min-rate parameters; report errors while setting the
synchronization speed.

Change the error signaling model of SetSyncParams. Instead of returning...

f2f57b6e 12/12/2011 04:04 pm Andrea Spadaccini

Add the dynamic-resync DRBD disk parameter

constants.py, cmdlib.py:
- add the dynamic-resync parameter, both at DT and LD levels;

lib/bdev.py:
- change SetSyncSpeed to SetSyncParams, and _SetMinorSyncSpeed to
_SetMinorSyncParams;
- use the dynamic-resync parameter....

195f90bf 12/09/2011 05:48 pm Agata Murawska

Empty ipolicy fix

Signed-off-by: Agata Murawska <>
Reviewed-by: Michael Hanselmann <>

6b9ff5e2 12/09/2011 05:47 pm Agata Murawska

SimpleFillIpolicy corrected

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

4f725341 12/09/2011 05:47 pm Agata Murawska

Change constants: ISPECS suffixes to prefixes

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

fb644e77 12/08/2011 07:24 pm Agata Murawska

GroupSetParam supports instance policy changes

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

1f5d9bf8 12/08/2011 07:24 pm Agata Murawska

AddGroup supports instance policy

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

edd49f9b 12/08/2011 07:24 pm Agata Murawska

Group query now calculates ipolicy

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

38c37a51 12/08/2011 07:24 pm Agata Murawska

Verification of instance policy for gnt-cluster verify

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

81e3ab4f 12/08/2011 07:24 pm Agata Murawska

Introduce instance policy on nodegroup level

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

be499e31 12/08/2011 07:24 pm Agata Murawska

Cluster-level instance policy - other

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

e1a6850f 12/08/2011 07:23 pm Agata Murawska

SetClusterParams supports instance policy changes

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

ad1dd4c7 12/08/2011 01:36 pm Andrea Spadaccini

Add net-custom and disk-custom DRBD parameters

Those parameters can be used to pass options directly to drbdsetup disk
and drbdsetup net.

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

8002e46b 12/08/2011 01:36 pm Andrea Spadaccini

Add the metavg DRBD disk parameter

This parameter represents the default metadata volume group for DRBD
disks. It can be overridden at instance creation time using the metavg
instance disk parameter.

Signed-off-by: Andrea Spadaccini <>...

ac00bf1b 12/08/2011 01:36 pm Andrea Spadaccini

Move LD parameters constants to the LDP_ namespace

Add the LDP_ prefix to the LD parameters-related constants, in order to
avoid pollution in the global constants namespace.

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Iustin Pop <>

11dc66f3 12/08/2011 11:51 am Bernardo Dal Seno

Add new back-end parameter "always_failover"

Instances that have this parameter is set to True are never migrated, but
instead they can only fail over. There are some cases where freezing the
kernel may cause problems, and hence this behavior is preferable....

2da9f556 12/08/2011 10:48 am René Nussbaumer

gnt-cluster: Allow modify disk/hv state

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

a8282327 12/08/2011 10:48 am René Nussbaumer

gnt-group: Allow modify disk/hv state

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

0ec2ce46 12/08/2011 10:48 am René Nussbaumer

gnt-node: Allow modify disk/hv state

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

0ba177e2 12/08/2011 10:48 am René Nussbaumer

cmdlib: Adding hv/disk state dict helper functions

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

784cd737 12/08/2011 10:48 am René Nussbaumer

cmdlib: Adding _UpdateAndVerifySubDict helper

This helps with 2 dimensional dicts.
For example the hv_state and the disk_state dicts.

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

8a69b3a8 12/06/2011 06:34 pm Andrea Spadaccini

Add DRBD barriers disk parameters

Add the disk-barriers and meta-barriers parameters described in the
design doc.

constants.py:
  • add the needed LD and DT-level parameters, use the defaults provided
    at ./configure time;
  • add constants representing which barriers should be disabled and the...
406a9c91 12/02/2011 06:55 pm Michael Hanselmann

cmdlib: Make use of cluster's new “primary_hypervisor” property

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

43e11798 12/02/2011 06:29 pm Andrea Spadaccini

LV stripes parameters for plain and drbd

configure.ac:
  • change the documentation of --with-lvm-stripecount parameter to
    reflect the change
doc/design-resource-model.rst:
  • change drbd/stripes to drbd/data-stripes and drbd/metastripes to
    drbd/meta-stripes...
6e9814a1 12/01/2011 01:04 pm Andrea Spadaccini

Add DRBD8 static resync speed disk parameter

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Iustin Pop <>

5e99141b 12/01/2011 01:04 pm Andrea Spadaccini

Use disk parameters in Logical Units

Signed-off-by: Andrea Spadaccini <>
Reviewed-by: Iustin Pop <>

bc5d0215 12/01/2011 01:03 pm Andrea Spadaccini

Add basic support for disk parameters

objects.py: * add disk parameters to Disk, Cluster, NodeGroup.

constants.py: * add dictionaries that will hold types and default values for disk
parameters (for now, empty).

test/ganeti.constants_unittest.py:...

1e89a135 12/01/2011 12:38 pm Michael Hanselmann

More fixes after commit 78519c106

A quick QA run successfully finished with these changes.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Andrea Spadaccini <>

78519c10 11/30/2011 12:26 pm Michael Hanselmann

Change “node_info” RPC to accept multiple VGs/hypervisors

Keeping the node state up to date will require information from multiple
VGs and hypervisors. Instead of requiring multiple calls this change
allows a single call to return all needed information. Existing users...

75191077 11/24/2011 12:31 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5:
    LUGroupAssignNodes: Fix node membership corruption
    LUGroupAssignNodes: Fix node membership corruption
    Fix pylint warning on unreachable code
    LUNodeEvacuate: Disallow migrating all instances at once
    Separate OpNodeEvacuate.mode from iallocator...
2b9245ff 11/24/2011 11:04 am Michael Hanselmann

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    LUGroupAssignNodes: Fix node membership corruption
    Fix pylint warning on unreachable code
    LUNodeEvacuate: Disallow migrating all instances at once
    LUNodeEvacuate: Locking fixes
    Fix error when removing node...
54c31fd3 11/24/2011 10:39 am Michael Hanselmann

LUGroupAssignNodes: Fix node membership corruption

Note: This bug only manifests itself in Ganeti 2.5, but since the
problematic code also exists in 2.4, I decided to fix it there.

If a node was assigned to a new group using “gnt-group assign-nodes” the...

218f4c3d 11/24/2011 10:32 am Michael Hanselmann

LUGroupAssignNodes: Fix node membership corruption

Note: This bug only manifests itself in Ganeti 2.5, but since the
problematic code also exists in 2.4, I decided to fix it there.

If a node was assigned to a new group using “gnt-group assign-nodes” the...

9c4f4dd6 11/24/2011 10:32 am Michael Hanselmann

Fix pylint warning on unreachable code

Commit c50452c3186 added an exception when all instances should be
evacuated off a node, but did so in a way which made pylint complain
about unreachable code.

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

c50452c3 11/23/2011 03:25 pm Michael Hanselmann

LUNodeEvacuate: Disallow migrating all instances at once

There is a design issue in the iallocator interface which prevents us
from doing this.

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

cb92e7a1 11/23/2011 03:03 pm Michael Hanselmann

Separate OpNodeEvacuate.mode from iallocator

Until now the iallocator constants for node evacuation
(IALLOCATOR_NEVAC_*) were also used for the opcode. However, it turned
out this was due to a misunderstanding and is incorrect. This patch adds
new constants (with the same values) and changes the affected places....

50722bfd 11/23/2011 03:03 pm Michael Hanselmann

LUNodeEvacuate: Locking fixes

When evacuating a node, only an assertion without informative text was
used to check if the necessary node locks had been acquired. This was on
top of evaluating the list of nodes without having a node group lock, so
this was changed as well....