Statistics
| Branch: | Tag: | Revision:

root / lib @ 75c866c2

# Date Author Comment
75c866c2 01/18/2011 01:47 pm Iustin Pop

Rename OpMigrateInstance and LUMigrateInstance

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

bd8210a7 01/18/2011 01:47 pm Iustin Pop

Rename OpVerifyDisks and LUVerifyDisks

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

fabf1731 01/18/2011 01:47 pm Iustin Pop

Rename OpAddGroup and LUAddGroup

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

934704ae 01/18/2011 01:47 pm Iustin Pop

Rename OpAssignGroupNodes and LUAssignGroupNodes

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

d4d654bd 01/18/2011 01:47 pm Iustin Pop

Rename OpQueryGroups and LUQueryGroups

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

4d1baa51 01/18/2011 01:47 pm Iustin Pop

Rename OpRemoveGroup and LURemoveGroup

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

a8173e82 01/18/2011 01:47 pm Iustin Pop

Rename OpRenameGroup and LURenameGroup

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

7cbf74f0 01/18/2011 01:47 pm Iustin Pop

Rename OpSetGroupParams and LUSetGroupParams

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

83f5d475 01/18/2011 01:47 pm Iustin Pop

Rename OpActivateInstanceDisks and LUActivateInstanceDisks

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

cc0dec7b 01/18/2011 01:47 pm Iustin Pop

Rename OpConnectConsole and LUConnectConsole

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

e1530b10 01/18/2011 01:47 pm Iustin Pop

Rename OpCreateInstance and LUCreateInstance

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

e176281f 01/18/2011 01:47 pm Iustin Pop

Rename OpDeactivateInstanceDisks and LUDeactivateInstanceDisks

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

019dbee1 01/18/2011 01:47 pm Iustin Pop

Rename OpFailoverInstance and LUFailoverInstance

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

60472d29 01/18/2011 01:47 pm Iustin Pop

Rename OpGrowDisk and LUGrowDisk

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

71910715 01/18/2011 01:47 pm Iustin Pop

Rename OpPrepareExport and LUPrepareExport

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

7ca2d4d8 01/18/2011 01:47 pm Iustin Pop

Rename OpQueryExports and LUQueryExports

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

ca5890ad 01/18/2011 01:47 pm Iustin Pop

Rename OpRemoveExport and LURemoveExport

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

2f093ea0 01/18/2011 01:47 pm Iustin Pop

Rename OpQueryConfigValues and LUQueryConfigValues

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

c6d43e9e 01/18/2011 01:47 pm Iustin Pop

Rename OpDestroyCluster and LUDestroyCluster

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

bc84ffa7 01/18/2011 01:47 pm Iustin Pop

Rename OpPostInitCluster and LUPostInitCluster

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

a2f7ab92 01/18/2011 01:47 pm Iustin Pop

Rename OpQueryClusterInfo and LUQueryClusterInfo

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

d1240007 01/18/2011 01:47 pm Iustin Pop

Rename OpRedistributeConfig and LURedistributeConfig

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

e126df25 01/18/2011 01:47 pm Iustin Pop

Rename OpRenameCluster and LURenameCluster

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

5d01aca3 01/18/2011 01:47 pm Iustin Pop

Rename OpRepairDiskSizes and LURepairDiskSizes

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

a6682fdc 01/18/2011 01:47 pm Iustin Pop

Rename OpSetClusterParams and LUSetClusterParams

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

a3d32770 01/18/2011 01:47 pm Iustin Pop

Rename OpVerifyCluster and LUVerifyCluster

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

a703bf43 01/18/2011 01:47 pm Iustin Pop

Fix the OP_ID of OpAssignGroupNodes

Commit 96276ae added the above opcode, but forgot to update the OP_ID
per our previous mailing list discussions. This patch makes the OP_ID
be consistent with the other IDs (OP_$object_$action).

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

4ff922a2 01/18/2011 01:47 pm Iustin Pop

Rename OpExportInstance and LUExportInstance

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

ff6082e4 01/18/2011 01:47 pm Iustin Pop

Fix bug introduced by f5677ab

Commit f5677ab added the _VerifyOob functionality, but there are two
issues with this function:

- a real bug, as objects.Node doesn't have a 'master' attribute
- a design bug, as we need to verify the OOB programs not only on...

cc7d6f1a 01/14/2011 02:42 pm Michael Hanselmann

Update RPC protocol version for Ganeti 2.4

As it's quite easy to forget updating the protocol version (and was
actually forgotten for Ganeti 2.3), it is now derived from the
configuration version (which is equivalent with the Ganeti version). The
protocol version for Ganeti 2.4 will be 2040000....

b32d6567 01/14/2011 11:36 am René Nussbaumer

Merge branch 'devel-2.3'

Conflicts:
doc/design-2.3.rst
This was a minor conflict with some rewording of a phrase

lib/client/gnt_instance.py
Removed _FormatParameterDict function as it was moved to cli.py in
master branch

Reviewed-by: Michael Hanselmann <>

8f8ce6d1 01/14/2011 11:27 am Michael Hanselmann

query: Update docstrings

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

6d33a6eb 01/13/2011 06:11 pm Iustin Pop

Fix growing of DRBD disks

Patch 03941a26 made disk growth VG-aware, but the code has a bug: it
only works for LD_LV disks, and not LD_DRBD. To fix it, we add a
generic function to compute the per-VG growth requirements, and switch
to using that instead of manual build....

b288b6f3 01/13/2011 02:09 pm René Nussbaumer

List node parameters in gnt-group list

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

8572f1fe 01/13/2011 02:08 pm René Nussbaumer

List node parameters (if any) in gnt-node info

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

88be69ee 01/13/2011 02:08 pm René Nussbaumer

List node parameters in gnt-cluster info output

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

b58a4d16 01/12/2011 07:54 pm Michael Hanselmann

Fix typos in RAPI docstrings, add unittest

This patch fixes a number of typos and standardizes RAPI resource
docstrings. A unittest is added.

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

acd19189 01/12/2011 05:59 pm René Nussbaumer

Move FormatParameterDict from gnt_instance.py to cli.py

This function is useful for other cli-tools who need to display
a dict based parameter field.

Signed-off-by: René Nussbaumer <>
Reviewed-by: Adeodato Simo <>

904b3bfe 01/12/2011 05:57 pm René Nussbaumer

gnt-group modify: ndparams not correctly updated

ndparams should delete keys which are reset to default

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

25be0c75 01/12/2011 02:10 pm Guido Trotter

Remove --master-netdev default value

Since the --master-netdev option is now used both at cluster init and at
cluster modify time, it cannot have a default value of DEFAULT_BRIDGE
(xen-br0) anymore. As such at cluster init we make the initialization
explicit if another value hasn't been passed. This fixes gnt-cluster...

7b0bf9cd 01/11/2011 07:33 pm Apollon Oikonomopoulos

Add ability to retain specified fds open in RunCmd

Passing tap devices to KVM as file descriptors requires that the respective
file decriptors remain open during utils.RunCmd execution. To this direction,
we add a “noclose_fds” keyword argument to utils.RunCmd, accepting a list of...

daa55b04 01/11/2011 05:39 pm Michael Hanselmann

objects: Fix off-by-one in error message

For an instance with a single disk the message should be “… disks 0 to
0”, not “… 0 to 1”.

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

63fc4229 01/11/2011 05:33 pm Michael Hanselmann

utils: Cleanup and sort wildcard imports

Also convert the per-line pylint instructions to one per-module
instruction.

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

79b60c1c 01/11/2011 05:33 pm Michael Hanselmann

utils: Drop RemovePidFile

It's equivalent to a simple RemoveFile now.

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

90e234a6 01/11/2011 05:33 pm Michael Hanselmann

utils: Move NewUUID to utils.io

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

7ebd876f 01/11/2011 05:33 pm Michael Hanselmann

utils: Move more text-related code

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

a4ccecf6 01/11/2011 05:33 pm Michael Hanselmann

utils: Move process-related code into separate file

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

44c9b4fe 01/11/2011 05:32 pm Michael Hanselmann

utils: Move ResetTempfileModule to wrappers module

It's not exactly a wrapper, but this seemed like the best place.

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

7d444d59 01/11/2011 05:32 pm Michael Hanselmann

utils: Move RunningTimeout to utils.algo

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

17b97ab3 01/11/2011 05:32 pm Michael Hanselmann

utils: Move code manipulating /etc/hosts to separate file

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

c50645c0 01/11/2011 04:25 pm Michael Hanselmann

utils: Move X509-related code into separate file

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

3865ca48 01/11/2011 04:25 pm Michael Hanselmann

utils: Move I/O-related code into separate file

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

9d1b963f 01/11/2011 04:25 pm Michael Hanselmann

utils: Move code related to file locking into separate file

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

7831fc5f 01/11/2011 04:25 pm Michael Hanselmann

utils: Move wrappers into separate file

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

7b4baeb1 01/11/2011 04:24 pm Michael Hanselmann

utils: Use function to disable fork

Use a function instead of a variable written by another module.

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

8342c325 01/11/2011 04:24 pm Michael Hanselmann

utils: Change RemovePidFile to take path, not name

This avoids having to monkey-patch the utils module for unittests.
Monkey patching is evil and caused a bug while moving code around.

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

0f39886a 01/11/2011 03:09 pm René Nussbaumer

Fix a typo in backend.py

Sorry I thought I did run commit-check but must not have paid attention
to its output. There was a typo in the docstring. This patch fixes this.

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

1d5f1b4c 01/11/2011 02:44 pm René Nussbaumer

Pause/Resume sync accordingly before wiping disk

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

9c007da8 01/11/2011 02:44 pm René Nussbaumer

Add RPC calls for pause/resume sync of devices

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

5119c79e 01/11/2011 02:44 pm René Nussbaumer

Add backend method for pause/resume sync of devices

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

a3fffcc6 01/11/2011 02:44 pm René Nussbaumer

Make it possible to pause/resume sync of mirrored dev

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

18009c1e 01/11/2011 12:39 pm Iustin Pop

Fix some doc issues introduced in recent commits

The hooks is due to me not checking the recent patch from David, and
the cli.py change is due to the utils.py split.

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

96276ae7 01/10/2011 06:32 pm Adeodato Simo

Add OpAssignGroupNodes and LUAssignGroupNodes

This operation allows to assign nodes to a group, verifying whether
the change would leave any mirrored instance split between different
node groups.

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

919852da 01/10/2011 06:32 pm Adeodato Simo

Add `gnt-group assign-nodes` in the CLI

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

3eff8ae6 01/10/2011 06:32 pm Adeodato Simo

Cluster verify warns if there are split instances

Emit a warning for each instance with a mirrored disk template that has
its primary and secondary nodes living in different node groups.

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

4245446f 01/10/2011 06:32 pm Adeodato Simo

Expose OpAssignGroupNodes over RAPI and RAPI client

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

1ae4c5a1 01/10/2011 06:16 pm Michael Hanselmann

utils: Move logging-related code into separate file

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

71ab9dbe 01/10/2011 06:16 pm Michael Hanselmann

utils: Rename _CloseFDNoErr to CloseFdNoError

This makes it a public function, which is necessary for
moving code into separate files.

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

f21bb4b7 01/10/2011 06:16 pm Michael Hanselmann

utils: Move hashing-related code into separate file

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

4d130f34 01/10/2011 06:16 pm Michael Hanselmann

utils: Remove unused variables

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

4fd029cf 01/10/2011 06:15 pm Michael Hanselmann

utils: Split algorithms into separate file

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

79d22269 01/10/2011 06:15 pm Michael Hanselmann

utils: Split Retry & co. into separate file

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

7fcffe27 01/10/2011 06:15 pm Michael Hanselmann

utils: Move text-related functions into separate file

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

36a4acd4 01/10/2011 06:15 pm Michael Hanselmann

utils: Move Mlockall into separate file

The unittest file is renamed to match the other utils.* tests.

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

c047a981 01/10/2011 06:15 pm Michael Hanselmann

utils: Move to separate module

This is preparing for splitting the whole units module.

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

a1a7bc78 01/10/2011 02:42 pm Iustin Pop

mcpu: Automatically build the DISPATCH_TABLE

While reviewing dato's interdiff for the OpAssignGroupNodes, I
realised that we can do better. This patch replaces the hand-built
DISPATCH_TABLE with one built from the opcode.OP_MAPPING dict.

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

687c10d9 01/10/2011 02:41 pm Iustin Pop

Generalize the OpCode-should-be-in-mcpu test

Currently, the unittest TestDispatchTable in mcpu unittest does a
hard-coded approach to test whether an opcode should be included or
not in the mcpu.Processor dispatch table. This is not flexible, so we
replace it with two changes:...

a1cef11c 01/10/2011 11:47 am Iustin Pop

IAllocator: fix breakage for non-vm_capable nodes

Currently, the IAllocator doesn't know that non-vm_capable nodes
should not be queried for hypervisor/instance information.

This patch updates the node data computation to generate basic info,
but not the runtime data for such nodes. Furthermore, the...

b577dac4 01/07/2011 05:47 pm Michael Hanselmann

gnt-instance info: Show disk template

The data was already there, but not shown.

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

55cc0a44 01/07/2011 05:34 pm Michael Hanselmann

Use new console information in hypervisor abstraction

This makes use of the new way of returning console information from the
master daemon. Unittests are included.

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

25ce3ec4 01/07/2011 05:34 pm Michael Hanselmann

Introduce verbose opcode result for console

With this patch OpConnectConsole will no longer just return a command
with arguments, but rather a detailed description about how to connect
to an instance's console. Unittests for some parts are included. Another...

2a917701 01/07/2011 01:02 pm Michael Hanselmann

luxi.Client: Add function to close connection

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

047686c5 01/07/2011 12:27 pm Michael Hanselmann

Merge branch 'devel-2.3'

  • devel-2.3:
    Remove unused import from client.gnt_instance
    gnt-instance console: Improve error reporting
    Increase timeout for connection on remote import
    import-export: Improve timeout error reporting

Conflicts:
lib/cmdlib.py: Trivial...

ab92578a 01/07/2011 12:01 pm Michael Hanselmann

Remove unused import from client.gnt_instance

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Adeodato Simo <>

678aa6d3 01/06/2011 06:52 pm Michael Hanselmann

gnt-instance console: Improve error reporting

If the SSH command fails, this will give a more detailed error
message than before.

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

eaf7d41d 01/06/2011 06:42 pm Michael Hanselmann

Increase timeout for connection on remote import

The source cluster has to shut down an instance before it can be
exported. Doing so can take a while, but the default connection timeout
is only 60 seconds. Adding the shutdown timeout on the receiving cluster...

016acd85 01/06/2011 05:19 pm René Nussbaumer

List recorded powered state in gnt-node info

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

52b5d286 01/06/2011 05:19 pm René Nussbaumer

Support query of node field 'powered'

This field is based on OOB support and is only available if there's oob
support for that node.

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

ca4ac9c9 01/06/2011 03:02 pm Adeodato Simo

Convert “gnt-group list” to query2

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

31a5d995 01/06/2011 03:02 pm Adeodato Simo

cmdlib.py: convert LUQueryGroups to query2

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

a0d64991 01/06/2011 03:01 pm Adeodato Simo

cmdlib.py: move _GetQueryImplementation to end of file

_GetQueryImplementation() uses _QUERY_IMPL, which list all query type
implementations. By moving it to the end of the file, we ensure all such
classes are defined by the time we list them.

Signed-off-by: Adeodato Simo <>...

8e21cfc0 01/06/2011 03:01 pm Adeodato Simo

query.py: add definitions for node group queries

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

e070c663 01/06/2011 03:01 pm Adeodato Simo

constants.py: define QR_GROUP resource

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

e571ee44 01/06/2011 03:01 pm Adeodato Simo

ganeti.query_unittest.py: test lock fields too

Additionally, change TestQueryFields.testSomeFields() to handle lists of
fields shorter than 20 elements.

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

d2cd6944 01/06/2011 12:33 pm Iustin Pop

RPC: mark jobqueue functions as URGENT

Recently, we've seen more and more cases of a specific breakage
pattern in Ganeti: master candidates which are semi-alive (as in, they
respond to ping, they can complete a TCP/SSL handshake, but otherwise
the root filesystem is broken) cause lots of confusion within masterd....

24d16f76 01/06/2011 12:08 pm Michael Hanselmann

Convert “gnt-debug locks” to query2

Locks can now be queried using “Query(what="lock", …)” over LUXI.

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

f7c8f153 01/05/2011 07:28 pm Michael Hanselmann

Fix OpSetInstanceParams.disk_template check

When moving the opcode parameters I moved two or three checks from an
opcode's CheckArguments function to the type checks. This was one of
them and unfortunately I didn't notice the parameter can be None.

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

e23881ed 01/05/2011 06:14 pm Michael Hanselmann

RAPI: Add resource to grow instance disk

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

b714765a 01/05/2011 05:57 pm Adeodato Simo

Reword "one of hmgt" as "one of h/m/g/t" for clarity

Signed-off-by: Adeodato Simo <>
Reviewed-by: Iustin Pop <>

f5677ab3 01/05/2011 02:41 pm René Nussbaumer

out of band verification in gnt-cluster verify

This adds the verify tests for out of band management

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