Statistics
| Branch: | Tag: | Revision:

root / lib @ 159d4ec6

# Date Author Comment
159d4ec6 11/02/2009 04:06 pm Iustin Pop

Remove the OpRetryError exception

This is only used in two places, in an error path that is no longer
valid since Ganeti 2.0. We remove the try..except since we should not
get it anymore (and if we do, then we should catch it in all
config.Update cases) and we remove the exception class completely....

3e53a60b 11/02/2009 02:07 pm Michael Hanselmann

Activate disks while exporting an instance

Exporting an instance not running or without activated disks
will fail. This patch makes sure to activate disks before
exporting an instance if it's in the ADMIN_down state.

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

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

Epydoc fixes

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

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

backend: Don't overwrite function parameter with loop variable

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

620a85fd 11/02/2009 10:22 am Iustin Pop

Unify the query fields for the storage framework

This patch unifies the query fields in the storage framework for all
types. Note that the information is still computed on-demand, so if e.g.
the used disk space is not requested for the ‘file’ type, it won't be...

8f215968 10/30/2009 12:46 pm Michael Hanselmann

Make cluster initialization more reliable

There was a race condition between starting the node daemon
and sending requests to write the ssconf files. With this
patch, the initialization waits up to ten seconds for the
node daemon to become responsive.

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

1df79ce6 10/29/2009 06:06 pm Michael Hanselmann

Don't show warnings on ADMIN_down instance failover

Before:
$ gnt-instance failover -f inst1
… checking disk consistency between source and target
… - WARNING: Can't find disk on node node21.example.com
… shutting down instance on source node

After:
$ gnt-instance failover -f inst1...

bf9bd8dd 10/29/2009 11:33 am Michael Hanselmann

http.auth: Add new function to verify passwords

This new function supports two schemes for passwords:
- Old-style cleartext passwords
- Hashed passwords according to RFC2617 (H(A1))

Schemes are differentiated by their prefix, a concept also
used in OpenLDAP. Cleartext passwords can no longer start...

c6f1af07 10/28/2009 03:49 am Iustin Pop

Fix another style issue

For the Nth time, re-fix shadowing of outer-scope variable :)

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

20eca47d 10/28/2009 03:22 am Iustin Pop

Fix an error handling case in TLReplaceDisks

pylint is your friend, since the compiler doesn't exist.

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

a4eae71f 10/27/2009 03:14 pm Michael Hanselmann

Provide feedback from redistributing configuration

This is particularily useful for “gnt-cluster redist-conf”, but
also for all other cases where the configuration files are
rewritten on other nodes.

$ gnt-cluster redist-conf
… Copy of file /var/lib/ganeti/config.data to node … failed: Error while...

e9022531 10/27/2009 02:54 am Iustin Pop

Fix gnt-node evacuate w. iallocator

Commit 2bb5c911 moved around and changed the _RunAllocator function in
the DiskReplace → TaskLet conversion, but in the process it changed the
relocate_from argument from a list of nodes to just the secondary node.
This breaks the protocol and current iallocator scripts....

19351457 10/26/2009 04:48 pm Guido Trotter

InstanceIpToNodePrimaryIpQuery: use a query dict

In 95b487b we changed InstanceIpToNodePrimaryIpQuery to be able to query
multiple instances at once. We also need to be able to query ips
belonging to a specific nic link, so what we do is:

1) Move the "query" argument to a dict, containing different fields...

cd195419 10/26/2009 04:48 pm Guido Trotter

SimpleConfigReader: ips are partitioned by link

We were already half-doing it, but this completes the process.

1) We don't maintain a list of ips or an ip->instance map
2) We add a new link,ip->instance map (link->ips list we had)
3) We add the link parameter to GetInstanceByIp (making it...

47a626b0 10/26/2009 12:17 pm Guido Trotter

SimpleConfigReader: queries for default nicparams

GetDefaultNicParams returns the default nic parameters.
GetDefaultNicLink returns the default nic link.

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

6855f043 10/26/2009 12:17 pm Guido Trotter

Import errors in confd init

It's used by some functions defined there.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

b5e5632e 10/26/2009 11:41 am Iustin Pop

Allow '@' in tag values

This allows using an email address (as is) as part of a tag. The main
problem that could arise is when parsing tags from a shell script, but
(AFAIK) '@' is not a special character when used in values (happy to be
corrected if not true)....

d52ea991 10/23/2009 12:01 pm Michael Hanselmann

cmdlib._AssembleInstanceDisks: Fix case where variable wouldn't be set

The “result” variable may not be set and/or come from the previous loop.

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

8866ec86 10/22/2009 06:15 pm Guido Trotter

KVM netscript: add static routes, with no suffix

The /32 suffix is useless, since the kernel already assumes single-host,
if no suffix is specified. Moreover we prefer these routes to be
"static" so that routing daemons, if present, won't mess with them....

b989b9d9 10/22/2009 04:40 pm Ken Wehr

Adding '--no-ssh-init' option to 'gnt-cluster init'.

Allows the initialization of a cluster without the creation or distribution
of SSH key pairs. Includes changes for LeaveCluster and RPC.

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

2c5afffb 10/22/2009 04:40 pm Guido Trotter

KVMHypervisor: implement instance policy routing

Until now we relied on traffic from instances being policy routed via a
rule based on the instance network. With this change we can enforce it
on the instance interfaces. Since the ip rules survive interface...

e014f1d0 10/22/2009 04:40 pm Guido Trotter

KVMHypervisor: configure v6 parameters on nic

In routing mode we are tweaking a few parameters on the interface. With
this patch we'll tweak both the v4 and v6 ones.

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

95b487bb 10/22/2009 04:40 pm Flavio Silvestrow

confd: query the pnode of multiple instances at once

Signed-off-by: Flavio Silvestrow <>
Signed-off-by: Guido Trotter <>
Reviewed-by: Guido Trotter <>

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

Try to reduce wrong errors in InstanceShutdown

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

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

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

Revert breakage introduced in e4e9b80

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

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

0cf11e68 10/22/2009 12:15 pm Iustin Pop

Xen: Ignore the retry argument in stop instance

Commit 4ad4511 changed the KVM hypervisor to send multiple shutdown
requests to the monitor, but it didn't change this for the Xen
hypervisor. We simply remove the return on retry model, since we do want
to send multiple shutdown signals for both Xen and KVM (even if the...

1645d22d 10/21/2009 12:26 pm Michael Hanselmann

Ensure RpcResult has “payload” attribute

Also add assertions to avoid missing attributes in the future.
They won't be included in optimized bytecode.

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

7c0aa8e9 10/20/2009 06:53 am Iustin Pop

Introduce checks for /sys and /proc

This patch adds checks for /proc and /sys in cluster verify, since
Ganeti relies on these special filesystems to be mounted.

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

d357f531 10/19/2009 05:57 pm Michael Hanselmann

Fix serializer unittests

Commit d22b29997cd broke the serializer unittests with certain
versions of simplejson. This patch removes sort_keys again
and implements a slightly more efficient way of detecting
simplejson functionality. The serializer unittests no longer...

c008906b 10/16/2009 05:51 pm Michael Hanselmann

bootstrap: Factorize HMAC key generation

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

cd34faf2 10/16/2009 05:51 pm Michael Hanselmann

Make bootstrap._GenerateSelfSignedSslCert public

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

d22b2999 10/16/2009 05:51 pm Michael Hanselmann

serializer: Sort keys in JSON

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

a6db1af2 10/15/2009 05:47 pm Michael Hanselmann

mcpu: Use new timeout class for timeout

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

f4e673fb 10/15/2009 05:47 pm Michael Hanselmann

locking: Convert pipe condition to new timeout class

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

7e8841bd 10/15/2009 05:47 pm Michael Hanselmann

locking.LockSet: Move timeout calculation to separate class

This class can also be used by mcpu.

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

b6b87034 10/15/2009 05:47 pm Michael Hanselmann

locking, mcpu: Ensure timeout is always >= 0.0

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

e4335b5b 10/13/2009 08:08 pm Michael Hanselmann

locking.LockSet: Improve assertions

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

76e2f08a 10/13/2009 08:08 pm Michael Hanselmann

locking: Factorize LockSet.acquire

By moving the main code of LockSet.acquire to its own function
we reduce the code complexity a bit and clarify the exception
handling.

This also fixes a case where a lock acquire timeout wasn't
handled correctly, leading to obscure error messages....

6f14fc27 10/13/2009 08:08 pm Michael Hanselmann

mcpu: Make sure added locks are released on errors

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

fc1baca9 10/13/2009 08:08 pm Michael Hanselmann

opcodes: Add missing shutdown_timeout to OpRemoveInstance

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

63d96e4c 10/13/2009 08:08 pm Michael Hanselmann

luxi: Pass socket path directly to exception, not in tuple

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

4d98c565 10/13/2009 04:02 pm Guido Trotter

gnt-* use the correct opcode slot to build opcodes

gnt-* scripts were building wrong opcodes for commands which had the
shutdown_timeout slot (due to missing testing after renaming). Fixing.

Also change SHUTDOWN_TIMEOUT_OPT dest field name to "shutdown_timeout":...

64246438 10/13/2009 03:03 pm Iustin Pop

rapi: fix tag operations

This patch fixes the tag PUT/DELETE operations, and additionally changes
the Tags* functions to take only positional and not keyword arguments
(the defaults do not make any sense at all, and they are always called
with all arguments)....

7e5eaaa8 10/13/2009 01:24 pm Guido Trotter

cli: add SHUTDOWN_TIMEOUT_OPT

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

17c3f802 10/13/2009 01:24 pm Guido Trotter

Add timeout options to other LUs

All the LUs that shut down the instance need to be able too pass the
timeout parameter as well.

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

e3200b18 10/12/2009 01:48 pm Michael Hanselmann

mcpu: Change lock attempt timeout calculation

With this patch all timeouts are pre-calculated. The interface of
the _LockTimeoutStrategy class is also changed a bit; NextAttempt
now returns a new instance.

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

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

Code and docstring style fixes

Found using pylint and epydoc.

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

211b6132 10/12/2009 01:47 pm Michael Hanselmann

mcpu: Improve lock reporting with timeouts

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

407339d0 10/12/2009 01:47 pm Michael Hanselmann

mcpu: Implement lock timeouts

The timeout is always between ~0.1 and ~10.0 seconds. A small
variation of ±5% is added to prevent different jobs from
fighting each other. After 10 attempts to acquire the locks with
a timeout, a blocking acquire is made.

Lock status reporting will be improved in a separate patch....

6b95b76d 10/12/2009 01:47 pm Michael Hanselmann

mcpu: Remove unused exclusive_BGL attribute

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

5aab242c 10/12/2009 01:46 pm Michael Hanselmann

locking.LockSet: Implement acquire timeouts

The timeout passed to LockSet.acquire() is measured over all lock acquires. If
LockSet.acquire fails to acquire all requested locks within the specified
amount of time, all locks are released again and the acquire fails....

6263189c 10/09/2009 06:28 pm Guido Trotter

Accept shutdown timeout from the user

Using the new --timeout option:

- gnt-instance shutdown is changed to accept a timeout
- the opcode is changed to hold one
- the LU is changed to optionally get one
- the rpc is changed to carry one
- the backend is changed to take it as a parameter rather than...

a2771c83 10/09/2009 06:02 pm Guido Trotter

ChrootManager: clean StopInstance

Currently it has lots for duplicated code, and internal retries.
Clean it up with the following assumptions:

We'll probably be called more than once.
It is ok to fail to stop, unless we're called with force=True.
If we're called only once, and with force=True it's ok not to run the...

b5762e2a 10/09/2009 06:02 pm Guido Trotter

cli: add a timeout option

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

4ad45119 10/09/2009 06:02 pm Guido Trotter

KVMHypervisor: use the StopInstance retry feature

Since we know StopInstance is going to be called more than once (at
least twice, once with force and once without, but normally quite a lot
more) we don't need our own sleep/loop, and we can just send one monitor...

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

backend.InstanceShutdown: small cleanup

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

88cd08aa 10/09/2009 06:01 pm Guido Trotter

Add default instance shutdown timeout constant

It reflects the "current" two minutes we give to the instance.

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

07b49e41 10/09/2009 06:01 pm Guido Trotter

Hypervisors: Add retry= to StopInstance

Currently some hypervisors need the stop operations to be retried more
than once, while other ones only do it in one pass. With this change
we'll handle retries outside the hypervisor code, but telling whether
this is the first try or not....

6915bc28 10/09/2009 05:28 pm Guido Trotter

Get rid of utils.CommaJoin

- We never remember to use it (5 uses vs 21 " ,".join())
- It's longer to write than " ,".join()
- The added value of the apostrophe in the string is not very much

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

bcdf16d7 10/07/2009 12:31 pm Guido Trotter

Match instance and node names case insensitively

Since DNS cannot contain two names with different cases anyway, this
should be ok.

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

256eb94b 10/07/2009 12:31 pm Guido Trotter

Add case_sensitive keyword to MatchNameComponent

Now featuring unit testing, and more deterministic results on some
corner cases.

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

6e6bb8d5 10/06/2009 03:35 pm Guido Trotter

VNC password: move to hv param and use in kvm

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

f2c05717 10/05/2009 12:47 pm Guido Trotter

Check the OS name for variants

If an OS supports variants, unless --force-variant is specified a valid
variant must be passed.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

47804ec9 10/05/2009 12:47 pm Guido Trotter

Add force_variant slot to Create/ReinstallInstance

These two opcode need to know whether an unknown variant must be forced
through or not.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

06073e85 10/05/2009 12:47 pm Guido Trotter

Allow --force-variant for instance add/reinstall

Passing this option makes an undeclared variant be passed to the os "as
is", hoping it'll be able to figure it out (as per the design doc).

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

e3ac208c 10/05/2009 12:46 pm Guido Trotter

Update client os lists to name+variant format

List of OSes are displayed by gnt-os list, rapi, and gnt-instance
reinstall --select-os, and checked by burnin. In all of these show the
list with name+variant, if the os has variants.

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

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

Add slot and constant for supported OS variants

The slot will contain a list of variants, and the variants file constant
contains the file in the os dir which is supposed to hold the list.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

95075fba 10/05/2009 12:39 pm Guido Trotter

Populate OS variants if an api >= 15 is present

Adding the file name to the os_files dict will fill in the full path and
get it checked, if present we also read it and split into lines, one per
declared variant.

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

f11280b5 10/05/2009 12:39 pm Guido Trotter

OSEnvironment: populate OS_VARIANT

According to the design on api_version >= 15 the OS variant is the part
of the OS name after the "+" sign. If none is found, we just pass in the
first variant an OS declares (which is bound to exist, as we check for
it in _TryOSFromDisk)....

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

OSFromDisk: handle variants when loading os

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

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

ba00557a 10/05/2009 12:39 pm Guido Trotter

Add per-node variants list to OS diagnose output

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

1e288a26 10/05/2009 12:39 pm Guido Trotter

Add "variants" field to LUDiagnoseOS

If selected this field will contain a list of os variants supported on
all nodes.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

07150497 10/05/2009 12:39 pm Guido Trotter

cli.CalculateOSNames

Given an os and its variants, return a list of "full" os names.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

84e3f66f 10/05/2009 12:39 pm Guido Trotter

Fix rpc.call_os_get to actually return the OS

Since nobody ever read the actual OS object, this bug was introduced in
the rpc conversion.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

b6b45e0d 10/05/2009 12:39 pm Guido Trotter

Convert os api version file name to a constant

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

41ba4061 10/05/2009 12:39 pm Guido Trotter

TryOSFromDisk: s/os_scripts/os_files/

We'll be using this dict/loop to check more than just scripts, so we're
renaming the variables appropriately.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

0757c107 10/05/2009 12:39 pm Guido Trotter

TryOSFromDisk: only check actual os scripts for +x

Currently all checked files in the loop are os scripts, so nothing will
change, but in the future we only want the +x bit on actual os scripts,
not necessarily all files.

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

2f2dbb4b 10/05/2009 12:31 pm Jun Futagawa

Add support for using the bootloader in xen-pvm

This patch adds three optional parameters:
- 'use_bootloader', whether use or not the bootloader
- 'bootloader_path', absolute path to the bootloader
- 'bootloader_args', extra arguments to the bootloader...

f1501b3f 10/02/2009 06:52 pm Michael Hanselmann

Replace all xrange() with range()

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

008b92fa 10/02/2009 03:04 pm Michael Hanselmann

More locking tests race conditions fixes

There were more race conditions. By adding a notify function to
SharedLock.acquire we can prevent them.

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

3d9eb52b 10/02/2009 11:59 am Guido Trotter

LUSetNodeParams: autopromote self when needed

If we're de-offlining or de-draining a node we need to promote it to MC
if we have not enough, or the config will be corrupt.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

6d7e1f20 10/02/2009 11:58 am Guido Trotter

Abstract self-promotion decision

During node add we decide whether to self promote to an MC. Abstract
this decision making to a separate function.

Signed-off-by: Guido Trotter <>
Reviewed-by: Olivier Tharan <>

44485f49 10/02/2009 11:58 am Guido Trotter

Fix master candidate removal

Currently during a master candidate removal, when it's possible to
promote another node, the removal operation fails because of a corrupt
config before it's even possible to do the promotion. Fixing this by
doing the promotion before, excluding the current node....

8fbf5ac7 10/02/2009 11:58 am Guido Trotter

LUSetNodeParams: Don't break config on mc demotion.

If --force is used to demote an MC, but then there are not enough MCs in
the cluster, the configuration gets corrupted until a node is promoted.

In order to avoid that we only allow demotion with --force if the node...

e623dbe3 10/01/2009 08:37 pm Guido Trotter

Master candidate stats, return one more value

Other than returning the current number of candidates, and the number of
desired and possible candidates, we also return the maximum possible
number, even if greater than our desires. All callers for now ignore...

34cb5617 10/01/2009 07:47 pm Guido Trotter

SingleActionPipeCondition =~ s/Action/Notify/

With this patch we simplify usage on the SingleActionCondition (which
wasn't a condition at all) by making it a real condition. This way we
can just wait() on it, or notifyAll() as we would on a normal one. The...

2419060d 10/01/2009 07:45 pm Guido Trotter

Abstract "base" condition code in a separate class

Each condition has an underlying lock, the acquire and release methods,
and a few helper methods to check that it's called in the proper way.

Abstract them to a separate class so we can have more than one without...

a66bd91b 10/01/2009 07:35 pm Michael Hanselmann

locking.SharedLock: Fix bug in delete function

SharedLock.__acquire_unlocked uses keyword parameters. Just passing
the timeout would set the “shared” parameter.

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

5e0a6daf 10/01/2009 07:17 pm Michael Hanselmann

Rename LockSet.acquire parameter “blocking” to “timeout”

Also remove the “blocking” parameter from LockSet.remove and
GanetiLockManager.remove. There's no point in implementing timeouts on removal
unless we need them.

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

c6997f21 09/30/2009 06:35 pm Michael Hanselmann

Change SharedLock to new pipe(2)-based condition

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

48dabc6a 09/30/2009 06:34 pm Michael Hanselmann

Add _PipeCondition class

_PipeCondition is a condition implemented using pipe(2) and poll(2).
It allows the implementation of timeouts without using a busy-wait loop
with time.sleep.

Unlike Python's built-in threading.Condition class and to save file
descriptors and an internal queue, it can only be used to notify...

d76167a5 09/30/2009 06:34 pm Michael Hanselmann

Add _SingleActionPipeCondition class

This class will be used as a basic block for pipe(2)-based
conditions. Upon initialization it creates a pipe and can be
notified once (hence the “single action” in the name). A
callable helper class is used to wait for notifications....

84e344d4 09/30/2009 06:33 pm Michael Hanselmann

SharedLock: implement timeouts

This patch greatly simplifies the SharedLock code and implements
timeouts for the acquire() and delete() functions. A wrapper around
Python's threading.Condition class must be used to ensure thread
safety when check whether there are any waiters left....

23824641 09/30/2009 05:49 pm Luca Bigliardi

Extend confd instances ips query

The query now accepts a link parameter.

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

c8872a0b 09/30/2009 03:59 pm Iustin Pop

Merge remote branch 'origin/master' into mogu

  • origin/master:
    Fix burnin's verbose mode
    Final NEWS update and version increase for 2.0.4
    Encode the actual exception raised by LU execution
    Move the luxi error handling into errors.py
    Fix the confusing ssh/hostname message in node add...
a5229439 09/29/2009 01:06 pm Guido Trotter

confd/client: make it possible to update peer list

Until now the peers have to be the same all the time. Adding a new
function to update the list, and call it from the constructor to avoid
duplicating code.

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

5f6f260a 09/28/2009 06:58 pm Guido Trotter

confd/client: pass self to upcalls

It may be handy for upcalls to know which client called them, and call
it back. So we create a new "client" field in the upcall target,
containing the current client instance

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

a9613def 09/28/2009 12:37 pm Guido Trotter

ConfdFilterCallback: fix a bug in expire

The HandleExpire function takes the whole "up" structure, and not just
the salt.

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

e6345c35 09/25/2009 06:56 pm Iustin Pop

Encode the actual exception raised by LU execution

Currently, the actual exception raised during an LU execution (one of
OpPrereqError, OpExecError, HooksError, etc.) is lost because the
jqueue.py code simply sets that to a str(err), and the code in cli.py...

a6607331 09/25/2009 06:56 pm Iustin Pop

Move the luxi error handling into errors.py

Currently the luxi error handling is hardcoded as special encoding on
the masterd-side and special decoding on the client side. This patch
moves it to errors.py such that other parts of the code can reuse the
same encoding....