Statistics
| Branch: | Tag: | Revision:

root / lib @ 168c1de2

# Date Author Comment
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 <>

01b6558a 03/15/2010 06:18 pm Iustin Pop

Clarify the error message for ':' in PV names

As described in issue 93, just saying ':' is not a valid char can be
confusing.

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

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

5029db65 03/15/2010 05:17 pm Iustin Pop

Implement disk adoption mode in gnt-instance

This patch modifies the parsing of the “--disk” argument to instance
create to accept “adopt” as a valid key, which builds the correct disk
structure for OpCreateInstance.

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

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

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

ConfigWriter: add an LV reservation manager

This patch adds an LV reservation manager to be used for LV names. Since
we now have four such managers, we create a list for easier release.

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

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

6d4a1656 03/12/2010 05:45 pm Michael Hanselmann

Implement replacing cluster certs and keys via “gnt-cluster renew-crypto”

Recent changes to “gnt-cluster verify” made it complain on expiring SSL
certificates. While it was possible to replace the SSL certificates and
other cluster secrets manually before, doing so was cumbersome. Cluster...

7e49b6ce 03/12/2010 05:45 pm Michael Hanselmann

cli: Add helper function to stop and start whole cluster

Replacing cluster certificates and keys requires all cluster daemons to be
shut down. This might also be handy for the cluster merger tool, though
the function might need a few more extensions.

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

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

bootstrap: Add new function to create cluster certs and keys

The code to generate cluster certificates, keys and secrets is currently
spread over several places. It makes sense to move it to a separate
function as we want to provide the user with the ability to automatically...

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

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

27e46076 03/12/2010 05:44 pm Michael Hanselmann

utils: Add function to extract X509 cert validity

X509 uses ASN1 GENERALIZEDTIME or UTCTIME to store certificate validity.
pyOpenSSL 0.7 and above allow us to retrieve both “notBefore” and
“notAfter” as strings. Parsing them turned out to be a challenge since...

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

c63355f2 03/11/2010 05:45 pm Iustin Pop

Fix wrong indentation

Sorry…

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

919ca415 03/11/2010 05:12 pm Iustin Pop

Extend JobExecutor to allow custom feedback_fn

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

5299e61f 03/11/2010 05:12 pm Iustin Pop

cli.JobExecutor: poll jobs in execution order

… rather than submission order. The results are still returned in the
submission order, and for this we needed to track internally the index
of the submission.

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

2de64672 03/11/2010 05:09 pm Iustin Pop

Add a partition function to split a list in two

This is similar to the Haskell function, except that the signature is
reverse to match the 'any' and 'all' Python functions.

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

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

1feb39ec 03/11/2010 01:16 pm Guido Trotter

KVM: remove unused variable

We don't need the pwentry when checking if a username exists, just to be
sure the KeyError is not returned. Remove the variable, and thus shut up
lint.

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

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

d19d94db 03/10/2010 08:07 pm Guido Trotter

KVM: add security model and domain parameters

Initially we only support the "user" model (in which the user running
the virtual machine can be specified as an additional parameter).

We use usernames rather than uids in this mode, because the kvm -runas
flag doesn't support uids anyway, and we check the passed username for...

3424767f 03/10/2010 08:07 pm Guido Trotter

KVM security: add global constants

These constants add two new kvm hypervisor parameters, specifying the
security model (user/pool) and the security domain, within that model.

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

6873a52a 03/10/2010 04:02 pm Michael Hanselmann

http.auth: Disable pylint warnings

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

81196341 03/10/2010 03:56 pm Iustin Pop

Implement verify checks for node/instance names

Since we index the nodes and instances by their name, we should have
checks that the dict key to object.name mapping is correct.

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

44db3a6f 03/10/2010 02:15 pm Iustin Pop

Fix a python 2.6.5 compatibility

The upcoming python 2.6.5 release has a change that makes delattr(obj,
attr) fail for slots-enabled objects if the attr is not already set.

To prevent against this, we only run the delattr if the attribute is
already set....

84e0863d 03/10/2010 02:09 pm Guido Trotter

KVM: Remove boot restriction for paravirtual nics

Newer virtio can boot from the network perfectly well, so there's no
point in keeping this restriction in place. This will still fail on
older kernels.

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

c6a39fc2 03/10/2010 02:09 pm Guido Trotter

KVM: pass the instance name as the first kvm flag

This makes it the first argument show, for example under "ps".

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

d44ea6a3 03/10/2010 12:18 pm Michael Hanselmann

http.server: Improve request logging in debug mode

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

a8950eb7 03/10/2010 12:17 pm Michael Hanselmann

Provide unittests for http.auth

To simplify writing unittests, one data structure class in http.server is
also changed. According to the coverage utility, this provides 95%
coverage.

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

23ccba04 03/10/2010 12:17 pm Michael Hanselmann

http.auth: Fix bug with checking hashed passwords

When username and password were sent for a resource not requiring
authentication, it wouldn't be accepted if the user in question had a
hashed password. The reason was that the function GetAuthRealm used to...

4c61d894 03/09/2010 06:07 pm Iustin Pop

Add the auto_promote option to cli and gnt-node

This allows one to cleanly set a node offline and promote as needed
other nodes.

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

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

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

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

f9faf9c3 03/09/2010 02:27 pm René Nussbaumer

cli: Add ArgOs for later use in gnt-os

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

760570a8 03/08/2010 05:50 pm Timothy Kuhlman

KVM: Fix unintended qemu-level bridging of nics

Each nic should be connected to its own qemu vlan, to avoid them all
bridging together.

Signed-off-by: Timothy Kuhlman <>
Reviewed-by: Guido Trotter <>
Signed-off-by: Guido Trotter <>...

b4478d34 03/08/2010 05:15 pm Michael Hanselmann

Support passing in file object in utils.FileLock

This way we can re-use file objects opened in other places. Also add more
unittests.

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

bdefe5dd 03/08/2010 05:15 pm Michael Hanselmann

Support arguments in utils.RunInSeparateProcess

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

cc4c9b91 03/08/2010 05:15 pm Michael Hanselmann

Convert utils.FileLock to utils.Retry

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

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

26288e68 03/08/2010 03:53 pm Iustin Pop

Add a function to validate and normalize hostnames

This differs slightly from the specification, by allowing names to start
with digits, not checking the length of individual components, and
allowing underscores.

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

04a69a18 03/08/2010 03:53 pm Iustin Pop

ListVisibleFiles: require normalized path names

This patch changes ListVisibleFiles to raise ProgrammerError if it's
passed a non-absolute/non-normalized path name, and adds unittests for
this behaviour.

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

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

30786fc9 03/08/2010 03:52 pm Iustin Pop

hv_kvm: remove hard-coded path constructs

This switches hv_kvm to PathJoin. There are still a few cases of direct
path construction, but those should be safe.

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

3b80eb2c 03/08/2010 03:51 pm Iustin Pop

hv_fake: remove hard-coded path constructs

This changes to hv_fake to PathJoin.

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

6b0391b3 03/08/2010 03:51 pm Iustin Pop

hv_chroot: remove hard-coded path constructs

This patch abstract the computation of an instance's root directory into
a separate function (that uses PathJoin instead of "%s/%s").

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

6136f8f0 03/08/2010 03:49 pm Iustin Pop

Add strict name validation for the LVM backend

Currently we don't enforce name validation for the LVM backend, on the
idea that LVM itself will reject invalid names and we catch those
errors.

However, recent LVM documents the accepted VG/LV name space, so it's...

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

4bb678e9 03/08/2010 03:46 pm Iustin Pop

utils: Add a PathJoin function

This will replace os.path.join since it is not safe for directory
traversal issues.

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

e8022bef 03/02/2010 05:56 pm Vitaly Kuznetsov

Avoid absolute path for privileged commands

Using absolute path for a privileged command is a bad idea as this path may vary.
For example /usr/sbin/brctl in Debian and /sbin/brctl in ALTLinux. Using $PATH is
a better idea.

Signed-off-by: Vitaly Kuznetsov <>...

553bd93f 02/26/2010 04:35 pm Vitaly Kuznetsov

Make SSH_CONFIG_DIR customizable

This patch adds ability to customize ssh config directory with --with-ssh-config-dir
(instead of hardcoded /etc/ssh value). This is useful in Linux distributions with
custom ssh config directories (/etc/openssh in ALTLinux, for example)....

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

4d32feba 02/26/2010 04:00 pm Guido Trotter

Add NLD constants to Ganeti

This avoids the need for them to be injected in the nbma repository.

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

7b8f3fcd 02/26/2010 03:37 pm Michael Hanselmann

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

  • origin/devel-2.0:
    Fix two potentially endless loops in http library
    Update NEWS file and bump version to 2.0.6
    ganeti-cleaner: does 'echo 0' instead of 'exit 0'

Conflicts:
NEWS: Trivial
configure.ac: Trivial...

40a09ee1 02/26/2010 03:36 pm Michael Hanselmann

Fix two potentially endless loops in http library

The first can be problematic if poll(2) returns POLLHUP|POLLERR on a
socket. Before it would be only be respected for SOCKOP_RECV, but since
they can also occur on other socket operations, esp. in combination with...

2826b361 02/26/2010 03:20 pm Guido Trotter

Move watcher's EnsureDaemon function to utils

This is going to be used from the nbma repository, to ensure that the
nld daemon is running.

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

72ca1dcb 02/26/2010 02:41 pm Balazs Lecz

Add multi-key support to the serializer

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

0be13136 02/26/2010 02:39 pm Michael Hanselmann

Fix two potentially endless loops in http library

The first can be problematic if poll(2) returns POLLHUP|POLLERR on a
socket. Before it would be only be respected for SOCKOP_RECV, but since
they can also occur on other socket operations, esp. in combination with...

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

9e289e36 02/26/2010 02:24 pm Guido Trotter

Add watcher hooks

These hooks are run on all nodes, after the "base" daemons are started.

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

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

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

bf4daac9 02/22/2010 06:01 pm Guido Trotter

Add reset_env option to RunCmd

This allows to run a command with only the passed in environment, rather
than just updating the default one with it.

Now with unit testing.

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

4403ff8d 02/22/2010 05:56 pm René Nussbaumer

Make it possible to pass custom private key path to SshRunner.Run

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

cb462b06 02/22/2010 05:42 pm Michael Hanselmann

Handle EAGAIN in LUXI client

If too many clients try to connect to the master at the same time, some of
them might fail if the master doesn't accept the connections fast enough.

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

f4484122 02/22/2010 05:42 pm Michael Hanselmann

Show message when job is waiting in queue or for locks

Jobs submitted via the standard command line utilities didn't give any
indication that anything is happening while they were waiting in the job
queue (e.g. due to other jobs using all worker threads) or acquiring...

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

Add LUNodeEvacuationStrategy

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

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

Add a new opcode for node evacuation

We add this as a new opcode since we don't want to alter the behaviour
of current opcodes/lus.

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

5627f375 02/19/2010 05:58 pm Michael Hanselmann

bootstrap: Wait for node daemon when adding new node

Until now this was only done for the master node, though
the problem originally fixed in 8f215968 also occurs for
other node daemons.

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

288d9e01 02/18/2010 02:22 pm Michael Hanselmann

Merge branch 'stable-2.1' into devel-2.1

  • stable-2.1:
    Fix ssh host key checking with no-key-check
82869978 02/18/2010 02:21 pm Michael Hanselmann

Reset tempfile module after fork where useful

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

eb58f7bd 02/18/2010 02:21 pm Michael Hanselmann

Move RunInSeparateProcess to ganeti.utils

This function could be useful in other places and this
way we can easily unittest it.

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

055f822b 02/18/2010 02:21 pm Michael Hanselmann

Add function to reset tempfile module after fork

On fork, the tempfile module's pseudo random generator is
not reset. If several processes (e.g. two children or parent
and child) try to create a temporary file, they'll conflict.
This function can be used to reset the name generator which...

e66d9f1a 02/18/2010 12:27 pm Iustin Pop

Fix ssh host key checking with no-key-check

In case we add a node with “--no-ssh-key-check”, this should override
any default yes/ask values in the system-wide (or user) ssh key check.

Currently this only works in batch mode, whereas in non-batch we only...

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

ef7b75b2 02/15/2010 07:03 pm Michael Hanselmann

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

  • origin/stable-2.1:
    Fix bug introduced in commit 413b747
    Fix locking bug causing high CPU usage
    Fix confd procotol design description
    Implement instance rename QA tests
    Fix "gnt-instance rename" functionality...
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...