Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ 413b7472

History | View | Annotate | Download (310.5 kB)

# Date Author Comment
94a1b377 02/08/2010 01:35 pm Michael Hanselmann

TLReplaceDisks: Delay iallocator when evacuating node

When evacuating nodes, the iallocator was run for all
instances without taking planned changes into consideration.
This patch delays part of CheckPrereq and running the
iallocator for node evacuation....

4a0e011f 02/03/2010 07:04 pm Iustin Pop

Implement debug level across OS-related RPC calls

This doesn't implement the full functionality, we need to add the debug
level to the opcodes too, but at least won't require changing the RPC
calls during the 2.1 series.

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

dd9e9f9c 02/03/2010 03:55 pm Michael Hanselmann

Second try to fix LUVerifyCluster

My previous patch, commit 785d142, fixed the case where a node is marked
offline. With this patch it'll also handle other failures correctly.

  • Hooks Results
    - ERROR: node node2.example.com: Communication failure in hooks...
785d142e 02/03/2010 03:01 pm Michael Hanselmann

LUVerifyCluster: Fix bug with offline nodes

[…] * Other Notes
- NOTICE: 1 offline node(s) found. * Hooks Results
Failure: command execution error:
iteration over non-sequence

Commit a0c9776a introduced an error simulation mode to LUVerifyCluster.
Due to a small mistake, offline nodes weren't skipped when checking the...

cea0534a 01/28/2010 04:46 pm Guido Trotter

Fix flipping MC flag bug

Currently unofflining or undraining an already functional master
candidate node, can cause it to demote itself. In order to avoid that we
only trigger the self-promotion check if the node is not currently a
candidate.

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

82187135 01/11/2010 02:25 pm René Nussbaumer

Normalize MAC addresses to all lower.

This change will normalize the MAC to all lower after validation.

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

47a72f18 01/05/2010 02:39 pm Iustin Pop

LURenameCluster: run post hook on all nodes

Since the cluster name might be used for various purposes on nodes, we
should let all nodes "know" about a cluster rename by running the post
hook on all nodes. This will make cluster rename slightly
slower/costlier, but it is not/shouldn't be an operation that is run...

2d54e29c 01/04/2010 11:17 am Iustin Pop

Further pylint disables, mostly for Unused args

Many of our functions have to follow a given API, and thus we have to
keep a given signature, but pylint doesn't understand this. Therefore,
we silence this warning.

The patch does a few other cleanups.

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

857121ad 01/04/2010 11:16 am Iustin Pop

LUDiagnoseOS._DiagnoseByOS: remove unused arg

The node_list argument to _DiagnoseByOS is not used, and is obsoleted by
the fact that the rlist argument already has the valid nodes as keys
(assuming RPC behaviour didn't change). Thus, we remove it and silence...

7e950d31 01/04/2010 11:16 am Iustin Pop

Convert to static methods (where appropriate)

Many methods are simple pure functions, and not depending on the object
state. We convert these to staticmethods.

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

7260cfbe 01/04/2010 11:15 am Iustin Pop

Add targeted pylint disables

This patch should have only:

- pylint disables
- docstring changes
- whitespace changes

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

d1b83918 01/04/2010 11:10 am Iustin Pop

Fix an error message

Detected by an 'Unused variable' warning.

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

1122eb25 01/04/2010 11:10 am Iustin Pop

Remove many 'Unused variable' warnings

Note there are some cases left which need extra cleanup.

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

d984846d 12/28/2009 02:05 pm Iustin Pop

Merge branch 'devel-2.0' into devel-2.1

  • devel-2.0:
    Fix indentation in hv_kvm
    Implement BuildHooksEnv for NoHooksLU
    Clarifiy some more wide pylint disables
    Fix two bugs in seldom-used codepaths
    Update pylintrc
    Add targetted pylint disables
    Partial cherry-pick of 6c881c5 from the 2.1 branch...
fe267188 12/28/2009 12:43 pm Iustin Pop

Add targetted pylint disables

This patch adds targeted pylint disables, where it makes sense (either
due to limitations in pylint or due to historical usage), and also a few
blanket ones in rapi where all the names are… “different”.

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

4c4b5058 12/28/2009 12:43 pm Iustin Pop

Fix two bugs in seldom-used codepaths

New version of pylint, new bugs found!

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

c70d2d9b 12/28/2009 12:43 pm Iustin Pop

Clarifiy some more wide pylint disables

This removes/updates some module-wide pylint disables.

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

fc8a6b8f 12/28/2009 12:43 pm Iustin Pop

Implement BuildHooksEnv for NoHooksLU

This just adds a stub function that raises an assertion error; this
accomplishes two things:

- silences many pylint warnings
- if we ever stumble upon this, a specific assertion error is
(hopefully) clearer than just a not implemented error...

fa05c92d 12/16/2009 04:10 pm Iustin Pop

Merge branch 'stable-2.1' into devel-2.1

  • stable-2.1:
    Bump version to 2.1.0~rc2
    Update NEWS file and release Ganeti 2.0.5
    Security issue: add validation of script names
    Move the hooks file mask into constants.py
    Improve LUQueryNodes for lockless case...
5c0433d6 12/16/2009 04:06 pm Iustin Pop

Merge branch 'stable-2.0' into stable-2.1

  • stable-2.0:
    Update NEWS file and release Ganeti 2.0.5
    Security issue: add validation of script names
    Move the hooks file mask into constants.py
    Improve LUQueryNodes for lockless case
    Ship rapi.rst/rapi.html in the dist archive...
18c8f361 12/16/2009 11:54 am Iustin Pop

CreateInstance: allow no ip check with start mode

Since gnt-instance start doesn't do any checks on the IP, it doesn't
make much sense to do so in instance create (with start) if the user
expressly passes in ‘--no-ip-check’. Removing this requirement eases the...

5f23e043 12/16/2009 11:54 am Iustin Pop

Op/LUCreateInstance support for (no) name checks

This adds a new opcode parameter ‘name_check’ (similar to ip_check) that
is not required to be present (to easy backwards compatibility for
tools).

It also adds a CheckArguments to LUCreateInstance and changes the...

4dfd6266 12/14/2009 05:34 pm Iustin Pop

Improve LUQueryNodes for lockless case

In most uses of LUQueryNodes, we don't take a lock. This means that the
instance data is not protected across GetInstanceList and
GetInstanceInfo, and this can lead to instances not existing anymore.

Switching to GetAllInstanceInfo means that we get a single,...

313b2dd4 11/30/2009 04:34 pm Michael Hanselmann

gnt-cluster verify: Warn if node time diverges too far

The warning will be generated if the clocks diverge by more
than 150 seconds. Due to the way the RPC system works, we
cannot get exact time differences, e.g. if one of the
queried nodes is broken. The comparision is done using a...

5bc556dd 11/26/2009 05:29 pm Michael Hanselmann

cmdlib: Work around race condition in DRBD before version 8.0.13

DRBD goes into sync mode for a short amount of time after
executing the "resize" command. DRBD 8.x below version
8.0.13 contains a bug whereby calling "resize" in sync
mode fails.

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

1f864b60 11/25/2009 04:30 pm Iustin Pop

Remove quotes from CommaJoin and convert to it

This patch removes the quotes from CommaJoin and converts most of the
callers (that I could find) to it. Since CommaJoin does str(i) for i in
param, we can remove these, thus simplifying slightly a few calls....

ab3e6da8 11/25/2009 01:45 pm Iustin Pop

Revert "Get rid of utils.CommaJoin"

This reverts commit 6915bc28fe053e92aa16cf2d974d205f1140219c based on thread on
ganeti-devel.

Conflicts:

lib/cmdlib.py (due to the error code classification, trivial)

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

b6c07b79 11/20/2009 01:43 pm Michael Hanselmann

Remove unused parameter “unlock” from cmdlib._WaitForSync

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

21bcb9aa 11/16/2009 06:52 pm Michael Hanselmann

Fix off-by-one error when modifying instance NIC

For an instance with exactly one NIC:

$ gnt-instance modify --net 1:ip=1.2.3.4 inst1
Failure: prerequisites not met for this operation:
error type: wrong_input, error details:
Invalid NIC index 1, valid values are 0 to 1...

b8716596 11/16/2009 03:58 pm Michael Hanselmann

Re-add check for duplicate instance IP

This was originally implemented in 0ce8f948 and partially
rolled back in 9b65e0d4. Apart from re-adding the check,
this patch does some housekeeping by renaming the “_helper”
function to “_AddIpAddress”.

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

90b704a1 11/13/2009 02:07 pm Guido Trotter

Fix change of cluster nic parameters

To stay on the safe side, we check for errors in all instances, and
refuse to act, reporting on the errors we found, if there are any
problems.

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

beabf067 11/12/2009 07:29 pm Guido Trotter

Fix mispopulation of nic parameters at nic modify

There's a bug in Ganeti 2.1 rc0 that makes nic parameters be populated
from the "filled in" dict, even if we're not changing any values in
them. This patch fixes the problem, by populating them from the correct...

4fae38c5 11/06/2009 05:36 pm Guido Trotter

ConfigWriter: move _temporary_ids to reservation

In order to do this we need to pass a job id when reserving a resource.
We have one during _EnsureUUIDs because we passed it in from AddNode and
AddInstance. During config upgrade we use a fake job ID which we then...

36b66e6e 11/06/2009 05:36 pm Guido Trotter

ConfigWriter: move _temporary_macs to reservation

This solves the race conditions in mac reservation, as macs are actually
reserved, under the current ec id.

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

afa1386e 11/06/2009 05:36 pm Guido Trotter

ConfigWriter: simplify GenerateDRBDSecret

We can do this by adding a new TemporaryReservationManager

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

0debfb35 11/06/2009 04:08 pm Guido Trotter

config.Add{Node,Instance}: get the ec id

This is ok because adding a node or instance cannot happen in a query.

We get the ec id from the LU and pass it to _EnsureUUID, which will
then for now not use it.

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

7736a5f2 11/06/2009 01:42 pm Iustin Pop

Introduce 'global hypervisor parameters' support

This patch adds support for global hypervisor parameters in instance
creation, instance modification, instance query and at instance load
time.

We basically prevent any query on these parameters, discard them at load...

78212a5d 11/04/2009 05:35 pm Iustin Pop

TLMigrateInstance: add error messagess during Exec

Currently the migration of an instance doesn't show any error until the
end. We add two messages that show better the progress:

node1# gnt-instance migrate -f instance5
Wed Nov 4 04:04:34 2009 Migrating instance instance5...

104f4ca1 11/04/2009 01:54 pm Iustin Pop

Introduce a wrapper for hostname resolving

Currently a few of the LU's CheckPrereq use utils.HostInfo which raises
a resolver error in case of failure. This is an exception from the
standard that CheckPrereq should raise an OpPrereqError if the error is
in the 'pre' phase (so that it can be retried)....

099c52ad 11/03/2009 04:31 pm Iustin Pop

Another round of pylint-related style fixes

A newer version of pylint, more warnings…

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

d091393e 11/03/2009 01:45 pm Iustin Pop

Implement cluster verify checks for wrong PV names

Since ':' is not a valid character in PV names (for the way Ganeti uses
LVM), we need to check this and warn the user. This patch adds a new
NV_PVLIST cluster verify check and verifies the PV names returned from...

6bcb1446 11/03/2009 12:51 pm Michael Hanselmann

jqueue: Convert to utils.Retry

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

7e9c6a78 11/02/2009 04:14 pm Iustin Pop

Some improvements to gnt-node repair-storage

Currently the repair storage has two issues:

- down instances are aborting the operation, even though they should be
ignored (it's not technically possible to know their disk status
unless we would activate their disks)...

045dd6d9 11/02/2009 04:14 pm Iustin Pop

Add ecode to rpc.py's RpcResult.Raise()

This patch adds a new ecode argument to RpcResult.Raise(). This allows
specifying the error code (for both OpExec and OpPrereq errors).

Note that this patch also makes the OpExecError exceptions raised from
_FindFaultInstanceDisks have the error code classification....

5c983ee5 11/02/2009 04:14 pm Iustin Pop

Introduce two-argument style for OpPrereqError

This patch introduces a two-argument style for OpPrereqError. Only the
direct raise calls in cmdlib.py are converted, other users will follow.

cli.py is modified to handle both two-argument style and the current...

159d4ec6 11/02/2009 04:06 pm Iustin Pop

Remove the OpRetryError exception

This is only used in two places, in an error path that is no longer
valid since Ganeti 2.0. We remove the try..except since we should not
get it anymore (and if we do, then we should catch it in all
config.Update cases) and we remove the exception class completely....

3e53a60b 11/02/2009 02:07 pm Michael Hanselmann

Activate disks while exporting an instance

Exporting an instance not running or without activated disks
will fail. This patch makes sure to activate disks before
exporting an instance if it's in the ADMIN_down state.

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

620a85fd 11/02/2009 10:22 am Iustin Pop

Unify the query fields for the storage framework

This patch unifies the query fields in the storage framework for all
types. Note that the information is still computed on-demand, so if e.g.
the used disk space is not requested for the ‘file’ type, it won't be...

1df79ce6 10/29/2009 06:06 pm Michael Hanselmann

Don't show warnings on ADMIN_down instance failover

Before:
$ gnt-instance failover -f inst1
… checking disk consistency between source and target
… - WARNING: Can't find disk on node node21.example.com
… shutting down instance on source node

After:
$ gnt-instance failover -f inst1...

c6f1af07 10/28/2009 03:49 am Iustin Pop

Fix another style issue

For the Nth time, re-fix shadowing of outer-scope variable :)

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

20eca47d 10/28/2009 03:22 am Iustin Pop

Fix an error handling case in TLReplaceDisks

pylint is your friend, since the compiler doesn't exist.

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

a4eae71f 10/27/2009 03:14 pm Michael Hanselmann

Provide feedback from redistributing configuration

This is particularily useful for “gnt-cluster redist-conf”, but
also for all other cases where the configuration files are
rewritten on other nodes.

$ gnt-cluster redist-conf
… Copy of file /var/lib/ganeti/config.data to node … failed: Error while...

e9022531 10/27/2009 02:54 am Iustin Pop

Fix gnt-node evacuate w. iallocator

Commit 2bb5c911 moved around and changed the _RunAllocator function in
the DiskReplace → TaskLet conversion, but in the process it changed the
relocate_from argument from a list of nodes to just the secondary node.
This breaks the protocol and current iallocator scripts....

d52ea991 10/23/2009 12:01 pm Michael Hanselmann

cmdlib._AssembleInstanceDisks: Fix case where variable wouldn't be set

The “result” variable may not be set and/or come from the previous loop.

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

b989b9d9 10/22/2009 04:40 pm Ken Wehr

Adding '--no-ssh-init' option to 'gnt-cluster init'.

Allows the initialization of a cluster without the creation or distribution
of SSH key pairs. Includes changes for LeaveCluster and RPC.

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

7c0aa8e9 10/20/2009 06:53 am Iustin Pop

Introduce checks for /sys and /proc

This patch adds checks for /proc and /sys in cluster verify, since
Ganeti relies on these special filesystems to be mounted.

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

17c3f802 10/13/2009 01:24 pm Guido Trotter

Add timeout options to other LUs

All the LUs that shut down the instance need to be able too pass the
timeout parameter as well.

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

5aab242c 10/12/2009 01:46 pm Michael Hanselmann

locking.LockSet: Implement acquire timeouts

The timeout passed to LockSet.acquire() is measured over all lock acquires. If
LockSet.acquire fails to acquire all requested locks within the specified
amount of time, all locks are released again and the acquire fails....

6263189c 10/09/2009 06:28 pm Guido Trotter

Accept shutdown timeout from the user

Using the new --timeout option:

- gnt-instance shutdown is changed to accept a timeout
- the opcode is changed to hold one
- the LU is changed to optionally get one
- the rpc is changed to carry one
- the backend is changed to take it as a parameter rather than...

6915bc28 10/09/2009 05:28 pm Guido Trotter

Get rid of utils.CommaJoin

- We never remember to use it (5 uses vs 21 " ,".join())
- It's longer to write than " ,".join()
- The added value of the apostrophe in the string is not very much

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

f2c05717 10/05/2009 12:47 pm Guido Trotter

Check the OS name for variants

If an OS supports variants, unless --force-variant is specified a valid
variant must be passed.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

ba00557a 10/05/2009 12:39 pm Guido Trotter

Add per-node variants list to OS diagnose output

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

1e288a26 10/05/2009 12:39 pm Guido Trotter

Add "variants" field to LUDiagnoseOS

If selected this field will contain a list of os variants supported on
all nodes.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

3d9eb52b 10/02/2009 11:59 am Guido Trotter

LUSetNodeParams: autopromote self when needed

If we're de-offlining or de-draining a node we need to promote it to MC
if we have not enough, or the config will be corrupt.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

6d7e1f20 10/02/2009 11:58 am Guido Trotter

Abstract self-promotion decision

During node add we decide whether to self promote to an MC. Abstract
this decision making to a separate function.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

44485f49 10/02/2009 11:58 am Guido Trotter

Fix master candidate removal

Currently during a master candidate removal, when it's possible to
promote another node, the removal operation fails because of a corrupt
config before it's even possible to do the promotion. Fixing this by
doing the promotion before, excluding the current node....

8fbf5ac7 10/02/2009 11:58 am Guido Trotter

LUSetNodeParams: Don't break config on mc demotion.

If --force is used to demote an MC, but then there are not enough MCs in
the cluster, the configuration gets corrupted until a node is promoted.

In order to avoid that we only allow demotion with --force if the node...

e623dbe3 10/01/2009 08:37 pm Guido Trotter

Master candidate stats, return one more value

Other than returning the current number of candidates, and the number of
desired and possible candidates, we also return the maximum possible
number, even if greater than our desires. All callers for now ignore...

c8872a0b 09/30/2009 03:59 pm Iustin Pop

Merge remote branch 'origin/master' into mogu

  • origin/master:
    Fix burnin's verbose mode
    Final NEWS update and version increase for 2.0.4
    Encode the actual exception raised by LU execution
    Move the luxi error handling into errors.py
    Fix the confusing ssh/hostname message in node add...
31821208 09/25/2009 06:54 pm Iustin Pop

Fix the confusing ssh/hostname message in node add

Before, it used to say:

ssh/hostname verification failed node1.example.com -> hostname mismatch, got
node2

Now it says for wrong hostnames (maybe too verbose):

ssh/hostname verification failed (checking from node1.example.com): hostname...
59b76636 09/25/2009 03:22 pm Iustin Pop

Merge commit 'origin/next'

  • commit 'origin/next': (74 commits)
    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...
259578eb 09/24/2009 02:38 pm Iustin Pop

Export and show the cluster uuid in cluster info

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

033d58b0 09/24/2009 02:37 pm Iustin Pop

Implement uuid in gnt-node/instance list and info

The patch modifies LUQueryInstanceData to return the uuid too and also
adds support for it in the gnt-* scripts.

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

19bed813 09/24/2009 02:37 pm Iustin Pop

Simplify handling of regular fields in LUQuery*

For fields that correspond directly to an object's field, we can
simplify the handling. The patch also adds the new 'uuid' fields to
objects so that it can be queried.

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

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