Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ 31d827d1

History | View | Annotate | Download (543 kB)

# Date Author Comment
0c2e59ac 05/15/2012 02:38 pm Iustin Pop

Beautify disk ipolicy violations in cluster-verify

Currently, we only get:

instance3: ['disk-size value 512 is not in range [1024, 1048576]'

which doesn't explain which disk we are talking about. This patch
extends the verification functions to take an additional parameter...

0fd5547a 05/15/2012 02:38 pm Iustin Pop

Fix _ComputeNewInstanceViolations logic

This function did the opposite: was computing which old instance
violated the specs but no longer do it now. new - old is the expected
behaviour.

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

ea0f78c8 05/15/2012 02:38 pm Iustin Pop

Beautify a couple of error messages

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

e78a6817 05/14/2012 06:34 pm Michael Hanselmann

LUInstanceCreate: Run rename script on instance import

If an instance is imported with a different name, network settings may have to
be changed. Since import scripts may not already to the right thing, we decided
to run the rename script. The same technique is already used for inter-cluster...

7228ca91 05/14/2012 02:51 pm René Nussbaumer

gnt-group add: Fix diskparam fill

This was a pretty non-obvious bug. A cluster looks sane after
gnt-cluster init, however on a daemon restart the diskparameters had the
default filled in. The same applies to gnt-group add. This is due to the
nature that UpgradeConfig() from NodeGroups did just populate them with...

b3230b32 05/14/2012 02:51 pm René Nussbaumer

gnt-group modify: Fix an update issue with diskparams

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

2c758845 05/11/2012 05:20 pm René Nussbaumer

query: Expose diskparamters through query

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

f9bbf32b 05/11/2012 05:20 pm René Nussbaumer

gnt-cluster info: Print and format disk parameters

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

af9fb4cc 05/10/2012 02:56 pm René Nussbaumer

apidoc: Fix some typos and errors introduced by my previous patches

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

b3f0d718 05/10/2012 02:30 pm René Nussbaumer

LUGroup*: Fix inheritance of disk parameters

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

769b0bde 05/10/2012 02:30 pm René Nussbaumer

Special case blockdev_find

Similiar to blockdev_create we sometimes do find on children. This fixes
those cases. However, this is not very nice.

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

fc5bb0fe 05/10/2012 02:30 pm René Nussbaumer

Special case blockdev_create

This is due to the nature of bdev. We spread some logic into cmdlib and
deal for example with it's children recursively. This makes it hard to
annotate the disk parameters in a generic way as we don't always deal
with the top most disk. But the disk parameters are depending on the top...

887b52e8 05/10/2012 02:30 pm René Nussbaumer

cmdlib: Adding annotation helper for special cases

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

99ccf8b9 05/10/2012 02:30 pm René Nussbaumer

cmdlib: Remove all diskparams calculations not required anymore

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

62bfbc7d 05/10/2012 02:30 pm René Nussbaumer

cmdlib: Adapt the rpc calls

The following (blockdev) RPC calls are not converted yet (as they are
not straight forward or need more research):

  • bdev_sizes
  • blockdev_remove
  • blockdev_shutdown
  • blockdev_removechildren
  • blockdev_close
  • blockdev_getsize...
cd46491f 05/10/2012 02:30 pm René Nussbaumer

rpc: Adding helper to annotate disk params

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

e7f99087 04/26/2012 06:41 pm Iustin Pop

Add 'absolute' grow-disk mode at OpCode/LU level

This also improves the log messages for the (default) relative mode
("by %s to %s").

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

dff5f600 04/20/2012 07:11 pm Michael Hanselmann

Convert LUClusterConfigQuery to query2

The main intention of this patch is to make it possible to retrieve
cluster tags via query2. While at it I decided to convert
LUClusterConfigQuery right away. Some of the values returned by
LUClusterQuery are also included, but the conversion of LUClusterQuery...

cfdf561d 04/20/2012 07:11 pm Michael Hanselmann

Stop using locks in LUXI "QueryTags"

Also mark it as deprecated in NEWS as normal queries can be used
instead.

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

0fdf247d 04/19/2012 09:04 pm Michael Hanselmann

Convert listing exports to query2

This solves one case where locks are acquired during LUXI queries.
Pretty late into the transition I noticed that OpBackupQuery had a
“use_locking” parameter for a long time, but didn't use it. Since
most of the other changes were already and this allows exports to...

07923a3c 04/16/2012 07:30 pm Michael Hanselmann

Copy debug level, priority and set comment for LU-generated opcodes

Before this patch, a node evacuation submitted with high priority would
only compute the solution at that priority, but the actual evacuation
ran at normal priority.

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

5ad68a23 04/13/2012 04:19 pm Michael Hanselmann

Merge branch 'devel-2.5'

  • devel-2.5: (29 commits)
    gnt-* {add,list,remove}-tags: Unify options
    Bump version for 2.5.0 final release
    configure.ac: Fix “too many arguments” error
    Fix extra whitespace
    Further fixes concerning drbd port release
    Fix a bug concerning TCP port release...
ce445897 04/12/2012 08:52 pm Michael Hanselmann

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    Bump version for 2.5.0 final release
    configure.ac: Fix “too many arguments” error
    Fix extra whitespace
    Further fixes concerning drbd port release
    Fix a bug concerning TCP port release
    Fix extra whitespace...
6cd4e775 04/11/2012 09:26 pm Michael Hanselmann

Merge branch 'devel-2.4' into stable-2.5

  • devel-2.4:
    Fix extra whitespace
    Further fixes concerning drbd port release
    Fix a bug concerning TCP port release

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

612f7fd4 04/11/2012 09:25 pm Iustin Pop

Fix extra whitespace

Sorry, didn't catch this before…

Signed-off-by: Iustin Pop <>
Reviewed-by: René Nussbaumer <>
Reviewed-by: Iustin Pop <>
(cherry picked from commit 54b010cad1ea0a536ed037bf315a04dd1c079964)...

42f25b0b 04/11/2012 07:34 pm Dimitris Aragiorgis

Further fixes concerning drbd port release

Commit 3b3b1bc does not entirely fix the bug introduced in commit
f396ad8. It fixes consistency of config data in permanent storage, but
does not ensure consistency in data held in runtime memory of masterd.

The bug of duplicate ports is still triggered when LUInstanceRemove()...

2522b7c4 04/11/2012 07:14 pm Dimitris Aragiorgis

Fix a bug concerning TCP port release

Commit f396ad8 returns the TCP port used by DRBD disk back to the
TCP/UDP port pool using AddTcpUdpPort().

However, AddTcpUdpPort() writes the config on every invocation,
using _WriteConfig(). This causes two problems:...

54b010ca 03/30/2012 02:19 pm Iustin Pop

Fix extra whitespace

Sorry, didn't catch this before…

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

3b3b1bca 03/29/2012 06:28 pm Dimitris Aragiorgis

Fix a bug concerning TCP port release

Commit f396ad8 returns the TCP port used by DRBD disk back to the
TCP/UDP port pool using AddTcpUdpPort().

However, AddTcpUdpPort() writes the config on every invocation,
using _WriteConfig(). This causes two problems:...

1501cd6b 03/28/2012 07:05 pm Michael Hanselmann

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    LUOobCommand: acquire BGL in shared mode

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

6977943c 03/28/2012 05:12 pm Bernardo Dal Seno

LUOobCommand: acquire BGL in shared mode

Fixed a typo so that now LUOobCommand acquires the BLG in shared mode, as
intended.

Signed-off-by: Bernardo Dal Seno <>
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...

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

566db1f2 03/23/2012 03:58 pm Iustin Pop

Fix docstring bug

Fix a typo introduced in commit c85b15c1, which breaks epydoc.

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

744dd57c 03/23/2012 02:45 pm Guido Trotter

Merge branch 'stable-2.5' into devel-2.5

  • stable-2.5:
    LUNodeAdd: Verify version in Prereq
    Fix LV status parsing to accept newer LVM
    Bump version for 2.5.0~rc6 release
    Revert "Stop acquiring BGL for LUXI queries"
    LUClusterVerifyConfig: Share BGL, acquire all locks in shared mode...
2d453213 03/23/2012 01:27 pm René Nussbaumer

LUNodeAdd: Verify version in Prereq

There are other ways to leave the cluster in a broken state than just
the version check. However they are not very trivial to fix in 2.5. So
leave it up to 2.6 for a nicer fix.

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

e2ea8de1 03/23/2012 01:23 pm René Nussbaumer

LUNodeAdd: Verify version in Prereq

There are other ways to leave the cluster in a broken state than just
the version check. However they are not very trivial to fix in 2.5. So
leave it up to 2.6 for a nicer fix.

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

c85b15c1 03/22/2012 08:44 pm Michael Hanselmann

cmdlib: Factorize checking acquired node group locks

The “cur_group_uuid” parameter is optional to prepare for using the
factorized code from LUInstanceQueryData.

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

080fbeea 03/22/2012 08:44 pm Michael Hanselmann

gnt-instance info: Show node group information

This requires acquiring the node group locks in shared mode.

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

a20e4768 03/22/2012 04:29 pm Michael Hanselmann

cmdlib: Stop forking in LUClusterQuery

While debugging another issue we realized that LUClusterQuery forks.
This turned out to be the “platform.architecture” function from the
Python library. It uses the “file” command to determine the architecture
of the Python binary....

a5485ffc 03/22/2012 02:46 pm Michael Hanselmann

LUClusterVerifyConfig: Share BGL, acquire all locks in shared mode

Instead of acquiring the BGL in exclusive mode (which blocks all other
operations), we acquire all locks for groups, nodes and instances in
shared mode before verifying the configuration....

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

666e013f 03/19/2012 11:48 am Iustin Pop

Fix type error in LUInstanceChangeGroup

If a specific list of groups has been requested, then the code used
that, without transforming it to a (frozen)set first, which results
in:

unsupported operand type(s) for &: 'list' and 'frozenset'

Trivial fix is to do that in the 'then' branch....

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

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

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

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

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

2c2f257d 01/25/2012 08:23 pm Michael Hanselmann

Fix cluster verification issues on multi-group clusters

This patch attempts to fix a number of issues with “gnt-cluster verify”
in presence of multiple node groups and DRBD8 instances split over nodes
in more than one group.

- Look up instances in a group only by their primary node (otherwise...

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