Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ 34e54ebc

History | View | Annotate | Download (289.9 kB)

# Date Author Comment
dfc2a24c 09/21/2009 05:31 pm Guido Trotter

Fix _RemoveDisk for file based instances

During 621b7678 two typos were introduced which prevent file based
instances removal to work correctly. Fixing both of them to what they
were meant to be.

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

9b4127eb 09/21/2009 01:28 pm Guido Trotter

cmdlib._CreateDisks fix a broken result.Raise

The format string has the ": %s" at the end, but no argument is passed,
which of course raises a TypeError. Removing ": %s" as it's added by
the RpcResult Raise() method anyway.

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

3cebe102 09/17/2009 06:53 pm Michael Hanselmann

Remove RpcResult.RemoteFailMsg completely

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

a0c9776a 09/17/2009 05:37 pm Iustin Pop

Add an error-simulation mode to cluster verify

One of the issues we have in ganeti is that it's very hard to test the
error-handling paths; QA and burnin only test the OK code-path, since
it's hard to simulate errors.

LUVerifyCluster is special amongst the LUs in the fact that a) it has a...

7c874ee1 09/17/2009 05:12 pm Iustin Pop

Introduce parseable error codes in LUVerifyCluster

Currently the output of cluster verify can be parsed for 'ERROR'
messages, but that is the only indication we get (error or no error). In
order to allow monitoring tools to separate different error conditions,...

edb4b374 09/16/2009 07:13 pm Michael Hanselmann

Remove RpcResult.failed attribute

It's redundant with RpcResult.fail_msg. This change survived QA, burnin and
unittests.

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

f60759f7 09/14/2009 03:20 pm Iustin Pop

Replace last hardcoded 'nodelist' with NV_NODELIST

LUAddNode has this usage remaining, as it's the only other LU to use
call_node_verify (beside LUVerifyCluster).

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

fe89794e 09/14/2009 02:17 pm Michael Hanselmann

RpcResult: Fix cases where “failed” wouldn't be set to True

This broke “gnt-instance replace-disks --auto” when the instance
is down.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

4d5fe81b 09/14/2009 01:31 pm Michael Hanselmann

Merge commit 'origin/next' into branch-2.1

  • commit 'origin/next':
    Fix gnt-node modify online help
    Fix gnt-job info entry in gnt-job(8)
    locking: Don't swallow exceptions
    Add check for duplicate MACs in instance add
    scripts/gnt-node: fix a help string...
4d4a651d 09/11/2009 05:33 pm Michael Hanselmann

Wrap lines over 80 characters

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

aa053071 09/11/2009 05:33 pm Michael Hanselmann

cmdlib: Fix typo in variable name

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

87e43988 09/08/2009 06:22 pm Iustin Pop

Add check for duplicate MACs in instance add

Currently LUAddInstance doesn't check for duplicate MACs, and it fails
during the Exec() phase when trying to add the instance to the config
(ConfigWriter checks for this). This patch copies the code from
LUModifyInstance (which already does it)....

13998ef2 09/03/2009 06:43 pm Michael Hanselmann

Use ReadFile/WriteFile in more places

This survived QA, burnin and unittests.

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Luca Bigliardi <>

a4913296 08/31/2009 04:57 pm Michael Hanselmann

Merge commit 'origin/next' into branch-2.1

  • commit 'origin/next':
    Return cluster tags from LUQueryClusterInfo

Conflicts:
lib/cmdlib.py: Trivial

c118d1f4 08/31/2009 01:32 pm Michael Hanselmann

Return cluster tags from LUQueryClusterInfo

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Olivier Tharan <>

5c566e17 08/28/2009 06:35 pm Michael Hanselmann

Merge branch 'next' into branch-2.1

  • next:
    Add script to clean archived jobs after 21 days
    rapi: export more static node information
    Pass the correct signal to handlers
    cli: Use ToStdout/ToStderr instead of print
    Fix small typo in gnt-node
    Simplify handling of boolean args in rapi...
05e50653 08/26/2009 07:09 pm Michael Hanselmann

Add file to pause watcher for a certain duration

This can be used during maintenance work.

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

37972df0 08/26/2009 03:14 pm Michael Hanselmann

cmdlib: Add some messages to LUExportInstance

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

b2c750a4 08/25/2009 06:51 pm Luca Bigliardi

LUDestroyCluster: hooks support

We're going to call hooks from its Exec method so LUDestroyCluster has to
support them.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Michael Hanselmann <>

3141ad3b 08/25/2009 06:51 pm Luca Bigliardi

LUDestroyCluster: run hooks

Run post hooks on master node before it's removed.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

3cb5c1e3 08/25/2009 05:40 pm Luca Bigliardi

LURemoveNode: no logs running post on removed node

Do not log results from hooks ran on the removed node as now it's done by
RunPhase.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

cd46f3b4 08/25/2009 02:40 pm Luca Bigliardi

node-remove post on removed node

Run post phase of node-remove on the removed node as well.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

46af447b 08/24/2009 06:06 pm Iustin Pop

Fix error output in LUSetClusterParams

Before:
gnt-cluster modify --enabled-hypervisors=xen-hvm,xem-pvm
Failure: command execution error:
Enabled hypervisors contains invalid entries: set([u'xem-pvm'])

After:
gnt-cluster modify --enabled-hypervisors=xen-hvm,xem-pvm...

313bcead 08/24/2009 03:13 pm Iustin Pop

Add OPMoveInstance and LUMoveInstance

This patch adds a basic version of LUMoveInstance. It doesn't yet
support iallocator-mode and it's implemented in old-style (non-TL) mode.

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

621b7678 08/24/2009 03:13 pm Iustin Pop

Add arbitrary node support to create/remove disks

Currently the cmdlib _CreateDisks and _RemoveDisks always work on the
instance's (current/primary) nodes. This patch extends them to take an
additional target_node parameter denoting that the creation/removal...

4dce1a83 08/24/2009 02:39 pm Michael Hanselmann

cmdlib: Fix broken QueryInstanceData for plain instances

Fixes this bug:
Failure: command execution error:
Can't compute disk status for instX.domain.tld: No error information

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

90f72445 08/17/2009 05:46 pm Iustin Pop

Add support for querying the ctime/mtime

This patch adds querying of ctime/mtime for the cluster/nodes/instances.

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

76aef8fc 08/17/2009 02:26 pm Michael Hanselmann

Add opcode to repair storage volumes

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

e9721add 08/17/2009 02:26 pm Michael Hanselmann

cmdlib: Add function to list all instances on node

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

5ba9701d 08/17/2009 02:26 pm Michael Hanselmann

cmdlib: Use common function to list instances on node

This will be used by another new function, too.

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

2d9005d8 08/17/2009 02:26 pm Michael Hanselmann

cmdlib: Make TLReplaceDisks._FindFaultyDisks global

It'll be used for repairing storage units.

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

bd315bfa 08/14/2009 04:00 pm Iustin Pop

Implement instance recreate-disks

This can be used for a 'plain' type instance when the underlying storage
went away, to recreate the storage (and reinstall) instead of removing
the instance and readding it.

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

97c61d46 08/14/2009 12:26 pm Iustin Pop

Fix checks in LUSetNodeParms for the master node

There was a check already in the LU for the master node, however is
wasn't correct. This patch disallows any role changes on the master node
via LUSetNodeParms (and as this LU can't change anything else, it...

2945fd2d 08/13/2009 02:49 pm Michael Hanselmann

TLReplaceDisks: Refuse changing secondary for specific disks

We move all disks anyway.

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

b142ef15 08/13/2009 02:41 pm Iustin Pop

Merge commit 'origin/next' into branch-2.1

  • commit 'origin/next': (28 commits)
    Fix a typo in InitCluster
    Ignore results from drained nodes in iallocator
    Ship the ethers hook
    Ethers hook, compatibility with old lockfile
    Remove a few unused imports from noded/masterd...
942be002 08/13/2009 12:53 pm Michael Hanselmann

cmdlib: Add new automatic disk replacement mode

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

02a00186 08/13/2009 12:53 pm Michael Hanselmann

TLReplaceDisks: Simplify argument checking logic

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

0d853843 08/12/2009 04:58 pm Iustin Pop

Ignore results from drained nodes in iallocator

Since drained nodes could be (partially or fully) broken in iallocator,
we ignore results from these nodes when building the cluster map in
preparation for sending it to the script.

This is a cheap change for the stable branch; ideally we should not...

b5f5fae9 08/10/2009 03:23 pm Luca Bigliardi

Post cluster initialization LU

Add an 'empty' logical unit to run hooks after cluster initialization.

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Iustin Pop <>

aafb303d 08/10/2009 01:41 pm Guido Trotter

Add cluster-init --no-etc-hosts parameter

If --no-etc-hosts is passed in at cluster init time we set a new
parameter in the cluster's object to false, and avoid adding nodes to
the hosts file. The UpgradeConfig function is used to set the value to
True, when upgrading from an old configuration version....

8486ffc0 08/07/2009 02:22 pm Guido Trotter

Merge branch 'master' into next

  • master:
    Update NEWS and version for 2.0.3 release
    devel/upload: revert rsync -p
    export: add meaningful exit code
    Fix detecting of errors in export
    Implement gnt-cluster check-disk-sizes
    rpc: add rpc call for getting disk size...
f208978a 08/06/2009 07:13 pm Michael Hanselmann

Convert ldisk_degraded to tri-state value

This allows us to report “uncertain” states (LDS_UNKNOWN) for cases
where the code can't easily detect or report what's wrong with a
block device.

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

ddfe2228 08/06/2009 07:13 pm Michael Hanselmann

Handle None result from BlockdevFind

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

98825740 08/06/2009 07:13 pm Michael Hanselmann

objects.BlockDevStatus: Remove ToLegacyStatus

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

084f05a5 08/05/2009 02:19 pm Iustin Pop

export: add meaningful exit code

Currently ‘gnt-backup export’ always returns exit code zero, even in the
face of complete failure during backup (only failure to stop/start the
instance will cause job failure and thus non-zero exit code). This is
bad, since one cannot script the backup....

36145b12 08/05/2009 12:13 pm Michael Hanselmann

Use objects for blockdev_getmirrorstatus RPC call result

This patch changes the return type for backend.BlockdevGetmirrorstatus from
a list of tuples to a list of objects.BlockDevStatus instances.

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

96acbc09 08/05/2009 12:12 pm Michael Hanselmann

Use object for blockdev_find RPC call result

This patch changes the return type for backend.BlockdevFind to an object
(objects.BlockDevStatus). Before a tuple was used. Adding more values to
this tuple causes a lot of work. Converting the result to an object with...

60975797 08/04/2009 05:36 pm Iustin Pop

Implement gnt-cluster check-disk-sizes

This patch adds a new opcode and lu for checking disk sizes. Currently
it does only top-level disk verification, and also doesn't check
primary/secondary node size mismatches (these two are added as TODOs in
the Exec() function of the LU)....

b4ec07f8 08/04/2009 05:35 pm Iustin Pop

Implement --ignore-size in activate-disks

This patch modified OpActivateDisks, LUActivateDisks and gnt-instance
activate-disks to support and pass this option to
_AssembleInstanceDisks.

The patch is quite trivial I think; there should be no issues from it...

e3443b36 08/04/2009 05:35 pm Iustin Pop

Add ignore size support in _AssembleInstanceDisks

This patch adds an optional parameter to _AssembleInstanceDisks that
allows ignoring of size information by making a copy of the disk
structure and setting the size to zero.

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

a4d138b7 08/04/2009 02:46 pm Michael Hanselmann

cmdlib: Fix parameters for storage.FileStorage

It wants a list of directories, not a string.

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

efb8da02 08/04/2009 12:44 pm Michael Hanselmann

cmdlib: Add opcode to modify storage unit fields

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

9e5442ce 08/03/2009 04:42 pm Michael Hanselmann

Add new opcode to list physical volumes

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

abae1b2b 08/03/2009 12:12 pm Michael Hanselmann

cmdlib: Change tasklet logging to debug level

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

80cb875c 07/31/2009 02:30 pm Michael Hanselmann

cmdlib: Add new opcode to migrate node

It migrates all primary instances from the node to their secondaries.

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

b4a9eb66 07/30/2009 07:36 pm Michael Hanselmann

cmdlib: Add logging for tasklets

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

3a012b41 07/30/2009 07:36 pm Michael Hanselmann

cmdlib: Fix tasklets handling if no tasklets are added

If no tasklets are added, self.tasklets evaluates to None. The LU base
class will throw an exception because it thinks the derived class doesn't
implement the right methods.

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

2503680f 07/29/2009 11:59 am Guido Trotter

Extend call_node_start_master rpc with no_voting

When the parameter is set to True and start_daemons is also True,
ganeti-masterd will be started with the new --no-voting --yes-do-it
options.

This new option is set to True only on masterfailover, when no_voting is...

464243a7 07/23/2009 04:19 pm Michael Hanselmann

cmdlib: Add init to Tasklet class

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

3e06e001 07/22/2009 08:52 pm Michael Hanselmann

cmdlib: Move LUMigrateInstance functionality to tasklet

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

7ffc5a86 07/22/2009 08:52 pm Michael Hanselmann

Add new opcode to evacuate nodes

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

c68174b6 07/22/2009 08:52 pm Michael Hanselmann

cmdlib: Convert _DiskReplacer to tasklet

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

692738fc 07/22/2009 08:32 pm Michael Hanselmann

cmdlib: Function to get all secondary instances on a certain node

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

6fd35c4d 07/22/2009 04:58 pm Michael Hanselmann

cmdlib: Add tasklet support to logical unit base class

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

9a6800e1 07/22/2009 04:58 pm Michael Hanselmann

cmdlib: Add tasklet base class

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

4a34c5cf 07/20/2009 07:58 pm Guido Trotter

Generate a shared HMAC key at cluster init time

This key is shared on all nodes (via cmdlib._RedistributeAncillaryFiles)
and will be used for HMAC authentication of confd messages.

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

2bb5c911 07/20/2009 06:38 pm Michael Hanselmann

cmdlib: Move code doing disk replacements into separate class

This class will be used for a new opcode to evacuate nodes.

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

923ddac0 07/20/2009 02:58 pm Michael Hanselmann

cmdlib: Pass config and rpc objects directly to IAllocator

Before IAllocator would access them using “self.lu.cfg” and “self.lu.rpc”.
It shouldn't know about the internals of the LU.

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

b2aa5035 07/17/2009 04:30 pm Iustin Pop

Merge branch 'next' into branch-2.1

  • next:
    Optimizie OpCode loading
    Yet another fallout from the pylint fixes
b0c63e2b 07/17/2009 03:42 pm Iustin Pop

Yet another fallout from the pylint fixes

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

539210af 07/17/2009 02:41 pm Guido Trotter

Merge branch 'next' into branch-2.1

  • next:
    Fix another issue with hypervisor_name change
    Update NEWS and version for 2.0.2 release
    Improve the description of node flags in man page
    Add enabled hypervisors to TestConfigRunner
    Add a few more checks to verify config...
3df6e710 07/17/2009 02:37 pm Iustin Pop

Fix another issue with hypervisor_name change

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

b119bccb 07/16/2009 04:40 pm Guido Trotter

Make sure enabled_hypervisors list is valid

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

066f465d 07/16/2009 04:34 pm Guido Trotter

Get rid of the default_hypervisor slot

Currently we have both a default_hypervisor and an enabled_hypervisors
list. The former is only settable at cluster init time, while the latter
can be changed with cluster modify.

This becomes cumbersome in a few ways: at cluster init time for example...

c772d142 07/16/2009 02:21 pm Michael Hanselmann

cmdlib: Use dict.fromkeys instead of custom loop

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

d393737d 07/14/2009 06:18 pm Guido Trotter

Merge branch 'next' into branch-2.1

  • next:
    Remove SimpleConfigWriter.SetMasterNode
    _GenerateDiskTemplate: use base_index in the name
    ganeti-masterd: avoid SimpleConfigReader
    cmdlib: Fix typo in LUQueryClusterInfo

Conflicts:

daemons/ganeti-masterd...
fb4b324b 07/14/2009 06:07 pm Guido Trotter

_GenerateDiskTemplate: use base_index in the name

Currently if a disk is added later the base_index is not considered, and
all the disks are called disk0. This patch fixes it.

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

b8810fec 07/13/2009 05:01 pm Michael Hanselmann

cmdlib: Fix typo in LUQueryClusterInfo

This was broken by my pylint fixes patch.

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

3583908a 07/08/2009 12:49 pm Guido Trotter

Extend call_node_start_master rpc with no_voting

When the parameter is set to True and start_daemons is also True,
ganeti-masterd will be started with the new --no-voting --yes-do-it
options.

This new option is set to True only on masterfailover, when no_voting is...

2f7140ba 07/08/2009 12:28 pm Guido Trotter

Merge branch 'next' into branch-2.1

  • next:
    Create a new --no-voting option for masterfailover
    ganeti-masterd: allow non-interactive --no-voting
    Fix pylint warnings
    Add custom pylintrc
    bootstrap: Don't leak file descriptor when generating SSL certificate...
7c4d6c7b 07/07/2009 03:54 pm Michael Hanselmann

Fix pylint warnings

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

5bbd3f7f 07/07/2009 03:51 pm Michael Hanselmann

Fix some typos

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

dec0d9da 06/30/2009 07:33 pm Iustin Pop

Cleanup config data when draining nodes

Currently, when draining nodes we reset their master candidate flag, but
we don't instruct them to demote themselves. This leads to “ERROR: file
'/var/lib/ganeti/config.data' should not exist on non master candidates...

a8ae3eb5 06/30/2009 07:33 pm Iustin Pop

Fix node readd issues

This patch fixes a few node readd issues.

Currently, the node readd consists of two opcodes:
- OpSetNodeParms, which resets the offline/drained flags
- OpAddNode (with readd=True), which reconfigures the node

The problem is that between these two, the configuration is inconsistent...

e631cb25 06/30/2009 12:01 pm Iustin Pop

Fix error message for extra files on non MC nodes

Currently the message for extraneous files on non master candidates is
confusing, to say the least. This makes it hopefully more clear.

Signed-off-by: Iustin Pop <>
Reviewed-by: Olivier Tharan <>

cc208ed0 06/29/2009 05:41 pm Guido Trotter

Merge branch 'master' into branch-2.1

  • master:
    Fix adjustement of candidates in cluster modify
    Add a new node list field
    Fix HTTP server library handling of credentials
    Fix a typo in backend.InstanceReboot docstring
    Fix handling of 'vcpus' in instance list...
b2a6ccd4 06/29/2009 05:33 pm Iustin Pop

Rename the volume_list RPC call to lv_list

There are volume-related rpc calls. This patch renames the ‘volume_list’
call to ‘lv_list’ to make more clear its purpose.

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

8b46606c 06/29/2009 05:26 pm Guido Trotter

check_ident_key_val, handle no_ and - prefixes

If an ident member of an IdentKeyVal relationship starts with no_ or -,
handle it the same way we do for a key. Some unittests are added to
check that check_ident_key_val behaves as expected.

This patch also changes ForceDictType to, for now, fail on such an...

d1a7d66f 06/29/2009 04:12 pm Guido Trotter

Introduce OS api version 15

Also, since Ganeti 2.1 will be compatible with both 10 and 15, change
the OS_API_VERSION constant to be an OS_API_VERSIONS set, and update the
places in the code that used that constat to use something else.

In particular:
- in the qa for now we just create a fake version 10 OS...

75e914fb 06/29/2009 04:01 pm Iustin Pop

Fix adjustement of candidates in cluster modify

The code for adjusting the candidate pool size was done after the config
update, and this means we triggered the save of the config file without
fixing the candidate pool, which aborts with an error.

The patch just moves it above. The old comment was valid, but we anyway...

c120ff34 06/29/2009 01:43 pm Iustin Pop

Add a new node list field

This patch adds a ‘role’ node list field, which shows a one-character
node status. This is a simpler way to see the node status than selecting
all the flags individually.

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

08896026 06/19/2009 04:24 pm Iustin Pop

LUCreateInstance: the node list as return value

Currently LUCreateInstance has no result; this patch changes it so that
both the normal result and the dry-run result is the node list of the
selected instance.

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

20777413 06/19/2009 04:24 pm Iustin Pop

LU execution: implement dry-run framework

This patch adds a new (global) opcode flag 'dry_run' which, when True,
causes early exit from the LU workflow, returning a special value from
the LU object (initialized in the parent LogicalUnit class, and which if...

f2fd87d7 06/19/2009 02:14 pm Iustin Pop

Fix some small epydoc warnings

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

29921401 06/18/2009 01:49 pm Iustin Pop

Fix various pylint warnings

There were multiple issues:
- copy-paste resulted in wrong indentation
- wrong function name
- missing spaces around assignment
- overriding built-in names (type, dir) or already defines ones
(errors, hypervisor)

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

c1ce76bb 06/17/2009 06:21 pm Iustin Pop

Fix handling of 'vcpus' in instance list

Currently running “gnt-instance list -o+vcpus” fails with a cryptic message:
Unhandled Ganeti error: vcpus

This is due to multiple issues:
- in some corner cases cmdlib.py raises an errors.ParameterError but
this is not handled by cli.py...

5e3d3eb3 06/17/2009 04:21 pm Guido Trotter

Update a forgot docstring for nic parameters

Properly document the expected nic format.

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

0b13832c 06/17/2009 04:21 pm Guido Trotter

Fix QueryInstanceData for nic parameters

This CL updates QueryInstanceData to return NICs in the new format (mac,
ip, mode, link) and fixes gnt-instance info to properly display them.

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

638c6349 06/17/2009 04:21 pm Guido Trotter

Update instance query for NIC parameters

Compatibility with the old parameters is maintained, by allowing to
query for "bridge" "nic.bridges" and "nic.bridge/N", but None is
returned in that case for routed nics.

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

f9b10246 06/17/2009 04:21 pm Guido Trotter

Rename _PreBuildNICHooksList to _NICListToTuple

We're going to use this helper function for more than just hooks, so
we'll give it a more generic name.

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