Statistics
| Branch: | Tag: | Revision:

root / lib / backend.py @ 6ea72e43

History | View | Annotate | Download (99 kB)

# Date Author Comment
b8ebd37b 07/29/2010 11:02 pm Iustin Pop

Instance migration: remove error on missing link

Since we don't support upgrades from 1.2.4 without restarting the
instance, the 'not restarted since 1.2.5' check/error is
wrong/misleading.

Since the live migration works anyway without the links (it recreates...

91492e57 07/26/2010 05:50 pm Iustin Pop

Change the meaning of call_node_start_master

Currently, backend.StartMaster (the function behind this RPC call) will
activate the master IP and then, if the start_daemons parameter is true,
it will also activate the master role.

While this works, it has two issues:...

a744b676 07/09/2010 04:37 pm Manuel Franceschini

Introduce lib/netutils.py

This patch moves network utility functions to a dedicated module.

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Iustin Pop <>

c46b9782 07/06/2010 12:24 pm Luca Bigliardi

Add drbd_helper rpc call

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

7ef40fbe 07/06/2010 12:24 pm Luca Bigliardi

VerifyNode: add usermode helper reply

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

9769bb78 06/30/2010 01:41 pm Manuel Franceschini

Rename some constants to facilitate IPv6 support

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Guido Trotter <>

72db3fd7 06/28/2010 01:46 pm Iustin Pop

Two more fixes for OS params and opcode defaults

If the OS is not using API v20, the parameter verification should be
entirely skipped.

The second change is a simple typo.

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

40684c3a 06/25/2010 06:36 pm Iustin Pop

Fix breakage due to OS parameters

I was using wrong python installation path (thanks Guido!), so I was not
actually testing the new backend.py module. Two immediate things bugs
are fixed, and after these burnin passes again…

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

b0d85178 06/23/2010 07:23 pm Iustin Pop

Add OS verification support to cluster verify

For this, we needed to extend the NodeImage class with a few extra
variables, and we do a trick in the node verification where we pick the
first node that returned valid OS data as the reference node, and then...

1bdcbbab 06/23/2010 07:23 pm Iustin Pop

Add OS parameters to cluster and instance objects

The patch also modifies the instance RPC calls to fill the osparameters
correctly with the cluster defaults, and exports the OS parameters in
the instance/OS environment.

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

535b49cb 06/23/2010 07:23 pm Iustin Pop

Add support for OS parameters during import/export

Nothing special here, just copy/adjust the beparams code.

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

bad78e66 06/23/2010 07:23 pm Iustin Pop

LUDiagnoseOS: add more fields, cleanup

This patch exports all the way from backend a new field ‘api_version’
which holds the list of support API versions, and exposes the (already
computed) ‘parameters’ field.

The patch also reworks (again) the field calculation in its Exec()...

c7d04a6b 06/23/2010 07:23 pm Iustin Pop

Add reading of OS parameters from disk

The patch also modifies the internal methods in LUDiagnoseOS and gnt-os
to deal with the format change of call_os_diagnose.

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

acd9ff9e 06/23/2010 07:23 pm Iustin Pop

Introduce an RPC call for OS parameters validation

While we only support the 'parameters' check today, the RPC call is
generic enough that will be able to support other checks in the future.
The backend function will both validate the parameters list (so as to...

b5b8309d 06/15/2010 12:49 pm Guido Trotter

ListVisibleFiles: do not sort output

Among all users, turns out just one may need the output to be sorted.
All the others can cope without.

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

efaa9b06 06/14/2010 09:35 pm Iustin Pop

Split the core-OS and instance-specific env

Since we'll need to be able to generate the OS-specific environment
separately from the instance one, we move it to a separate function. We
also add a new OS_NAME env. var which is identical to the INSTANCE_OS
one (which won't exist for OS-only environments)....

31ca841c 06/14/2010 09:33 pm Iustin Pop

Merge branch 'devel-2.1' into master

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

845da3e8 06/14/2010 08:46 pm Iustin Pop

Fix unsafe variant initializer in _TryOSFromDisk

In case an OS has inconsistent declarations, we might get into a case
where one node reports a valid variants list (with OS API >=15), and
another node has OS API < 15, in which case its supported_variants gets...

af1d39b1 06/14/2010 07:57 pm Michael Hanselmann

backend: Add support for import/export magic

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

560cbec1 06/14/2010 07:55 pm Michael Hanselmann

Handle ESRCH when sending signals

Upon sending signals, ESRCH can be reported when the target no
longer exists.

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

6abf7f2c 06/11/2010 12:23 pm Guido Trotter

Remove the job queue drain rpc call

This call was introduced but never used. In two years.
Since it's just creating/removing a file it can also be in simpler ways,
without a special rpc call, if/when we need it again. In the meantime,
let's give it to history....

2ad5550d 06/08/2010 04:12 pm Michael Hanselmann

backend: Enable export size prediction

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

ff89a747 06/01/2010 07:39 pm Michael Hanselmann

Distribute cluster domain secret

The cluster domain secret file was not distributed to other nodes.

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

a5310c2a 05/21/2010 06:18 pm Michael Hanselmann

Allow control of import/export compression method

For exports to/imports from the same machine, compression will
not be used anymore.

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

eb630f50 05/21/2010 06:17 pm Michael Hanselmann

Put common import/export daemon options into object

The X509 key name and CA are passed from cmdlib all the way to
the backend import/export daemon. With the addition of an option
to choose the compression method, another parameter would have
to be passed all the way. By moving these options to a separate...

31ff0247 05/17/2010 02:17 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    RAPI: /2/{nodes,instances}/$name should return 404 for unknown items
    ganeti-masterd: Improve error logging for client requests
    Return disk_template from LUQueryInstanceData
    RAPI client: Rename Get{Node,Instance}Info, add new GetInstanceInfo...
a3a5f850 05/17/2010 01:33 pm Iustin Pop

Add checks for master IP in cluster verify

This also updates a comment in the unittest for utils.py. We unittest
the new function for two things: correct reporting on real case (for
localhost), and correct reporting with a mocked-out TcpPing that returns...

1c54156d 05/13/2010 07:40 pm Luca Bigliardi

Merge branch 'devel-2.1'

Conflicts:
daemons/ganeti-noded
lib/daemon.py
lib/rapi/baserlib.py
lib/rapi/rlib2.py
lib/utils.py

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

20601361 05/13/2010 07:11 pm Luca Bigliardi

Fix some pylint warnings

Disable warnings for:
- except Exception,
- use of __errno_location,
- redeclaration of handleError()

Signed-off-by: Luca Bigliardi <>
Reviewed-by: Guido Trotter <>

1af6ac0f 05/13/2010 04:32 pm Luca Bigliardi

Lock PowercycleNode child in memory

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

dcaabc4f 05/10/2010 07:21 pm Michael Hanselmann

Fix import/export

63bcea2a5 added file checks for import/export, but unfortunately they
were broken.

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

0a865080 05/07/2010 02:34 pm Guido Trotter

backend: remove a couple of useless mkdir calls

Those directories must exist for the node daemon to run (it's in the
node daemon's list of ensured directories) and those functions are only
called by the node daemon, so there's no point in those checks+mkdir...

63bcea2a 05/04/2010 03:39 pm Michael Hanselmann

backend: Check paths and always write CA file for import/export daemon

Once the import/export daemon uses separate users, the node daemon file (which
is used for intra-cluster transfers) might not be readable anymore. Always
writing it to a daemon-specific file will make this easier....

47f8a2d2 04/23/2010 05:50 pm Michael Hanselmann

Remove two unused RPC functions

Both of these functions, “snapshot_export” and “instance_os_import”,
have been replaced by the instance import/export daemon.

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

f81c4737 04/22/2010 02:35 pm Michael Hanselmann

Add RPC call to send SIGTERM to import/export daemon

This will be used to stop the daemon without doing complete cleanup (yet).

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

debed9ae 04/21/2010 04:57 pm Michael Hanselmann

utils: Add function to read locked PID file

This is useful in combination with utils.StartDaemon and will be used for
reading the import/export daemon's PID file.

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

f39cd91d 04/20/2010 07:26 pm Balazs Lecz

Merge branch 'devel-2.1'

Conflicts:
doc/security.rst
trivial
lib/cli.py
trivial

Signed-off-by: Balazs Lecz <>
Reviewed-by: Michael Hanselmann <>

f28ec899 04/20/2010 01:24 pm Guido Trotter

Add CleanupInstance hypervisor call

Currently some hypervisors (namely kvm) need to do some cleanup after
making sure an instance is stopped. With the moving of the retry cycle
in backend those cleanups were never done. In order to solve this we add
a new optional hypervisor function, CleanupInstance, which gets called...

1651d116 04/16/2010 04:24 pm Michael Hanselmann

Add RPC calls to import and export instance data

These RPC calls can be used to start, monitor and stop the instance data
import/export daemon.

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

409e8ec2 04/16/2010 03:34 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    backend: Consolidate code opening real block device

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

f2e07bb4 04/16/2010 03:33 pm Michael Hanselmann

backend: Consolidate code opening real block device

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

30198f04 04/12/2010 05:15 pm Iustin Pop

Merge remote branch 'devel-2.1'

  • devel-2.1:
    Update import documentation for the recent changes
    Add a identify-defaults options for import
    Fix create/import verification of hvparams
    objects.Cluster: add method to get hv defaults
    Reuse NIC information from export...
3c8954ad 04/12/2010 04:56 pm Iustin Pop

Export more instance parameters in instance export

Currently the backend parameters are not exported automatically, but
only a few directly in the '[instance]' section. Hypervisor type and
hypervisor parameters are not exported at all.

This patch creates two separate sections for the be and hv parameters,...

6801eb5c 04/12/2010 04:56 pm Iustin Pop

Export the nicparams too during instance export

The patch tries to export all params (based on the dict defined in
constants), using None for missing keys.

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

24f40363 03/23/2010 11:56 am Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    ganeti-confd: Call pyinotify flags correctly
    Fix burnin error when trying to grow a file volume
    Some epydoc fixes
    A rewrite of LUClusterVerify
    Introduce a bool CLI option type
    Fix backend.VerifyNode behaviour for VG problems...
ed904904 03/23/2010 10:35 am Iustin Pop

Fix backend.VerifyNode behaviour for VG problems

In case LVM is broken, backend.GetVolumeList will raise an RPC exception
(as expected since it's a function exposed over RPC). Therefore we must
be prepared to catch any such exceptions, so that we don't fail the...

f942a838 03/17/2010 07:19 pm Michael Hanselmann

Add RPC calls to create and remove X509 certificates

Certificates and keys generated using these functions will be used for
inter-cluster instance moves. As per design, the private key should never
leave the node.

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

56569f4e 03/17/2010 06:58 pm Michael Hanselmann

backend: Two small style fixes

- Pass keyword parameter as such
- Replace “not x == y” with “x != y”

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

168c1de2 03/15/2010 06:40 pm Michael Hanselmann

Rename SSL_CERT_FILE to NODED_CERT_FILE

To be consistent with RAPI_CERT_FILE, the rather generic named
“SSL_CERT_FILE” constant is renamed to “NODED_CERT_FILE”. The actual file
name is not changed.

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

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

1d466a4f 03/12/2010 05:44 pm Michael Hanselmann

utils.CreateBackup: Use human-readable instead of seconds since Epoch

Seconds since the Epoch are not easily readable by a human. Using a
formatted timestamp makes it easier (e.g.
“….backup-2010-03-12_14_02_43.…”). This patch also makes OS logfiles use
this formatted timestamp....

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

89e5ab02 03/09/2010 06:03 pm Iustin Pop

Fix node volumes list for stripped volumes

Currently backend.NodeVolumes() drops everything except the first PV,
thus we get a truncated result. The patch is not the nicest, as Python
doesn't have a simple `concat' function, so I had to change the list
comprehension to an explicit loop....

0411c011 03/08/2010 03:52 pm Iustin Pop

Switch more code to PathJoin

This should remove most of the remaining constructs which can be
replaced by PathJoin.

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

e51db2a6 03/08/2010 03:52 pm Iustin Pop

Add caller-validation on Disk.StaticDevPath

Since in objects we don't have access to utils.py, we add a warning that
the result value from objects.Disk.StaticDevPath might not be a valid
path, and change its only caller to validate the path.

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

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

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

Replace os.path.sep.join(seq) with utils.PathJoin

This is a no-op change, but at least we concentrate the calls to path
joins into a single function.

A use in utils.FindFile is left as-is (don't want to raise exceptions
there, at least for now).

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

81a3406c 03/08/2010 03:48 pm Iustin Pop

Abstract OS log names computation

The various OS operations create log files in a specific directory
(constants.LOG_OS_DIR). The construction of the log names is however
spread and duplicated across multiple functions.

This patch abstracts this into a separate function that also validates...

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

Remove superfluous warnings in HooksRunner

For non-existing hooks (the majority of cases probably), logging a
warning every time is not helpful. So we first check if we have a valid
directory.

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

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

714ea7ca 03/08/2010 03:46 pm Iustin Pop

Add an extra safety layer to _CleanDirectory

In order to protect from accidental use of _CleanDirectory on a random
directory, we add a list of allowed clean directories, somewhat similar
to _ALLOWED_UPLOAD_FILES (but statically computed).

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

6bb65e3a 02/22/2010 06:02 pm Guido Trotter

Implement utils.RunParts and use it for hooks

This function is a generic pythonic version of runparts. We currently
use it in the backend HooksRunner, but we'll use it for running
different directories as well.

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

8b4fe938 02/22/2010 06:02 pm Guido Trotter

Change backend hooks runner to use RunCmd

And save lots of lines of code, in the process

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

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

433c63aa 02/01/2010 12:37 pm Iustin Pop

Make the snapshot decision based on disk type

… instead of disk size, which is not as reliable. This actually
simplifies the code; but it still leaves the possibility of stack
overflows if the disk data structure is corrupted.

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

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

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

c19f9810 01/04/2010 11:16 am Iustin Pop

backend._OSOndiskAPIVersion: remove obsolete arg

The 'name' argument is not used anymore, probably since before 2.0.
Since this is an internal function, we can just remove it (from its
caller too).

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

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

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

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...
4fe80ef2 12/14/2009 05:36 pm Iustin Pop

Move the hooks file mask into constants.py

This will allow reuse of the same mask for multiple validations.

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

f95c81bf 12/14/2009 05:36 pm Iustin Pop

Security issue: add validation of script names

This patch unifies the search for external script to always go through
utils.FindFile and implements in that function a restriction on valid
chars in file names and (additionally) that the passed name is the...

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

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

7e1fac25 11/11/2009 03:30 pm Michael Hanselmann

Use “daemon-util” to reload SSH keys

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

6c881c52 11/06/2009 03:48 pm Iustin Pop

Fix pylint 'E' (error) codes

This patch adds some silences and tweaks the code slightly so that
“pylint --rcfile pylintrc -e ganeti” doesn't give any errors.

The biggest change is in jqueue.py, the move of _RequireOpenQueue out of
the JobQueue class. Since that is actually a function and not a method...

f154a7a3 11/05/2009 05:36 pm Michael Hanselmann

Add new “daemon-util” script to start/stop Ganeti daemons

Until now, Ganeti started and stopped its own daemons using custom functions.
To start, the daemon was just executed and then sent the appropriate signals to
stop it again. Init scripts would have to pay attention to the PID file and...

58d38b02 11/04/2009 05:34 pm Iustin Pop

hypervisors: change MigrateInstance API

Currently the $hypervisor.MigrateInstance takes the instance name. This
patch changes it to take the instance object, such that other instance
properties (especially hvparams) are available to it.

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

db8667b7 11/03/2009 06:14 pm Iustin Pop

Workaround fake failures in drbd+live migration

This patch is an attempt to fix the ugly issue during migration:
Cannot resync disks on node …: [True, 100]

If my understanding is correct, sometimes we poll the /proc/drbd file at
an inoportune moment, while it's being updated, or while the DRBD device...

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

3c0cdc83 11/03/2009 12:51 pm Michael Hanselmann

backend: Convert to utils.Retry

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

23057d29 11/02/2009 02:05 pm Michael Hanselmann

Epydoc fixes

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

ea79fc15 11/02/2009 02:04 pm Michael Hanselmann

backend: Don't overwrite function parameter with loop variable

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

3782acd7 10/22/2009 12:16 pm Iustin Pop

Try to reduce wrong errors in InstanceShutdown

In backend.InstanceShutdown(), there is a race condition between
checking that the instance exists and trying to shut it down which
translates sometime in error messages like:

Tue Oct 20 20:08:30 2009 - WARNING: Could not shutdown instance: Failed...

7734de0a 10/22/2009 12:15 pm Iustin Pop

Revert breakage introduced in e4e9b80

Commit e4e9b8064787df01a79846a40f49c8ae06a8eb0e introduced two problems
in backend.InstanceShutdown():

- first, it reduced the check interval significantly (especially for the
first few checks); there are very few production VMs that shutdown in...

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

69b99987 10/12/2009 01:48 pm Michael Hanselmann

Code and docstring style fixes

Found using pylint and epydoc.

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

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

e4e9b806 10/09/2009 06:01 pm Guido Trotter

backend.InstanceShutdown: small cleanup

1) unhardcode the timeout, abstracting it in a constant
2) Use time.time() rather than hiding the timeout in a range()
3) call hyper.StopInstance multiple times
-- currently all hypervisors just ignore all calls but once...

6ee7102a 10/05/2009 12:39 pm Guido Trotter

OSFromDisk: handle variants when loading os

When we load an OS from disk, we need _TryOSFromDisk to get the real
name, without any variant. This allows any functionality that uses the
instance OS to handle a name with a variant.

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

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