Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ 20601361

History | View | Annotate | Download (341.1 kB)

# Date Author Comment
95f84636 05/11/2010 11:48 am Iustin Pop

Fix tiny typo in cluster verify

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

58385fad 05/03/2010 06:27 pm Iustin Pop

verify cluster: check /etc/hosts consistency

If we are told to modify /etc/hosts, then verify its consistency during
cluster verify.

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

7672a621 05/03/2010 06:27 pm Iustin Pop

Cleanup /etc/hosts during node removal

It seems that commit d8470559 dropped the cleanup of /etc/hosts when a
node is removed from the cluster. I don't know for sure, but it seems
accidental. As long as we add it to /etc/hosts, we should clean it up
too....

e311ed53 04/22/2010 05:55 pm Michael Hanselmann

Factorize LUExportInstance

Apart from moving parts of the code to separate functions, error handling
is also improved by making sure snapshots are always removed.

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

96d1a0c5 04/21/2010 08:22 pm Iustin Pop

LUSetClusterParams: initialize needed parameters

… since the opcode doesn't auto-initialize to None.

Signed-off-by: Iustin Pop <>
Reviewed-by: Balazs Lecz <>

9f3ac970 04/20/2010 12:25 pm Iustin Pop

Fix changing the list of enabled hypervisors

When enabling a new hypervisor, we must ensure that we have its
parameters in the cluster (global) hvparams dictionary.

Furthermore, we add a verify check for this case (this should be better
replaced with an auto-fix?)....

1513e2dd 04/16/2010 05:13 pm Iustin Pop

Readd node: allow changed primary IP

The primary IP is not used for DRBD disks, only for the job queue and
internal commands. As such, it's trivial (with a quiet job queue) to
re-ip the node.

The patch just relaxes the checks in LUAddNode, and manual testing shows...

fdad8c4d 04/16/2010 04:10 pm Balazs Lecz

Add --add-uids/--remove-uids to gnt-cluster modify

Signed-off-by: Balazs Lecz <>
Reviewed-by: Guido Trotter <>

1338f2b4 04/16/2010 04:10 pm Balazs Lecz

Add --uid-pool option to gnt-cluster modify

Signed-off-by: Balazs Lecz <>
Reviewed-by: Guido Trotter <>

0e3baaf3 04/15/2010 05:37 pm Iustin Pop

Fix cluster behaviour with disabled file storage

There are a few issues with disabled file storage:
- cluster initialization is broken by default, as it uses the 'no'
setting which is not a valid path
- some other parts of the code require the file storage dir to be a...

e588764d 04/12/2010 04:57 pm Iustin Pop

Add a identify-defaults options for import

When importing an instance, all the saved valued will be used as
explicitly specified values, overriding the cluster defaults. This means
export+import will change the status (from default to explicitly
specified) of parameters....

b6cd72b2 04/12/2010 04:57 pm Iustin Pop

Fix create/import verification of hvparams

Currently the instance creation checks the cluster hv defaults + the new
parameters for validity, ignoring the os-specific hvparams (this was an
oversight during the implementation of the os hvp). This patch uses the...

0af0f641 04/12/2010 04:57 pm Iustin Pop

Reuse NIC information from export

If the user doesn't pass any nics in import, do not use a default
one-nic, but instead read the nics from the export file as is.

Fortunately the export and the way nics are read from the command line
are compatible…

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

cc0d88e9 04/12/2010 04:57 pm Iustin Pop

Reuse backend parameters from export

Similar to the previous patches, if we're missing some parameters and
the export has them (either in the new style or old-style), we reuse
them.

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

9b12ed0f 04/12/2010 04:57 pm Iustin Pop

Reuse disk information from export

If the user doesn't pass the disk information on import, automatically
reuse the number and size of disks. This loses the iv_name attribute,
but that is only cosmetic and cannot be changed by the user.

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

9f88b0e8 04/12/2010 04:56 pm Iustin Pop

Reuse hypervisor parameters in import

If available, we reuse the parameters from the export info.

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

f276c4b5 04/12/2010 04:56 pm Iustin Pop

Read disk template from export info

This patch changes the instance import to read the disk template
automatically from the export info, if the opcode doesn't already
specify a disk template.

To do this, we have a couple of additional changes:

- change from required parameter to optional one for disk_template...

c1c31426 04/12/2010 04:56 pm Iustin Pop

CreateInstance: separate the reading of the export

We move the reading of the export to a separate function, to simplify
CheckPrepreq and also read it earlier. This will allow building the
missing opcode parameters from the export information, instead of...

22f50b1d 04/12/2010 04:56 pm Iustin Pop

Move code from ExpandNames to CheckPrereq

This is needed since only in CheckPrereq we have the nodes locked, and
future import enhancements will need to have access to the export info
during the parameter build.

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

417eabe2 04/12/2010 04:56 pm Iustin Pop

CreateInstance: Move some code to CheckArguments

ExpandNames holds too much non-locking code (first LU to be converted to
ExpandNames, and we didn't have CheckArguments at that poin), and this
patch moves the checks that are lock-independent to CheckArguments....

2a518543 04/12/2010 04:56 pm Iustin Pop

Handle errors better for wrong nic_count in export

This fixes an old 'FIXME' entry.

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

3953242f 04/08/2010 06:50 pm Iustin Pop

Add a new cluster parameter maintain_node_health

This will be used to conditionally enable the watcher node maintenance
feature.

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

2c42c5df 03/23/2010 01:04 pm Guido Trotter

Allow file storage to be grown

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

728489a3 03/23/2010 11:31 am Guido Trotter

Fix burnin error when trying to grow a file volume

Abstract the growable disk types in a ganeti constants, and only run
disk grow, from burnin, on them.

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

02c521e4 03/23/2010 10:35 am Iustin Pop

A rewrite of LUClusterVerify

Per issue 90, current cluster verify is very very brittle. It's one of
the oldest pieces of code, with only additions without cleanups over the
last years.

Among its problems:

- data initialization interspersed with verification of RPC results,...

3a488770 03/23/2010 10:35 am Iustin Pop

Some epydoc fixes

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

25a8792c 03/17/2010 04:11 pm Iustin Pop

Instance creation: implement --no-install mode

This is a simple patch that adds the no-install mode for instance
creation, allowing import from foreign source of the actual OS (instead
of requiring the preparation of data in a form expected by the import...

96b39bcc 03/17/2010 04:10 pm Iustin Pop

Allow OS changes without reinstallation

This patch modifies LUSetInstanceParms to allow OS name changes, without
reinstallation, in case an OS gets renamed on-disk.

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

231cd901 03/17/2010 04:10 pm Iustin Pop

cmdlib: Abstract OS checks

This patch moves the node-has-os checks to a separate function.

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

8fe9239e 03/16/2010 03:29 pm Iustin Pop

Fix behaviour of gnt-node modify -C no

The current check on whether we require auto_promote or not is wrong, as
we check whether we will have exactly the correct number of master
candidates left. But it is fine if we have more (e.g. when CPS=10 and
mc_remaning=19) than the current number, and in that case we shouldn't...

6b7d5878 03/15/2010 06:40 pm Michael Hanselmann

Rightname confd's HMAC key

Currently, the ganeti-confd's HMAC key is called “cluster HMAC key” or
simply “HMAC key” everywhere. With the implementation of inter-cluster
instance moves, another HMAC key will be introduced for signing critical
data. They can not be the same, so this patch clarifies the purpose of the...

2f414c48 03/15/2010 05:38 pm Iustin Pop

Implement conversion from drbd to plain

This is much simpler than the opposite, with fewer possibilities of
failures.

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

e29e9550 03/15/2010 05:38 pm Iustin Pop

Implement conversion from plain to drbd

This patch adds a new mode to instance modify, the changing of the disk
template. For now only plain to drbd conversion is supported, and the
new secondary node must be specified manually (no iallocator support).

The procedure for conversion works as follows:...

31624382 03/15/2010 05:29 pm Iustin Pop

Abstract check that an instance is down

Multiple LUs require that an instance is not running while they operate
on the instance (reinstall, rename, modify, recreate disks, deactivate
disks). The code to do this check is duplicate many times, and not very...

701384a9 03/15/2010 05:29 pm Iustin Pop

Abstract node free disk space check

Both create instance and grow disk check the free disk space on nodes
using the same, duplicate code. Since we'll need this in other places in
the future, we abstract the check into a new function.

The patch adjusts the error message to be more in-line with the one for...

5d55819e 03/15/2010 05:28 pm Iustin Pop

Abstract disk template verification

This is a simple check, but we'll need it in multiple places.

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

c3589cf8 03/15/2010 05:17 pm Iustin Pop

LUCreateInstance: implement disk adoption mode

This new mode, valid only for the plain template disk, allows creation
of an instance based on existing logical volumes (preserving data),
rather than creation of new volumes and OS creation.

The new mode works as follows:...

df4272e5 03/15/2010 05:16 pm Iustin Pop

LUCreateInstance: Move parameter init earlier

This way, the parameters are available in CheckArguments too.

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

b98bf262 03/12/2010 05:44 pm Michael Hanselmann

Verify cluster certificates in LUVerifyCluster

When using pyOpenSSL 0.7 or above, LUClusterVerify will start to show a
warning 30 days before a certificate expires. 7 days before the
certificate expires, the warning becomes an error. Once expired,
LUVerifyCluster will always report an error. The latter is also supported...

d3100055 03/12/2010 05:44 pm Michael Hanselmann

Add constant with cluster X509 certificates

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

3ab991a4 03/12/2010 03:32 pm Iustin Pop

Merge branch 'stable-2.1' into devel-2.1

  • stable-2.1:
    Release version 2.1.1
    Update NEWS file for the 2.1.1 release
    Validate the os-specific hypervisor parameters

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

0cf5e7f5 03/12/2010 11:33 am Iustin Pop

Improve cluster verify with hypervisor errors

In case the hypervisor has issues on one node, currently
backend.VerifyNode will exit via an exception (two exit paths possible,
one via HypervisorError from hypervisor.Verify(), and one via RPCFail
from GetInstanceList). This is bad as it invalidates all other checks of...

92c1b5d6 03/11/2010 05:07 pm Iustin Pop

Fix cluster verify with simulate-errors

In simulate errors mode, the test "ntime_diff is not None" will be
ignored, and thus a None value will try to be formatted as %.01f. We
workaround this by formatting it before, and then only using %s, which
can format a 'None' value....

cced4c39 03/11/2010 11:03 am Iustin Pop

Validate the os-specific hypervisor parameters

This adds a validation similar to the one for cluster-wide hypervisor
paramters.

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

601908d0 03/09/2010 06:07 pm Iustin Pop

Rework the node modify for mc-demotion

The current code in LUSetNodeParms regarding the demotion from master
candidate role is complicated and duplicates the code in ConfigWriter,
where such decisions should be made. Furthermore, we still cannot demote
nodes (not even with force), if other regular nodes exist....

6d7b472a 03/09/2010 04:56 pm Iustin Pop

Fix typo that makes cluster verify to ignore hooks

The return from LUVerifyCluster should be True (or equivalent) for pass,
and False (or equivalent) for fail. The HooksCallBack function uses '1'
(= True) when a hook fails, which is exactly the opposite of what we...

6819dc49 03/09/2010 03:27 pm Iustin Pop

Fix redistribute config and offline nodes

We need to manually filter out offline nodes before using
rpc.call_upload_file and rpc.call_write_ssconf_files, since these method
are static (they work without a ConfigWriter instance) and thus do not
know which nodes are offline and which are not)....

17463d22 03/09/2010 02:27 pm René Nussbaumer

Add support for per-os-hypervisor parameters

This patch implements all modifications to support per-os-hypervisor
parameters in the framework.

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

44caf5a8 03/08/2010 03:53 pm Iustin Pop

Validate the hostnames at creation time

This patch adds validation of new names used, i.e. at cluster init time,
node add time, and instance creation.

For instances, especially when using «--no-name-check» (which skips DNS
checks), we should validate the give name, and also normalize it...

cb7c0198 03/08/2010 03:49 pm Iustin Pop

Implement disabling of file-based storage

Rationale: the file-based storage backend can add/remove files under a
certain directory. However, the master node is also controlling the
setting of the file-based root directory, so basically it means we can't
prevent arbitrary modifications by the master of the node's filesystem....

c4feafe8 03/08/2010 03:48 pm Iustin Pop

Switch from os.path.join to utils.PathJoin

This passes a full burnin with lots of instances, and should be safe as
we mostly to join a known root (various constants) to a run-time
variable.

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

467c1078 02/26/2010 04:23 pm Guido Trotter

Merge branch 'stable-2.1' into devel-2.1

  • stable-2.1:
    Add NLD constants to Ganeti
    Fix two potentially endless loops in http library
    Fix bug in LUQueryConfigValues
    Fix typo in LUVerifyCluster when checking node time

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

cac599f1 02/26/2010 02:38 pm Michael Hanselmann

Fix bug in LUQueryConfigValues

LUQueryConfigValues supports multiple output fields. If the client asked
for the watcher pause status, it would not get a list, but simply the
value.

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

30bb62ea 02/25/2010 03:16 pm Michael Hanselmann

Fix typo in LUVerifyCluster when checking node time

The first argument to _ErrorIf should always be True in this case.

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

f7e7689f 02/22/2010 02:50 pm Iustin Pop

Add LUNodeEvacuationStrategy

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

823a72bc 02/22/2010 02:50 pm Iustin Pop

Implement support for mevac in OpTestAllocator

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

7f60a422 02/22/2010 02:50 pm Iustin Pop

Implement IAllocator multi-evacuate mode

This is a new mode that request a solution for the evacuation of
multiple nodes. The external script will be fed a list of names, and is
expected to return a list of [instance, new_node(s)] lists, detailing
the evacuation path of each instance....

680f0a89 02/22/2010 02:50 pm Iustin Pop

Accept both 'nodes' and 'result from iallocator

This patch switches the default result key from 'nodes' to 'result'. The
old name is still accepted for backwards-compatiblity, and should be
removed in later versions.

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

8d3f86a0 02/22/2010 02:50 pm Iustin Pop

Change internal API for the IAllocator class

Currently the 'name' parameter in the constructor is required (as a
non-keyword argument). Since the (to follow) node evac IAllocator mode
doesn't have 'name' as a valid argument, we're moving this one into the...

9757cc90 02/22/2010 02:50 pm Iustin Pop

Remove redundant code in IAllocator class

This moves the setting of the request member on the in_data, of the
request type, and of the branching basef on request type outside of
individual functions and directly into the constructor.

Since the values we're using externally are identical to the...

61dabca4 02/17/2010 08:08 pm Iustin Pop

Simplify a bit _GetWantedNodes

This should have been done in the _ExpandNodeName patch.

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

083a91c9 02/17/2010 06:41 pm Iustin Pop

Fix a wrong docstring

There's no such thing as OpProgrammerError (I found this as I wrote it
in code in another place, and pylint complained).

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

cf26a87a 02/17/2010 03:07 pm Iustin Pop

Remove boiler-plate code about node/instance names

Currently we have lots of duplication of the error-checking (and proper
exception raising) around node/instance name expansion. LUCreateInstance
is the only place where we have abstracted this.

This patch creates two functions (ExpandNodeName and ExpandInstanceName)...

d5cd389c 02/15/2010 04:42 pm Iustin Pop

Release all node locks during disk replace

This patch extends commit 7ea7bcf by releasing all node locks in disk
replace for the early release mode. The rationale behind this is:

- LUCreateInstance already releases all node locks while waiting for
disk synchronization, and does an instance startup later...

9af0fa6a 02/15/2010 12:27 pm Iustin Pop

Auto-enable early release for offline old nodes

In case the old node is offline, we won't be able to talk to it to
remove the storage, and in most cases the node is powered
off/unreachable.

In this case, it makes no sense to delay the storage release, so we...

abd8e836 02/11/2010 06:00 pm Iustin Pop

Run instance hooks on more nodes

This should fix issue 68: some hooks should be run on more nodes than
currently. GrowDisk runs on both nodes, remove run the post hook on the
instance's nodes, and failover and migrate run the post hook on the
source node too....

08eec276 02/11/2010 06:00 pm Iustin Pop

Add {NEW,OLD}_{PRIMARY,SECONDARY} vars to hooks

Per issue 71, the migrate and failover need special variables for
keeping the nodes consistent during instance migrations.

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

dd713605 02/11/2010 01:50 pm Iustin Pop

Pass debug mode to noded for OS-related calls

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

ee844e20 02/11/2010 01:46 pm Iustin Pop

Add a generic 'debug_level' attribute to opcodes

Also automatically fix opcodes which have this missing in the LU init
routine.

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

7ea7bcf6 02/09/2010 12:04 pm Iustin Pop

Add an early release lock/storage for disk replace

This patch adds an early_release parameter in the OpReplaceDisks and
OpEvacuateNode opcodes, allowing earlier release of storage and more
importantly of internal Ganeti locks.

The behaviour of the early release is that any locks and storage on all...

4c06a2d0 02/08/2010 04:04 pm Iustin Pop

Merge branch 'stable-2.1' into devel-2.1

  • stable-2.1:
    TLReplaceDisks: Delay iallocator when evacuating node
    Implement debug level across OS-related RPC calls
    Second try to fix LUVerifyCluster
    LUVerifyCluster: Fix bug with offline nodes
    utils: Fix retry delay calculator...
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...

9f53d9ce 02/01/2010 02:55 pm Michael Hanselmann

Merge remote branch 'origin/stable-2.1' into devel-2.1

  • origin/stable-2.1:
    Bump version to 2.1.0~rc5
    Fix missing bridge for xen instances
    Fix flipping MC flag bug
    ganeti-watcher: ensure confd is running as well
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 <>...

4c1a504b 01/26/2010 02:58 pm Iustin Pop

Merge branch 'devel-2.0' into devel-2.1

  • devel-2.0:
    Fix the mocks.py for 2.0 unittests
    LURemoveNode safety in face of wrong node list
    Fix an unsafe formatting bug
    Ensure all int/float conversions are handled right

Conflicts:
lib/backend.py - trivial merge...

9bb31ea8 01/25/2010 06:17 pm Iustin Pop

LURemoveNode safety in face of wrong node list

LURemoveNode runs under the BGL, which means we're guaranteed that the
list of nodes as retrieved in CheckPrereq is still valid in
BuildHooksEnv. However, we can make Ganeti handle failures in case the
locking is broken (or the node list has been modified otherwise) easily,...

691744c4 01/25/2010 06:16 pm Iustin Pop

Ensure all int/float conversions are handled right

int()/float() can raise either ValueError (in case of int("a")), or
TypeError (in case of int(None)). We had many bugs over time due to
this, and a recent one was just diagnosed, so we go over the codebase...

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