Statistics
| Branch: | Tag: | Revision:

root / lib / cmdlib.py @ d8e0dc17

History | View | Annotate | Download (348.6 kB)

# Date Author Comment
422d4619 06/14/2010 09:37 pm Iustin Pop

Rework LUSetInstanceParams._GetUpdatedParams

Currently, this function does three things:
- special handling of constants.VALUE_DEFAULT
- type enforcing of the resulting dict
- filling the dictionary with defaults

However, except for the first one, the second two do not belong in this...

73e0328b 06/14/2010 09:35 pm Iustin Pop

Add cluster.SimpleFill*() functions

Currently, the existing cluster.Fill* functions take as argument an
instance. This means that in any case where we don't have an actual
instance object, we have to resort to calling the low-level
objects.FillDict function....

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

c47478f9 06/14/2010 08:47 pm Iustin Pop

Fix a bug in instance startup with custom hvparams

Since the introduction of OS-specific hvparams, we shouldn't ever use
objects.FillDict directly for instances, but instead go via the cluster
object. Otherwise the os_hvp will be ignored.

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

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

7f7b730a 06/14/2010 07:58 pm Michael Hanselmann

Start instance after creating snapshots for export

This restores functionality lost in commit 387794f8. Found during
tests using QA scripts. An instance should be started after it
has been temporarily shutdown for an export.

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

d51ae04c 06/14/2010 07:58 pm Michael Hanselmann

Use import/export magic for backup/import and inter-cluster moves

This should prevent bugs in our code from accidentally overwriting
disks.

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

acd65a16 06/14/2010 07:56 pm Michael Hanselmann

import/export: Validate remote host/port

The hostname and port received from the remote cluster should
be validated, just in case.

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

bd061c35 06/11/2010 12:50 pm Guido Trotter

Enforce consistency in disks and nics input dicts

With this change unknown disk and nic parameters will be refused, rather
than silently ignored, so that one can't pass them in by mistake and not
realize what went wrong.

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

1b67be9b 06/11/2010 12:24 pm Guido Trotter

TLMigrateInstance: pass lu to _Check*

The various _Check* helper functions expect an lu to be passed in, but
the TL is passed instead. This works... sometimes! :)

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

e6b8d02d 06/08/2010 04:12 pm Michael Hanselmann

Show formatted ETA for disk sync and import/export

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

664ab866 06/04/2010 05:17 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    _ExecuteKVMRuntime: fix hv parameter fun
    Update FinalizeMigration docstring
    LUGrowDisk: fix operation on down instances
    Allow disk operation to act on a subset of disks
    NEWS: add release date for 2.1.3
    Bump up version for the 2.1.3 release...
41bbdb52 06/04/2010 04:22 pm Guido Trotter

LUGrowDisk: fix operation on down instances

Currently it's impossible to grow a disk if an instance is shutdown,
because the disk could not be assembled. Now we take care of assembling
it, and shutting it down after.

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

ef628379 06/04/2010 04:22 pm Guido Trotter

Allow disk operation to act on a subset of disks

If the disks= parameter is passed, we can assemble/wait for
sync/shutdown only some disks belonging to an instance, rather than all.

This is useful to only activate/sync/shutdown the affected disk when
growing it....

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

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

9bf56d77 05/18/2010 06:53 pm Michael Hanselmann

Implement opcode changes for remote-import

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

4a96f1d1 05/18/2010 06:53 pm Michael Hanselmann

Implement opcode changes for remote-export

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

1410fa8d 05/18/2010 06:53 pm Michael Hanselmann

Add opcode to prepare export

To prepare a remote export, the X509 key and certificate need to be generated.
A handshake value is also returned for an easier check whether both clusters
share the same cluster domain secret.

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

dfb34028 05/18/2010 01:30 pm Michael Hanselmann

Add function to read cluster domain secret

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

895eb320 05/18/2010 01:11 pm Michael Hanselmann

LUExportInstance: Remove instance only if export was successful

Until now, the instance was always removed (if asked for by the
user). In case of export errors however, it shouldn't.

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

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...
f02fbd30 05/17/2010 01:52 pm Michael Hanselmann

Return disk_template from LUQueryInstanceData

Inter-cluster instance moves need the disk template. As they run
LUQueryInstanceData to get an instance's details, the disk template
must be returned.

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

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

5e26633b 05/11/2010 09:25 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1: (29 commits)
    RAPI client: Improve SSL error reporting
    RAPI client: Don't check node role in client
    RAPI client: Update ReplaceInstanceDisks
    RAPI client: Fix behaviour of “allocatable” storage flag
    RAPI client: Encode boolean and None query values...
95f84636 05/11/2010 11:48 am Iustin Pop

Fix tiny typo in cluster verify

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

387794f8 05/04/2010 03:38 pm Michael Hanselmann

LUExportInstance: Move exporting code to helper class

This will simplify the implementation of intra-cluster instance
exports and reduces the number of local variables in
LUExportInstance.Exec.

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

c1e7897d 05/04/2010 03:37 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    cfgupgrade: allow working with relative paths
    Cleanup /etc/hosts during node removal
    verify cluster: check /etc/hosts consistency
    Change the migration message
    qa: enable early release during parallel burnin...
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....

24d70417 04/29/2010 04:30 pm Michael Hanselmann

Move cmdlib._VerifyCertificate to utils

This function will also be useful for inter-cluster instance
moves for verifying certificates.

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

b60ea3ff 04/23/2010 05:50 pm Michael Hanselmann

cmdlib: Convert instance import to new style

Use instance data transfer utility to import instances.

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

4fcb1b59 04/23/2010 05:50 pm Michael Hanselmann

cmdlib: Convert instance export to new style

With this change, exports of several disks will occur in parallel. Error
handling has also been improved.

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

6b92f2af 04/22/2010 07:12 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    Add a basic unittest for uidpool.RequestUnusedUid
    Factorize LUExportInstance
    Use ints instead of strings to represent user-ids
    QA: fix reimporting instance with different name
    Fix broken commit 9e302a8
    ssh: make quiet configurable...
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 <>

a91143f1 04/22/2010 12:35 pm Michael Hanselmann

Merge branch 'devel-2.1'

  • devel-2.1:
    SSH: do not check IPs
    Add separate module for backported language functionality
    Add make commit-check target
    burnin: skip migration based on hypervisor support
    Add a hypervisor constant for migration support...
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 <>

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

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

af2ae1c0 04/16/2010 03:06 pm Iustin Pop

Merge branch 'devel-2.1'

  • devel-2.1:
    utils: Add class to split string stream into lines
    Fix cluster behaviour with disabled file storage
    Update docstrings in tools/ and enable epydoc
    Forward-port the ganeti 2.0 cfgupgrade
    Add a new tool: sanitize-config...
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...

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

e7a25b08 04/12/2010 12:36 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    burnin: only remove instances we actually added
    burnin.ExecOrQueue: add post-process function
    burnin.ExecOrQueue: remove variable argument list
    Fix new pylint errors
    Rename the confd_client unittest (to confd.client)...
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 <>

921efbb3 04/06/2010 03:32 pm Michael Hanselmann

Merge remote branch 'devel-2.1'

  • devel-2.1:
    Extend ConfdFilterCallback with consistency checks
    Abstract the confd client creation
    Remove unused import from test file
    kvm_flag hypervisor parameter
    Move the runas user at execution time
    Send "501 Not Implemented" back when method not found...
2c42c5df 03/23/2010 01:04 pm Guido Trotter

Allow file storage to be grown

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

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

bc85bc75 03/17/2010 07:05 pm Michael Hanselmann

Merge remote branch 'origin/devel-2.1'

  • origin/devel-2.1:
    backend: Two small style fixes
    Allow cluster copy file over the replication net
    Enhance cli.GetOnlineNodes query/filtering
    Instance creation: implement --no-install mode
    Allow OS changes without reinstallation...
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 <>

c89e6fdf 03/16/2010 04:14 pm Michael Hanselmann

Merge remote branch 'origin/devel-2.1'

  • origin/devel-2.1:
    Improve “gnt-cluster renew-crypto”
    Fix behaviour of gnt-node modify -C no

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

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

084aba47 03/15/2010 07:00 pm Michael Hanselmann

Merge remote branch 'origin/devel-2.1'

  • origin/devel-2.1:
    Rightname confd's HMAC key
    Rename SSL_CERT_FILE to NODED_CERT_FILE
    Clarify the error message for ':' in PV names

Conflicts:
lib/bootstrap.py: Trivial
lib/constants.py: Trivial

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

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

b701a5df 03/15/2010 05:50 pm Iustin Pop

Merge remote branch 'origin/devel-2.1'

  • origin/devel-2.1:
    Implement QA tests for disk template changes
    Update instance modify documentation
    Implement conversion from drbd to plain
    Implement conversion from plain to drbd
    Abstract check that an instance is down...
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 <>

bb3776b4 03/15/2010 04:25 pm Michael Hanselmann

Merge remote branch 'origin/devel-2.1'

  • origin/devel-2.1: (116 commits)
    Implement replacing cluster certs and keys via “gnt-cluster renew-crypto”
    cli: Add helper function to stop and start whole cluster
    cfgupgrade: Use new bootstrap function for certs and keys...
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 <>

371f046c 02/23/2010 07:11 pm Michael Hanselmann

Fix bug in LUExportInstance

If remove_instance isn't passed to the Opcode, it'll be None. When
generating the hooks environment, the error “int() argument must be a
string or a number” was raised. It should now behave as any other
boolean hook env variable....

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