Statistics
| Branch: | Tag: | Revision:

root / lib @ 111c4e2f

# Date Author Comment
111c4e2f 06/28/2010 04:16 pm Guido Trotter

Fix _UpgradeConfig docstring

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

ebb80afa 06/28/2010 02:04 pm Guido Trotter

jqueue: remove the _big_jqueue_lock module global

By using ssynchronized in the new way, we can remove the module-global
_big_jqueue_lock and revert back to an internal _lock inside the jqueue.

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

dbb11e8b 06/28/2010 02:04 pm Guido Trotter

ssynchronized: act on a class member

The ssynchronized decorator takes the lock to act on in input.
With this change we allow a string to be passed, and if so we assume the
function it protects is a class method, and we act on the member of the
class itself named as the string we got....

3c0d60d0 06/28/2010 02:04 pm Guido Trotter

Share the jqueue lock on job-local changes

We can share the jqueue lock when we do per-job updates. These only
conflict with updates/checks on the same job from another thread (eg.
CancelJob, ArchiveJob, which keep the lock unshared, since they are less
frequent)....

9bf5e01f 06/28/2010 02:04 pm Guido Trotter

_OpExecCallbacks abstract _AppendFeedback

Move some code to a decorated function rather than explicitely
acquiring/releasing the lock in AppendFeedback.

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

41a26b68 06/28/2010 02:04 pm Guido Trotter

Remove utils.LockedMethod

All users of this function were converted to another method, hence we
can remove it.

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

99bd4f0a 06/28/2010 02:04 pm Guido Trotter

jqueue: convert to a SharedLock()

Remove the jqueue _lock member and convert to a _big_jqueue_lock
sharedlock. This allows smooth transition from the old single lock to a
more granular approach.

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

39ed3a98 06/28/2010 02:04 pm Guido Trotter

MarkUnfinishedOps: update job file on disk

Every time we call MarkUnfinishedOps we do it in a try/finally block
that updates the job file. With this patch we move the try/finally
inside. CancelJobUnlocked is removed, because it just becomes a wrapper
over MarkUnfinishedOps with two constant values....

a1bfdeb1 06/28/2010 02:04 pm Guido Trotter

Remove spurious empty line

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

403f5172 06/28/2010 02:04 pm Guido Trotter

Remove pred from compat.any/all

This makes it compatible with the python builtin, and we can even use
the builtin when running under the right version of python. The all and
any functions are renamed to _all and _any, so that they can be tested,
and (non)existing unittests are updated (translation: there are no unit...

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

3b08cd1c 06/24/2010 01:56 pm Apollon Oikonomopoulos

Introduce constants.DTS_MAY_ADOPT

DTS_MAY_ADOPT include disk templates that may use disk adoption and will be
used in all respective checks.

Signed-off-by: Apollon Oikonomopoulos <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

f8f590c8 06/24/2010 01:46 pm Guido Trotter

Convert TestDelay repeat to the type system

Turns out with the current implementation of the type system a variable
can both be required and not required. Interesting (but perhaps worth a
further look).

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

adb6d685 06/23/2010 07:24 pm Iustin Pop

Rename some constants and relax pylint rules

For the type system, we want a slightly relaxed rule for constant
naming, so we update the pylint rule. But the old _TPInt and _TNEString
were not clear enough, so we expand them.

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

3636400f 06/23/2010 07:24 pm Iustin Pop

Introduce a micro type system for opcodes

Currently, we have one structual validation for opcode attributes: the
_OP_REQP, which checks that a given attribute is not 'None', and the
rest of the checks are done at runtime. This means our type system has
two types: None versus Not-None....

3e512563 06/23/2010 07:24 pm Iustin Pop

LU.CheckPrereq: do not require implementation

Currently, the base class LogicalUnit's CheckPrereq will raise
NotImplementedError, which means that the child LUs have to implement
it. However, many LUs don't actually have a need for this function
(hence the many "pass" statements as the only body)....

3494b9f6 06/23/2010 07:24 pm Iustin Pop

Some more CheckPrereq/CheckArguments cleanup

For a few LUs, a few tests in, or even the whole CheckPrereq, can be
moved to CheckArguments, as they don't touch state and only do a 'type'
validation.

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

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

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

Move opcode attribute defaults to data structures

LUExportInstance had two opcode fields set to default via both
_CheckBooleanOpField and getattr(…, False).

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

9ade2eda 06/23/2010 07:23 pm Iustin Pop

Cleanup LU.ExpandNames versus CheckArguments

When LogicalUnit.CheckArguments was introduced, not all code dealing
with static argument checking was moved to it; many of these checks were
left in ExpandNames. With time, most of them migrated, and this patch...

989ba0c4 06/23/2010 07:23 pm Iustin Pop

Abstract export mode validity check

The export mode is checked in two places with the exact same code…

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

941b9309 06/23/2010 07:23 pm Iustin Pop

RAPI: switch evacuate node to the new model

This patch removes the last use of the old-style OpEvacuateNode. It also
fixes the dry-run mode for this RAPI resource - the dry-run parameter
was not used at all before.

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

8de1f1ee 06/23/2010 07:23 pm Iustin Pop

Remove the obsolete EvacuateNode OpCode/LU

All code has been switched to the new-style LU… time for cleanup.

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

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

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

Show OS parameters in cluster/instance info

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

062a7100 06/23/2010 07:23 pm Iustin Pop

Add support for OS parameters during instance add

This is not yet complete, as it lacks proper support for instance
import.

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

21d7df5f 06/23/2010 07:23 pm Iustin Pop

_GetUpdatedParams: enhance value removal options

This patch adds controls for whether we recognize
constants.VALUE_DEFAULT or not as a default value, and also adds
dash-prefixes as another way for parameter removal.

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

625ac113 06/23/2010 07:23 pm Iustin Pop

Add support for modifying cluster OS parameters

We use _GetUpdatedParams in order to support removal too, and then
validate the OS parameters if the OS exists.

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

1052d622 06/23/2010 07:23 pm Iustin Pop

Add support for modifying instance OS parameters

We move the instance OS rename checks earlier, as we need to run the
validation against the new OS, if it has changed.

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

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

4463ae96 06/23/2010 07:23 pm Iustin Pop

Silence a pylint warning

The OS parameters code will bump the number of lines over 10K, and thus
we need to silence this (no, we don't want any other module to become
this big…, so we use a targeted silence only).

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

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

Add os api v20 and related fields to the OS object

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

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

41593f6b 06/23/2010 01:32 pm Guido Trotter

Remove job object condition

We don't need it anymore, since nobody waits on it.

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

6c2549d6 06/23/2010 01:32 pm Guido Trotter

Parallelize WaitForJobChanges

As for QueryJobs we rely on file updates rather than condition
notification to acquire job changes. In order to do that we use the
pyinotify module to watch files. This might make the client a bit slower
(pending planned improvements, such as subscription-based...

b3855790 06/23/2010 01:32 pm Guido Trotter

Update the job file on feedback

This is needed to convert waitforjobchanges to use inotify and the
on-disk version and decouple it from the job queue lock. No replication
to remote nodes is done, to keep the operation fast.

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

9f7b4967 06/23/2010 01:32 pm Guido Trotter

Don't lock on QueryJobs, by using the disk version

We move from querying the in-memory version to loading all jobs from the
disk. Since the jobs are written/deleted on disk in an atomic manner, we
don't need to lock at all. Also, since we're just looking at the...

0f9c08dc 06/23/2010 01:32 pm Guido Trotter

Add JobQueue.SafeLoadJobFromDisk

This will be used to read a job file without having to deal with
exceptions from _LoadJobFromDisk.

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

3d6c5566 06/23/2010 01:32 pm Guido Trotter

jqueue._LoadJobFromDisk: remove safety archival

Currently _LoadJobFromDisk archives job files it finds corrupted. Since
we want to use it to load files without holding locks, this could cause
a conflict: we just move the feature to _LoadJobUnlocked which is always...

85a87e21 06/23/2010 12:38 pm Guido Trotter

Add repetition count to the TestDelay opcode

If the repetition count is not passed or is passed as 0 we sleep exactly
one time, otherwise we sleep "repeat" times and log in between.

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

706c353c 06/22/2010 04:26 pm Iustin Pop

Merge branch 'devel-2.1'

  • devel-2.1:
    Add "adopt" to the allowed disk parameters
    Improve pylintrc for pylint 0.21+
    Fix warnings with Python 2.6
    Fix a small bug introduced in cf26a87a
    Fix the type of 'valid' attribute in LUDiagnoseOS

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

1afea34a 06/22/2010 02:25 pm Apollon Oikonomopoulos

Add "adopt" to the allowed disk parameters

"adopt" was missing from bd061c3, thus breaking disk adoption.

Signed-off-by: Apollon Oikonomopoulos <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

c04bc777 06/22/2010 02:17 pm Iustin Pop

Fix warnings with Python 2.6

'format' is a new built-in function, and 'bytes' is a new builtin type.
We rename this to make pylint happy (and remove potential bugs).

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

035f40fc 06/22/2010 12:25 pm Iustin Pop

Fix a small bug introduced in cf26a87a

Commit cf26a87a added a tiny typo, which would break non-FQDN arguments
to modify node storage.

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

e88fc57d 06/22/2010 12:23 pm Iustin Pop

Fix the type of 'valid' attribute in LUDiagnoseOS

The update of the valid status in LUDiagnoseOS says:

valid = valid and osl and osl[0][1]

However, in Python, “True and []” (which '[]' we get for an invalid OS)
will result in “[]”, and thus the valid field for an OS will be either...

8494604f 06/21/2010 04:10 pm Apollon Oikonomopoulos

Add "adopt" to the allowed disk parameters

"adopt" was missing from bd061c3, thus breaking disk adoption.

Signed-off-by: Apollon Oikonomopoulos <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

626f4e45 06/18/2010 02:23 pm Guido Trotter

Merge branch 'stable-2.1'

  • stable-2.1:
    Bump up version for the 2.1.4 release
    Update NEWS about the latest 2.1 change
    Fix handling of errors from socket.gethostbyname
    Update a comment in qa-sample.json
    RAPI client: Add support for Python 2.6
    Update NEWS for Ganeti 2.1.4...
98fa19b0 06/18/2010 12:28 pm Iustin Pop

Fix handling of errors from socket.gethostbyname

Socket functions can raise more than just gaierror. Most of the times,
socket.gethostbyname_ex will return gaierror, but rarely it will also
raise herror. For completeness, we catch all socket exceptions with data...

25e557a5 06/17/2010 08:25 pm Guido Trotter

Workerpool.AddManyTasks: check tasks type

Each task has to be a sequence, or the RunTask call will fail.

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

7beb1e53 06/17/2010 08:25 pm Guido Trotter

jqueue.AddManyJobs: use AddManyTasks

Rather than adding the jobs to the worker pool one at a time, we add
them all together, which is slightly faster, and ensures they don't get
started while we loop.

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

809bc174 06/17/2010 06:07 pm Michael Hanselmann

RAPI client: Add support for Python 2.6

The httplib module used by urllib2 requires its sockets to have a
makefile() method to provide a file-like interface (or rather
file-in-Python-like) to the socket. PyOpenSSL doesn't implement
makefile() as the semantics require files to call dup(2) on the...

beba56ae 06/17/2010 05:48 pm Michael Hanselmann

RAPI client: Add support for Python 2.6

The httplib module used by urllib2 requires its sockets to have a
makefile() method to provide a file-like interface (or rather
file-in-Python-like) to the socket. PyOpenSSL doesn't implement
makefile() as the semantics require files to call dup(2) on the...

70c81511 06/17/2010 04:54 pm Michael Hanselmann

Bump RPC protocol version to 40

Many RPC calls have changed in Ganeti 2.2, hence bumping the RPC protocol
version.

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

06596a60 06/17/2010 01:31 pm Guido Trotter

Fix parameter names in SimpleFillBE/NIC docstrings

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

c2a8e8ba 06/17/2010 01:00 pm Guido Trotter

WorkerPool.AddManyTasks

Useful if we want to add many tasks at once, without contention with the
previous one we added starting.

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

b628191f 06/17/2010 01:00 pm Guido Trotter

AsyncAwaker: use shutdown on the socketpair

This makes sure the out_socket can only be used for writing, and the
in_socket for reading.

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

4c36bdf5 06/17/2010 01:00 pm Guido Trotter

jqueue: make replication on job update optional

Sometimes it's useful to write to the local filesystem, but immediate
replication to all master candidates is not needed.

The _WriteAndReplicateFileUnlocked function gets renamed to
_UpdateJobQueueFile, as calling "write and replicate, but don't...

6a290889 06/17/2010 12:53 pm Guido Trotter

s/queue._GetJobInfoUnlocked/job.GetInfo/

The job queue currently has a static _GetJobInfoUnlocked method.
Changing it to be a normal method of _QueuedJob, which makes more sense.

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

162c8636 06/17/2010 12:53 pm Guido Trotter

Abstract loading job file from disk

Move the work from _LoadJobUnlocked to _LoadJobFileFromDisk, which can
then be used in other contexts as well. Also, if we fail to deserialize
the job, archive it as well (before we archived it only if we failed to
create the related object, but kept it there if deserialization failed....

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

jqueue: simplify removal from _nodes

Somewhere we do try/del/except and somewhere just pop. Using pop
everywhere saves lines of code.

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

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

592e04bd 06/14/2010 09:37 pm Iustin Pop

Remove a TODO

Since OS objects are not stored in the configuration, we cannot put
os_hvp there, therefore the TODO is obsolete…

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

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

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

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

971bbd84 06/14/2010 07:58 pm Michael Hanselmann

Disallow DES for SSL connections

Older OpenSSL versions include DES-CBC3-* ciphers when specifying the
HIGH group of ciphers. Removing potentially weak ciphers from the list
of allowed ciphers ensures only strong ciphers are considered for SSL
connections....

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

5bb95572 06/14/2010 07:57 pm Michael Hanselmann

Disable compression for all intra-cluster imports/exports

Tests have shown that usually we're CPU-bound for intra-cluster
imports/exports. Disabling compression will help with this.

Some versions of OpenSSL, depending on the build options, also
compress transparently. This will need further work in Ganeti....

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

1d3dfa29 06/14/2010 07:57 pm Michael Hanselmann

import/export daemon: Add support for a magic prefix

This “magic” value will be used to ensure that we don't accidentially
connect to the wrong daemon (e.g. due to a bug), comparable to DRBD's
per-disk secret. Just depending on the SSL certificate isn't enough...

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

import/export daemon: Simplify command building

Instead of appending strings, stage parts in a list. Building the "dd"
command is moved to a separate function.

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

0559f745 06/14/2010 07:56 pm Michael Hanselmann

import/export: Limit max length of socat options

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

28f34048 06/14/2010 07:56 pm Michael Hanselmann

utils: Add function to validate service name

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

27137e55 06/14/2010 12:17 am Iustin Pop

Fix RpcResult.Raise error code

A typo in the Raise() method of rpc.RpcResult means that any remote
errors will lack an appropriate error code; this will confuse e.g. RAPI
users.

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

20571a26 06/11/2010 07:06 pm Guido Trotter

Cache a few bits of status in jqueue

Currently each time we submit a job we check the job queue size, and the
drained file. With this change we keep these pieces of information in
memory and don't read them from the filesystem each time.

Significant changes include:...

57d56130 06/11/2010 05:06 pm Guido Trotter

ListVisibleFiles: do optional sorting

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

c910bccb 06/11/2010 05:06 pm Guido Trotter

Fix a TODO in _QueuedJob

Rather than raising Exception use GenericError and explain a bit better
what happened.

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

69b03fd7 06/11/2010 05:06 pm Guido Trotter

Remove unused parameter from function

This also removes the relevant pylint disable.
No point in keeping unused parameters around: if/when we need them it's
easy to add it back.

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

85a1c57d 06/11/2010 05:06 pm Guido Trotter

Optimize _GetJobIDsUnlocked

Currently we sort the list of job queue files twice (once in
utils.ListVisibleFiles with sort and then later with NiceSort). We apply
the _RE_JOB_FILE regular expression twice (once in _ListJobFiles and
once in _ExtractJobID). This simplifies the code a little, and a couple...

a71f9c7d 06/11/2010 05:06 pm Guido Trotter

jqueue: Rename _queue_lock to _queue_filelock

The name clarifies the difference between this and the internal lock.
Also explain a bit better what it is.

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

6358dbc2 06/11/2010 05:06 pm Guido Trotter

jstore._ReadNumericFile: use utils.ReadFile

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

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

cdf158a8 06/11/2010 12:23 pm Guido Trotter

Remove locking._CountingCondition

This class is unused and untested. We must have forgot it around.

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

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

6df291d4 06/10/2010 10:57 pm Iustin Pop

Move fake hypervisor run dir under ganeti

This makes it uniform with the other hypervisors.

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

7f890059 06/10/2010 05:45 pm Guido Trotter

_BaseCondition: allow saving/restoring state

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

1a4e32d0 06/10/2010 05:45 pm Guido Trotter

SharedLock _acquire_restore and _release_save

If a shared lock is used inside a condition, we need to make sure that
it's reacquired in the same way as it was originally, after the wait.

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

66ecc479 06/10/2010 12:55 pm Guido Trotter

Submit[*each*]Pending job

This is useful so we can test both SubmitJob and SubmitManyJobs.

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

fc0726b9 06/09/2010 12:40 pm Michael Hanselmann

cfgupgrade: Local variable for cluster-domain-secret filename

This is necessary to allow cfgupgrade to work on a non-standard directory.

Signed-off-by: Michael Hanselmann <>
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 <>