Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ 1e7acc3b

History | View | Annotate | Download (533 kB)

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

d05326fc 11/23/2011 11:51 am Michael Hanselmann

Fix error when removing node

ConfigWriter.GetAllInstancesInfo returns a dictionary, not a list.
Removing a node would fail with “too many values to unpack”.

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

b2e233a5 11/22/2011 07:55 pm Guido Trotter

Remove BE_MEMORY from beparams but keep compatibility

Queries are already compatible (be/memory is an alias for be/maxmem) and
import/exports work. This patch patch fixes it for cluster init, modify
and instance add/start/modify.

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

63c55458 11/22/2011 07:55 pm Guido Trotter

cmdlib: use MAXMEM for all operations

Since for now we can only start instances at their maximum memory, we
modify all checks to use that value. When we'll have better support for
using a value in between some of these checks have to move to minimum
memory....

1db993d5 11/22/2011 04:53 pm Guido Trotter

ImportExport: use max and min memory params

Import uses the old "memory" parameter to populate the two new ones, if
they're not overridden already.

FinalizeExport exports minmem and maxmem, but also memory, as maxmem, to
allow importing to older ganeti clusters....

3fa222b4 11/22/2011 04:52 pm Guido Trotter

instance hooks: pass maximum and minimum memory

Also pass the "memory" value for retrocompatibility, for now.

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

edea391e 11/21/2011 11:52 am Andrea Spadaccini

Reapply commit 2a6de57 after merge

In the last merge I erroneously discarded the changes introduced by
commit 2a6de57 "Check the results of master IP RPCs". This commit
reintroduces them.

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

f73e5568 11/21/2011 10:45 am Michael Hanselmann

Fix QA breakage caused by merge 0e82dcf9

Patch tested and confirmed to work by Andrea Spadaccini
<>.

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

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...
05c2e624 11/18/2011 12:05 pm Michael Hanselmann

Merge branch 'devel-2.4' into devel-2.5

  • devel-2.4:
    Ensure unused ports return to the free port pool
    Re-wrap a paragraph to eliminate a sphinx warning

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

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

Warn if we enable maintain-node-health without confd

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

ac2c8bc0 11/17/2011 03:31 pm Michael Hanselmann

LUInstanceCreate: Release unused node locks

After iallocator ran we can release any unused node locks. Since they
must be in exclusive mode this should improve parallelization during
instance creation.

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

69f0340a 11/17/2011 01:04 pm Michael Hanselmann

cmdlib.TLReplaceDisks: Use itertools.count

… instead of a variable which needs to be incremented for every step.

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

57de31c0 11/16/2011 03:15 pm Agata Murawska

Transition into and out of offline instance state

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

2e04d454 11/16/2011 03:15 pm Agata Murawska

Introduce admin_state as 3-values data type

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

9ca8a7c5 11/16/2011 03:15 pm Agata Murawska

Rename admin_up to admin_state

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

63e6a7f6 11/15/2011 03:00 pm Michael Hanselmann

cmdlib._ReleaseLock: Do nothing if no locks are owned

The locking library doesn't like it when “release()” is called on
a lockset or lock which isn't held by the current thread. Instead
of modifying the library, which could have other side-effects,
this rather simple change avoids errors when a LU simply tries to...

4d4eae2a 11/15/2011 11:52 am Michael Hanselmann

Use resource lock when setting node parameters

Also acquire instance and resource locks in shared mode (see comment).

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

42828156 11/15/2011 11:52 am Michael Hanselmann

Use node resource lock for replacing instance disks

If early-release is not used, the resource lock is kept while waiting
for disks to sync.

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

63742d78 11/15/2011 11:52 am Michael Hanselmann

Hold node resource locks while setting instance parameters

Important for when disks are converted. Release locks once they're not
needed anymore. Make liberal use of assertions.

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

c57add7e 11/15/2011 11:52 am Michael Hanselmann

Hold node resource lock while moving instance

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

d3986702 11/15/2011 11:51 am Michael Hanselmann

Acquire node resource lock when removing instance

Removing an instance affects available disk space and memory.

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