Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ e2b4a7ba

History | View | Annotate | Download (533.7 kB)

# Date Author Comment
8580cdaf 09/18/2012 06:09 pm Michael Hanselmann

Migrate lib/cmdlib.py from constants to pathutils

File system paths moved from constants to pathutils.

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

b5f0b5cc 09/14/2012 05:30 pm Bernardo Dal Seno

Always_failover doesn't require --allow-failover anymore

If an administrator sets always_failover, it means that there is no need
for another explicit approval to failover instead of migrating.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Michael Hanselmann <>

cb83e4db 09/14/2012 12:22 am Bernardo Dal Seno

Remove useless lock in recreate-disks

The old primary node was being locked to do RPC, but we don't lock nodes
for RPC anymore, so the lock is useless.

Signed-off-by: Bernardo Dal Seno <>
Reviewed-by: Guido Trotter <>

776b6291 09/12/2012 04:14 pm René Nussbaumer

Rework the required_nodes field

This was used to verify the result of instance allocation. However, this
is not logic which belongs to the cmdlib rather than to the iallocator
request itself. So abstract it by its own function. And update the
ValidateResult accordingly....

3c049cd3 09/12/2012 12:27 pm René Nussbaumer

Adapt gnt-debug iallocator

Add the new multi-alloc request to the test allocation framework. For
now we just create --count identical instances. This might need further
improvements later.

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

2bbf280e 09/12/2012 12:27 pm René Nussbaumer

Switch all iallocator calls to the new one

After the refactor, the old calls are not working anymore, so we switch
to the new ones.

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

0fcd0cad 09/12/2012 12:27 pm René Nussbaumer

Refactor IAllocator code

The IAllocator class was handling all the requests on its own, passing
in parameters on top level which works, but is hard to maintain and not
flexible.

With the upcoming change to the IAllocator for MultiAllocate we can't
use the toplevel parameters anymore. Therefore, we refactor the code...

b112bfc4 09/12/2012 12:27 pm René Nussbaumer

Move _MakeLegacyNodeInfo to rpc

This function will also be needed for the iallocator refactor. Also this
function does not belong to cmdlib but rather to rpc. Lets move it
there.

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

0c77c331 09/12/2012 12:27 pm René Nussbaumer

Move _CalculateGroupIPolicy and _ComputeDiskSize

This makes it possible to better untangle the IAllocator code, which
would otherwise lead to a recursive import structure as we need those
helpers there as well.

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

107102af 09/08/2012 12:19 am Iustin Pop

Merge branch 'devel-2.6' into submit

  • devel-2.6:
    Fix bug in non-mirrored instance allocation
    Fix gnt-debug iallocator

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

99c7795a 09/08/2012 12:13 am Iustin Pop

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    Fix bug in non-mirrored instance allocation
    Fix gnt-debug iallocator

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

09123222 09/04/2012 02:22 pm René Nussbaumer

Fix gnt-debug iallocator

There was an issue with the recent ipolicy introduction which lead to a
bug in gnt-debug iallocator. It was not providing the spindle_use field
and therefore it wont let you create a valid iallocator request.

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

6f1da8b3 09/04/2012 01:56 pm Iustin Pop

Merge branch 'devel-2.6'

  • devel-2.6:
    Fix warnings/errors with newer pylint
    Fix decorator uses which crash newer pylint

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

fa0003dc 09/04/2012 01:56 pm Iustin Pop

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    Fix warnings/errors with newer pylint
    Fix decorator uses which crash newer pylint

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

8ad0da1e 09/03/2012 07:09 pm Iustin Pop

Fix warnings/errors with newer pylint

To help developing Ganeti on newer distributions, let's try to fix
pylint warnings/errors. I'm using pylint from current Debian wheezy:
pylint 0.25.1, astng 0.23.1, common 0.58.0, and we have 3 things that
needs fixing....

951accad 08/27/2012 05:18 pm Iustin Pop

Merge branch 'devel-2.6'

  • devel-2.6:
    Make stable-2.6 compatible with newer pep8
    Fix computation of disk sizes in _ComputeDiskSize
    Add verification of RPC results in _WipeDisks
    Add test for checking that all gnt-* subcommands run OK
    Fix double use of PRIORITY_OPT in gnt-node migrate...
b5df6331 08/27/2012 05:15 pm Iustin Pop

Merge branch 'stable-2.6' into devel-2.6

  • stable-2.6:
    Make stable-2.6 compatible with newer pep8
    Fix computation of disk sizes in _ComputeDiskSize
    Add verification of RPC results in _WipeDisks
    Add test for checking that all gnt-* subcommands run OK...
5ae4945a 08/23/2012 02:41 pm Iustin Pop

Bump pep8 version to 1.2

Debian Wheezy will ship with this version, and it has many improved checks compared to 0.6, so let's:

- bump version in the docs
- silence some new checks that are wrong due to our indent=2 instead of 4
- fix lots of errors in the code where the indentation was wrong by 1...

6a3166cb 08/22/2012 03:18 pm Constantinos Venetsanopoulos

Fix computation of disk sizes in _ComputeDiskSize

Currently, hail fails with FailDisk when trying to add an instance
of type: 'file', 'sharedfile' and 'rbd'.

This is due to a "0" or None value in the corresponding dict inside
_ComputeDiskSize, which results in a "O" or non Int value of the...

f08e5132 08/15/2012 12:59 pm Iustin Pop

Add verification of RPC results in _WipeDisks

Due to an oversight, the pause/resume sync RPC calls in _WipeDisks
lack the verification of the overall RPC status, and directly iterate
over the payload. The code actually doing the wipe does verify
correctly the results. This can result in jobs failing with a hard to...

1b9690aa 08/08/2012 12:57 pm Guido Trotter

Handle offline nodes for "instance down" checks

When offlining an instance because its primary node is down, we must be
able to cope with the situation.

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

2cfbc784 08/02/2012 03:46 pm Iustin Pop

Fix uses of OpPrereqError without code info

A while back, we did cleanup the code and ensured (manually) that use
of OpPrereqError includes an errors.ECODE_* field as second
argument. Since we cannot automate the check for this, it turns out
that more and more such usage has crept over the years, including in...

350506c6 07/26/2012 06:38 pm Iustin Pop

Fix issue in LUClusterVerifyGroup with multi-group clusters

In case LUClusterVerifyGroup is run on a group which doesn't contain
the master node, the following could happen:

- master node is selected due to the explicit check
- if the order of nodes in the 'absent_nodes' list is such that the...

4bf27dab 07/26/2012 06:33 pm Iustin Pop

Fix node group modification of node parameters

Commit 904b3bfe tried to fix the deletion of custom ndparams from
group, but instead broke both modification and deletion: because we
run ForceDictType on self.op.ndparams instead of the updated
new_ndparams, we can neither delete nor set properly spindle_count...

3d091af0 07/25/2012 09:38 pm Bernardo Dal Seno

Allocator support in recreate-disks LU

This affects only the backend.

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

01eb03bd 07/25/2012 09:37 pm Adam Ingrassia

Added method to call an allocator for recreate-disks

Ideally this should have used relocation mode, but to due lacking of
support in current allocators, allocation mode has been used instead.

Signed-off-by: Adam Ingrassia <>
Signed-off-by: Bernardo Dal Seno <>...

bb0d8ddc 07/25/2012 02:24 pm Adam Ingrassia

Support for checking the group of only the primary node

_CheckInstanceNodeGroups behaves in the old way with the default value
of the new parameter.

Signed-off-by: Adam Ingrassia <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

7803e37c 07/19/2012 03:51 pm Iustin Pop

Merge branch 'stable-2.6'

  • stable-2.6: (21 commits)
    Release Ganeti 2.6.0 rc4
    Prepare NEWS for Ganeti 2.6.0rc4
    Add some rudimentary node group ipolicy checks
    Fix setting ipolicy on node groups
    Fix --no-headers for the new list-drbd command
    Add a simple QA test for gnt-node list-drbd...
8b057218 07/19/2012 03:15 pm René Nussbaumer

Fix setting ipolicy on node groups

On node groups we don't have the std field. However, the InstancePolicy
object always verifies that the std value is within a given range. As we
fill it up with defaults if not set (as it happens to be on node groups)
and the min value is higher than the default std value (taken from...

112aee5f 07/13/2012 06:00 pm Iustin Pop

Merge branch 'stable-2.6'

  • stable-2.6: (72 commits)
    Make Ganeti 2.6.0 rc3 release
    Allow reinstall even when secondaries are offline
    Prepare NEWS file for Ganeti 2.6.0 rc3
    QA updated to test instance removing when sec. is offline
    Ignore offline node errors when removing disks...
96c3d5d4 07/13/2012 02:41 pm René Nussbaumer

Allow reinstall even when secondaries are offline

Signed-off-by: René Nussbaumer <>
Reviewed-by: Agata Murawska <>

03e5cdd5 07/11/2012 03:21 pm Agata Murawska

Ignore offline node errors when removing disks

When we delete DRBD disks from some instance, we do not want to get
errors due to nodes other than that instance's primary being offline.

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

d908ba61 07/07/2012 11:16 am Iustin Pop

Allow instance disc activation with offline secondaries

Currently, this is not allowed, so one can't run a replace-disks; this
breaks any non-invasive method of recovering the redundancy of the
instance if its disks are already stopped (but it still works if the...

b69437c5 07/05/2012 07:11 pm Iustin Pop

9Add wait_for_sync flag to OpInstanceActivateDisks

This can be used to ensure that after activate-disks has returned, the
instance's storage is consistent; currently there's no programmatic
way to do this.

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

cad0723b 07/05/2012 03:20 pm Iustin Pop

Fix DRBD resize code

There are two bugs in the current resize code, affecting mostly DRBD.

First, due to bugs in old DRBD versions (pre 8.0.14), the code currently
calls `drbdsetup resize' on both the primary or secondary. However,
this is actually wrong per current DRBD (from drbdsetup(8)):...

cc706abc 07/05/2012 11:41 am Iustin Pop

Fix redistribution of files w.r.t. offline nodes

Currently, _RedistributeAncillaryFiles computes two lists: the list of
online nodes (for all files redistribution), and the list of
vm_capable nodes, for hypervisor-specific files. However, the
vm_capable list includes offline nodes too, leading to warning...

770461fe 07/05/2012 11:35 am René Nussbaumer

Fix cluster verify error on master-ip-setup script

This error does not show up until we exceed the pool of master
candidates and have nodes which are not master candidates.

The background is that we check for master-ip-setup script on master
candidates and expect them not to be on the other nodes. However, we...

55de1d68 06/27/2012 11:03 am René Nussbaumer

Annotate disks upon blockdev_shutdown

Signed-off-by: René Nussbaumer <>
Reviewed-by: Agata Murawska <>

4504bfcb 06/27/2012 11:03 am René Nussbaumer

Annotate disks on blockdev_remove

This annotates the disks for the blockdev_remove where it is
appropriate. It leaves out 2 cases were we can't reliably annotate disk
parameters due to lack of knowledge what we should annotate. Those cases
affects only lvs used for drbd, so it doesn't affect the bug reported by...

b5cbddd9 06/27/2012 11:02 am René Nussbaumer

Annotate disk params on blockdev_getmirrorstatus_multi

This is also related to the bug reported by Constantinos,
as we've only one getmirrorstatus_multi call in whole cmdlib, we just
annotate them while we are building the disk list.

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

70817cee 06/27/2012 11:02 am René Nussbaumer

Annotate disk parameters on blockdev_getmirrorstatus

Not annotating them works for DRBD but not for RBD as reported by
Constantinos.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Agata Murawska <>

80b898f9 06/20/2012 11:03 am Iustin Pop

Fix bug in instance net changes

_PrepareNicModification returns the invalid type, which triggers an
assert resulting in a mysterious error:

Failure: command execution error:

Without any explanation. We fix this by removing the return value from
_PrepareNicModification, and instead returning the expected type...

79829d23 06/19/2012 03:09 pm Guido Trotter

Allow single-homed <-> multi-homed transitions

To change the cluster from single homed to multi homed or vice versa one
must target the master node first, and pass the --force option. All
other nodes then will work as long as they are reachable by the master....

e4a4391d 06/15/2012 04:48 pm René Nussbaumer

Verify the options on diskparameters

This prevents from setting for example drbd options on the plain disk
template.

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

d8960502 06/14/2012 01:04 pm Iustin Pop

Fix creation of plain instances with --no-wait-for-sync

As reported on the devel mailing list by Christos Stavrakakis,
creation of plain instances is broken when the --no-wait-for-sync flag
is passed, because in that case WaitForSync is not called, hence...

b59092f7 06/08/2012 05:33 pm Iustin Pop

Improve error message for auto-promote/node modify

This has been reported internally 3-4 times already, and the current
version (from 8b437a6e) is still not good enough, it seems.

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

e375fb61 06/01/2012 06:12 pm Iustin Pop

Fix a type issue and bad logic in cluster verification

Commit 2e04d454 introduced the new offline state for the instance
state, but being a big monolithic patch it sneaked in something that
doesn't make sense.

The checks for extra instances (either wrongly up or just unknown) are...

cd415612 05/22/2012 11:25 am René Nussbaumer

Make it possible to reset vcpu/spindle ratio to default

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

ff39194f 05/22/2012 11:17 am Iustin Pop

Add man page documentation for cpu_mask hv parameter

This is adapted from the design doc.

Also fixes a typo in cmdlib.py.

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

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

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

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

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

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

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

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

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