Statistics
| Branch: | Tag: | Revision:

root / lib @ c46b9782

# Date Author Comment
c46b9782 07/06/2010 12:24 pm Luca Bigliardi

Add drbd_helper rpc call

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

15cf9cbb 07/06/2010 12:24 pm Luca Bigliardi

Check drbd usermode helper in cluster verify

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

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

Set drbd usermode helper on config upgrade

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

51cb1581 07/06/2010 12:24 pm Luca Bigliardi

Generalize a recursive check on logical disks

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

9e33896b 07/06/2010 12:24 pm Luca Bigliardi

Add drbd_usermode_helper to configuration

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

549071a0 07/06/2010 12:23 pm Luca Bigliardi

BaseDRBD: provide a way to query usermode_helper parameter

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

d3ce528b 07/05/2010 02:59 pm Iustin Pop

OpCreateInstance: do not require hv/be/os params

It is perfectly legal to create an instance using only defaults
(although beparams will be most times passed in), so let's relax the
requirement for these three parameters.

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

3d16a983 07/02/2010 06:01 pm Iustin Pop

A few more type definitions

This is to simplify the type declarations in the actual LUs.

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

e7736336 07/02/2010 06:01 pm Iustin Pop

Make _CheckDiskTemplate a valid type checker

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

b8812691 07/02/2010 06:01 pm Iustin Pop

Rework the "type" system

This patch merges the _OP_REQP and _OP_DEFS class attributes into a
_OP_PARAMS list, which holds both. The associated unittest checks that
all opcode attributes are declared and checked, and that no LU uses the
old fields (could be removed later)....

7486d752 07/02/2010 06:01 pm Iustin Pop

Remove _CheckBooleanOpField

This is no longer used, and we can remove it.

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

801b6a33 07/01/2010 05:31 pm Guido Trotter

Merge branch 'stable-2.1'

  • stable-2.1:
    Bump up version for 2.1.5 release
    RapiClient: fix multi-authentication in Python 2.6
    Remove rapi-user and rapi-pass from qa-sample.json
    qa: fix gnt-instance modify -t drbd
    qa: shutdown instance before trying disk convert...
14ff387e 07/01/2010 04:49 pm Guido Trotter

RapiClient: fix multi-authentication in Python 2.6

In Python 2.6 the urllib2.HTTPBasicAuthHandler has a "retried" count for
failed authentications. The handler fails after 5 of them. To solve this
we reset the handler's "retried" member variable to 0 after every...

ac492887 07/01/2010 03:14 pm Michael Hanselmann

utils.OwnIpAddress: Change try/except for Python 2.4

Python 2.4 doesn't support “except” and “finally” in the same block.

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

2a7c3583 07/01/2010 03:13 pm Michael Hanselmann

RAPI client: Switch to pycURL

Currently the RAPI client uses the urllib2 and httplib modules from
Python's standard library. They're used with pyOpenSSL in a very fragile
way, and there are known issues when receiving large responses from a RAPI
server.
...

b939de46 07/01/2010 03:12 pm Michael Hanselmann

baserlib: Use boolean type for boolean variables

This does not yet fix all issues in the RAPI interface which were
introduced with the type system. More testing is needed.

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

1a1296c8 07/01/2010 01:20 pm Guido Trotter

Fix check in gnt-instance modify -t

Currently when changing the instance disks the instance status (which
must be down) is only checked if the target status is among the mirrored
ones. This is incorrect: the instance must be down either way, even if
the desired final status is non-mirrored....

9c5885e2 07/01/2010 12:28 pm René Nussbaumer

Adding check_name option to the opcode and luxi call for instance rename

This will allow instance rename without dns check as it does for instance
add.

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

56e4c4a0 06/30/2010 04:58 pm Manuel Franceschini

Enable utils.OwnIpAddress to work with IPv6 addresses

Currently a TcpPing using the target address as source is used to
determine wheter or not an IP address belongs to a node. This does not
work for IPv6 anymore (I'm not sure why) as binding to IPv6 localhost as...

4b5e40a5 06/30/2010 04:46 pm Iustin Pop

Barebones LXC hypervisor

This needs lots of work, but it can successfully launch an LXC-based
instance. See the docstring for the limitations/work to be done.

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

5a672c30 06/30/2010 02:55 pm Manuel Franceschini

DRBD IPv6 support

Support IPv6 configuration for 'drbdsetup show' parser and add unittests
concerning that case. Renames some data files to use consistent names
clarifying their usage.

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Michael Hanselmann <>

cf0e6df7 06/30/2010 02:43 pm Manuel Franceschini

IPv6 support for utils.TcpPing()

Signed-off-by: Manuel Franceschini <>
Reviewed-by: Michael Hanselmann <>

2632795d 06/30/2010 02:32 pm Manuel Franceschini

Add function to retrieve family of an ip address

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

c0c3fa27 06/30/2010 02:32 pm Manuel Franceschini

Introduce utils.IsValidIP{4,6}()

This patch introduces functions to check for valid IPv4 and IPv6
addresses and converts IsValidIP() to return True if it is either a IPv4
or a IPv6 address.

For now we do not change the functional behavior and replace IsValidIP...

0fbd4b02 06/30/2010 01:55 pm Manuel Franceschini

Fix osparams bug when gnt-cluster modify'ing

Commit 625ac1135834c27a2e78fd61bf2df2ce29ad2966 introduced 'osparams'
slot in OPSetClusterParams which was not passed when invoked via
gnt-cluster modify.

Signed-off-by: Manuel Franceschini <>...

0d2cd893 06/30/2010 01:42 pm Manuel Franceschini

Introduce IPv6 constants

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

14f5f1b6 06/30/2010 01:42 pm Manuel Franceschini

Replace '0.0.0.0' with constant

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

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

1ee8e01a 06/29/2010 07:53 pm Guido Trotter

Pass force variant option at instance creation

This was supposed to be done in
"06073e857e3b518c7195d57306ae01793240c0c2" but by mistake the field was
added to batch create rather than the normal instance create.

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

23e0ef8c 06/29/2010 05:30 pm Guido Trotter

Fix a few uncommon pylint errors in compat.py

- It's ok if the optional modules functools, roman and hashlib are not there.
- It's ok to reference any and all before defining them. We're doing all
this exactly because, under python 2.4, they are undefined....

1e063ccd 06/29/2010 02:30 pm Guido Trotter

AsyncTerminatedMessageStream: send_message

This function adds the ability for a AsyncTerminatedMessageStream to
have a thread-safe message delivery function.

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

37e62cb9 06/29/2010 02:30 pm Guido Trotter

AsyncTerminatedMessageStream: limit message count

Currently the message stream can process any number of messages in
parallel (if they get dispatched to different threads or processes).
In order to limit their number we only handle messages and read from...

90d118fd 06/28/2010 06:46 pm Guido Trotter

Better specify old object slots removal policy

The comments seem to imply we can remove deprecated slots after 2.1 is
released. This is not quite true, if we still want to support upgrading
straight from 2.0. So let's specify better that they can be removed only...

d12f5c66 06/28/2010 04:25 pm Iustin Pop

Fix a type declaration error in LUTestAllocator

Also, improve logging of type errors, to ease debugging.

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

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