Statistics
| Branch: | Tag: | Revision:

root @ 560cbec1

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

c51580b3 06/14/2010 07:53 pm Guido Trotter

Add missing directory from Makefile.am

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

89c04c2d 06/14/2010 07:41 pm Guido Trotter

Add example gnt-debug submit-job json files

These files are being used to test the job queue performance with
various changes and conditions. Adding them here for posterity.

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

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

ca9ec5aa 06/11/2010 01:08 pm Michael Hanselmann

Improve import-export unittest a bit

- Increase timeouts from 10 to 30 seconds (this still breaks when the
machine is busy, e.g. using bonnie++)
- Depend on only one timeout per test instead of three
- Reset variables before each test

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

4dd97aa1 06/11/2010 01:08 pm Michael Hanselmann

Test client timeout for import-export daemon

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

d6547a1c 06/11/2010 01:08 pm Michael Hanselmann

Generate import-export unittest certs in parallel

Generating certificates can be slow.

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

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

7172f605 06/10/2010 12:17 pm Michael Hanselmann

Add unittest for ganeti-cleaner

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

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

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

Start to prepare documentation for 2.2 release

- Update NEWS file
- Remove dependency on OpenSSL (pyOpenSSL remains)
- Update manpages, fix typos and other things

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

94182b63 06/08/2010 10:35 pm Iustin Pop

gnt-job auto-completion: suggest "all" too

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

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

import/export: Allow script to predict size

Once we have a size for an export (in the context of the
import/export daemon), we can provide the user with a
percentage and ETA.

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

2ad5550d 06/08/2010 04:12 pm Michael Hanselmann

backend: Enable export size prediction

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

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

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

import/export daemon: Record amount of data transferred

This reports the amount of data transferred and the throughput (averaged
over 60 seconds) to the master daemon. While not yet fully implemented,
once the export scripts report the expected data size, we can even provide...

1a2e7fe9 06/08/2010 04:12 pm Michael Hanselmann

import/export: Show progress updates to user

With this patch, we show progress updates approx. once per minute.

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

158377f3 06/04/2010 08:05 pm Guido Trotter

ensure-dirs: don't fail if no rapi log is present

Sometimes a node has never been a master. Or ran rapi. In that case we
need to create the file (because if later rapi gets started, it won't be
able to create it itself).

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

92fd2250 06/04/2010 06:05 pm Iustin Pop

Introduce harcdoded timeouts for each RPC call

This patch adds a table with per-opcode timeouts. They were chosen in an
empiric, rather than scientific, way - see the comments in lib/rpc.py.

The patch also shows how custom timeouts can be used - call_test_delay...

e0036155 06/04/2010 05:26 pm Iustin Pop

http client: support per-request read timeout

Currently, the read timeout is hardcoded in the
HttpClientRequestExecutor class. The patch changes the timeout so that
it's a per-request property, and makes the rpc.Client class pass one
explicitly in. Furthermore, we modify the rpc.RpcRunner class to support...

46a8da3b 06/04/2010 05:23 pm René Nussbaumer

Let daemon-utils fix the owners for ganeti-rapi

This is a workaround until we fully switched to user separation and fixes the
owners of directories/log files so ganeti-rapi will start flawlessly. This is
right now run for every daemon but as it operates on a relatively small subset...

bbfd0568 06/04/2010 05:23 pm René Nussbaumer

Modify ganeti-masterd to set permission and owner of masterd-socket

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

8b72b05c 06/04/2010 05:22 pm René Nussbaumer

Let ganeti-rapi run under a different user/group

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

743b53d4 06/04/2010 05:22 pm René Nussbaumer

Make it possible to call utils.Daemonize with uid and gid to run as

Signed-off-by: René Nussbaumer <>
Reviewed-by: Guido Trotter <>

0d150c50 06/04/2010 05:22 pm René Nussbaumer

Adding customized user/group as configure flags

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

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...
297e6e53 06/04/2010 04:22 pm Guido Trotter

_ExecuteKVMRuntime: fix hv parameter fun

When executing the kvm runtime we were currently accessing a mix of the
parameters as configured currently on the instance and the ones it was
started with. We were doing it without a precise criteria, but quite by...

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

Update FinalizeMigration docstring

This is used not only for aborted migrations, so the docstring should
reflect that.

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

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

7cf722ea 06/04/2010 04:22 pm Guido Trotter

NEWS: add release date for 2.1.3

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

f8ea4ada 06/04/2010 12:44 pm Michael Hanselmann

utils: Add function to format seconds

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

722702e3 06/03/2010 03:55 pm Guido Trotter

Bump up version for the 2.1.3 release

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

0fb44e89 06/03/2010 03:43 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    TestAsyncUDPSocket: remove dead code and add test
    TestAsyncUDPSocket: test for oversized sends
    Document the check-man change
    Update NEWS for Ganeti 2.1.3
    Second attempt at fixing check-man
    Fix check-man for newer man-db...
41a2e7d7 06/03/2010 01:56 pm Michael Hanselmann

import/export unittest: Test large(r) transfer

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

53dbf14c 06/03/2010 01:56 pm Michael Hanselmann

import/export unittest: Improve logging and fix one race condition

Apart from improved logging, one race condition is fixed. If
the destination's status file became available, the port would
be returned immediately, even if it was still “None”. Most of
the time it worked, but not always. Now an additional check...

cdd7f900 06/03/2010 01:48 pm Guido Trotter

Convert ganeti-masterd's main thread to mainloop

Not much changes with this patch. The main loop for the IOServer is
repaced by mainloop.Run() and the main thread now uses asyncore to
handle connections to the master socket. Once it accepts them, though,...

495ba852 06/03/2010 01:48 pm Guido Trotter

daemon.AsyncAwaker

This new asyncore dispatcher can be used to force a thread running the
asyncore loop to awake from the select, by signaling it on one of its
selected sockets.

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

a4b605ae 06/03/2010 01:48 pm Guido Trotter

daemon.AsyncStreamServer

This is a new asyncore server which handles listening stream sockets by
calling a non-implemented function for each connection it accepts. It's
the stream-oriented cousing of the AsyncUDPSocket.

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

b66ab629 06/03/2010 01:48 pm Guido Trotter

daemon.AsyncTerminatedMessageStream

This is the counterpart of the AsyncStreamServer can be used to handle
connected sockets returned from connected clients if the protocol is a
terminator separated message stream. Nothing in this class is server
specific though: it can be used as a client as well, if the client is...

18215385 06/03/2010 01:48 pm Guido Trotter

Test the new streaming daemon classes

Unittests cover AsyncStreamServer and AsyncTerminatedMessageStream with
both tcp and unix sockets.

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

db147305 06/03/2010 12:39 pm Tom Limoncelli

ganeti-watcher should attempt to fix ganeti-rapi

Update ganeti-watcher so that it tests the master's RAPI port with a
simple test (in this case GetVersion). If it fails, make one attempt
at restarting ganeti-rapi and retest.

- daemons/ganeti-watcher: Test rapi and make one attempt at restarting it....

95ab227e 06/02/2010 08:55 pm Guido Trotter

TestAsyncUDPSocket: remove dead code and add test

- _ThreadedClient was added on the idea of making this unittest
concurrent, which was actually never done (we could test everything
without it, so well)
- handle_write() was never called without filling the send queue, and...

e9de7da4 06/02/2010 08:54 pm Guido Trotter

TestAsyncUDPSocket: test for oversized sends

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

1de45c78 06/02/2010 08:39 pm Guido Trotter

Document the check-man change

Since this affects developers' systems, document it in NEWS and
devnotes.rst

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

14d91053 06/02/2010 08:39 pm Guido Trotter

Update NEWS for Ganeti 2.1.3

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

546d7c4f 06/02/2010 06:09 pm Iustin Pop

Second attempt at fixing check-man

I was wrong, actually LANG-vs-LC_ALL only fixed one case, by mistake. To
get proper UTF-8 encoding, we need to enforce any UTF-8 locale. We
choose the 'default' of en_US.UTF-8.

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

e68cb187 06/02/2010 05:14 pm Iustin Pop

Fix check-man for newer man-db

Again, check-man :)

Commit 5fa1642226 removed LC_ALL=C, since that breaks the check.
However, with no LANG/LC_* variables, man-db is still broken.

We import the new lintian behaviour, i.e. LANG=C (which seems to differ
from LC_ALL=C, even with empty environment). I'm not sure of the...

1948e5fe 06/01/2010 08:47 pm Balazs Lecz

Add RemoveDir utility function

Backported from master, 72087dcd5b06c0127e2ec3bf8c80f7f54da3fb01

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

ff18f526 06/01/2010 08:31 pm Guido Trotter

Merge remote branch 'origin/devel-2.1'

  • origin/devel-2.1:
    Explicitely return None from IgnoreSignals
    AsyncUDPSocket: fix IgnoreSignals usage and test
    Add KVM chroot feature
    Fix and Improve TryToRoman unittest

Conflicts:
test/ganeti.daemon_unittest.py...

6e7e58b4 06/01/2010 08:22 pm Guido Trotter

AsyncUDPSocket: fix IgnoreSignals usage and test

This bug was found in the asyncore master patch series, but actually
applies to 2.1 for AsyncUDPSocket as well.

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

2fd7f564 06/01/2010 08:22 pm Guido Trotter

Explicitely return None from IgnoreSignals

Same result, but what happens is clearer.

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

547a63b7 06/01/2010 08:18 pm Balazs Lecz

Add KVM chroot feature

This patch adds a new boolean hypervisor parameter to the KVM hypervisor,
named 'use_chroot'.
If it's turned on for an instance, than KVM is started in "chroot mode":
Ganeti creates an empty directory for the instance and passes the path...

a01b500b 06/01/2010 07:40 pm Michael Hanselmann

utils: Add function to check whether process handles a signal

This will be used to avoid a race condition between starting a program (dd
for import/export) and sending signals to it.

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

855bffd2 06/01/2010 07:40 pm Guido Trotter

Fix and Improve TryToRoman unittest

1) Don't break when the roman module is not found
2) Test that not finding the roman module doesn't make TryToRoman fail
(currently that is the case)

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

424f51ec 06/01/2010 07:39 pm Michael Hanselmann

move-instance: Use error message instead of multiple state variables

Until now, move-instance used different status variables: “success”,
“abort” and “error_message”. With this patch, everything is changed
to use “error_message” only. This simplifies the code a bit....

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

d4d1e3dd 06/01/2010 01:37 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    Convert gnt-instance list and info to use roman
    gnt-cluster info --roman
    FormatUidPool: provide optional roman conversion
    gnt-node: remove latinfriendlyfields
    Move roman conversion to compat
    Add a new opcode timestamp field...
e2736e40 06/01/2010 01:25 pm Guido Trotter

Convert gnt-instance list and info to use roman

Finally gnt-instance has roman support as well.

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

d729e03a 06/01/2010 01:25 pm Guido Trotter

gnt-cluster info --roman

Convert to roman (if so the user wishes) the following:
- cluster candidate size
- uid pool
- any integer be or hv parameter

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

196ec587 06/01/2010 01:24 pm Guido Trotter

FormatUidPool: provide optional roman conversion

The convert= option of compat.tryToRoman is used to do optional
conversion without duplicating formatting code.

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

cc5b94db 06/01/2010 01:23 pm Guido Trotter

gnt-node: remove latinfriendlyfields

Rather than relying on a static list of fields, we opportunistically
convert all integers.

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

6396164f 06/01/2010 01:22 pm Guido Trotter

Move roman conversion to compat

The new TryToRoman function provides optional easy to use roman
conversion. Nunc cum demonstrationi unitati.

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

999847c8 06/01/2010 12:08 pm Guido Trotter

ssconf: error out when writing oversized files

Since we impose a maximum limit when reading ssconf files, let's error
out when trying to write them too big, so we don't pretend everything is
ok, and make mistakes when we actually read partial files.

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

b9b5abcb 06/01/2010 11:47 am Iustin Pop

Add a new opcode timestamp field

Since the current start_timestamp opcode attribute refers to the inital
start time, before locks are acquired, it's not useful to determine the
actual execution order of two opcodes/jobs competing for the same lock.

This patch adds a new field, exec_timestamp, that is updated when the...

14aeab22 06/01/2010 11:39 am Guido Trotter

Fix IgnoreSignals on socket.error

Some confusion arose handling EINTR on this function: in python 2.6
socket.error is an IOError, and thus:
- It's an EnvironmentError
- It has an .errno member

In 2.4 and 2.5 it's not, and so its errno variable must be extracted...

c3c5dc77 06/01/2010 11:34 am Guido Trotter

Master core scalability design doc

This initial design still lacks information about the job queue lock
contention decrease.

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

37e1e262 06/01/2010 11:34 am Guido Trotter

design-2.2: job queue lock analysis/remediation

This builds up on the "Master core scalability design doc" detailing the
critical situations in the job queue and proposing how to fix them. The
bulleted point list at the beginning is changed to subparagraph, as the...

e3cc4c69 06/01/2010 11:34 am Guido Trotter

reraise exceptions in async tests' error handlers

This makes sure that any unforeseen error raises an exception rather
then just increasing a counter. It makes unittest debugging a lot
easier.

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

716a32cb 06/01/2010 11:34 am Guido Trotter

Move hash functions to the compat module

Since the hash functions' changed their module name between python 2.4
and 2.6, and we have to do an try/import/except trick, we'll do it just
once, for both hash functions, and in compat.py. This also fixes a use...

965d0e5b 06/01/2010 11:34 am Guido Trotter

Fix {Ignore, RetryOn}Signals on socket.error

Some confusion arose handling EINTR on those functions: in python 2.6
socket.error is an IOError, and thus:
- It's an EnvironmentError
- It has an .errno member

In 2.4 and 2.5 it's not, and so its errno variable must be extracted...

2652b363 05/31/2010 08:17 pm Tom Limoncelli

RAPI client should convert urllib2.URLError to GanetiApiError

Signed-off-by: Tom Limoncelli <>
Reviewed-by: Michael Hanselmann <>

e43d4f9f 05/31/2010 03:16 pm Apollon Oikonomopoulos

KVM: Migration bandwidth and downtime control

Introduce 2 new hypervisor options, migration_bandwidth and migration_downtime
and implement KVM migration bandwidth and downtime control.

migration_bandwidth controls KVM's maximal bandwidth during migration, in...

b73360e3 05/31/2010 01:02 pm Balazs Lecz

Make utils.EnsureDirs() ignore umask

EnsureDirs() should create directories with the exact mode requested
in the arguments, but it currently applies the umask.
This patch makes it independent from the umask.

Signed-off-by: Balazs Lecz <>...

bb44b1ae 05/28/2010 07:50 pm Michael Hanselmann

import/export daemon: Move command building into separate module

The import/export daemon code is already large. Moving some code
to a separate module will make it smaller and easier to test.

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

34c9ee7b 05/28/2010 07:50 pm Michael Hanselmann

import/export daemon: Move some I/O processing code to module

The code parsing the child process' output is moved to a separate
class in the impexpd module. As more programs are added, it'll
become more complex and should be separated.

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

1e915b86 05/28/2010 07:33 pm Michael Hanselmann

import/export daemon: Move command building into class

Instead of passing around many variables for building the executed
command, they're now kept as instance variables.

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

84c08e4e 05/28/2010 03:37 pm Balazs Lecz

Add KVM chroot feature

This patch adds a new boolean hypervisor parameter to the KVM hypervisor,
named 'use_chroot'.
If it's turned on for an instance, than KVM is started in "chroot mode":
Ganeti creates an empty directory for the instance and passes the path...

72087dcd 05/28/2010 03:36 pm Balazs Lecz

Add RemoveDir utility function

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

e0561198 05/27/2010 02:43 pm Iustin Pop

Fix two race conditions in reboot instance

If the instance crashes between backend.InstanceReboot checks the list
of running instances and the execution of hv_xen.RebootInstance,
ini_info will be None. And if the instance doesn't reboot fast enough,
new_info will be None. Both cases lead to “TypeError: unsubscriptable...

31d97b2a 05/25/2010 06:57 pm Guido Trotter

Support for latin friendly output in node list

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

fadc3742 05/25/2010 02:30 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    Test for errors during inotify callback
    SingleFileEventHandler: Remove try/except blocks
    ErrorLoggingAsyncNotifier
    daemon.GanetiBaseAsyncoreDispatcher

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

7678409f 05/25/2010 01:16 pm Guido Trotter

Test for errors during inotify callback

- Create a new _MyErrorLoggingAsyncNotifier class which registers
error counts, rather than logging them
- Add an additional ERR notifier to test with
- Check that no error was returned, for tests that weren't supposed to...

32b1efa1 05/25/2010 01:16 pm Guido Trotter

SingleFileEventHandler: Remove try/except blocks

Since now we use the SingleFileEventHandler together with an error
handling asyncore dispatcher, we don't need the internal try/except
anymore.

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

e9c8deab 05/25/2010 01:16 pm Guido Trotter

ErrorLoggingAsyncNotifier

This mixes AsyncNotifier with GanetiBaseAsyncoreDispatcher to provide an
AsyncNotifier which will log errors, rather than bail out.

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

b11780bb 05/25/2010 01:16 pm Guido Trotter

daemon.GanetiBaseAsyncoreDispatcher

Abstract a few common functionalities between all ganeti asyncore
dispatchers:
- Handle errors by logging them, and then continue
- By default check sockets only for readability

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

17931833 05/24/2010 01:12 pm Guido Trotter

Merge branch 'devel-2.1'

  • devel-2.1:
    TestSingleFileEventHandler: abstract notifier type
    Mainloop: handle SIGINT as well (and terminate)
    SingleFileEventHandler: update comments

Signed-off-by: Guido Trotter <>
Reviewed-by: Balazs Lecz <>

49f986e7 05/24/2010 01:00 pm Guido Trotter

TestSingleFileEventHandler: abstract notifier type

Rather than hardcode that we have two notifiers, and notifier 0 is the
terminating one, we abstract this with class level constants. This makes
it easier to add more, with different features.

The only real change is that now the callback class takes as input the...

f59dce3e 05/22/2010 09:58 am Guido Trotter

Mainloop: handle SIGINT as well (and terminate)

This is needed if daemons are in the foreground, and get ctrl+c-ed by
the user. Also add unittests to make sure the correct signals terminate
the mainloop.

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

d021e478 05/22/2010 09:58 am Guido Trotter

SingleFileEventHandler: update comments

The comments in the SingleFileEventHandler are still confd-specific.
Update them to make them generic for any single-file monitoring.

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