Statistics
| Branch: | Tag: | Revision:

root / lib / utils @ d6491981

Name Size
__init__.py 21 kB
algo.py 4 kB
filelock.py 5 kB
hash.py 2.4 kB
io.py 19.9 kB
log.py 8.3 kB
mlock.py 2.2 kB
nodesetup.py 3.8 kB
process.py 28.2 kB
retry.py 4.9 kB
text.py 13.1 kB
wrapper.py 4.8 kB
x509.py 9.2 kB

Latest revisions

# Date Author Comment
d6491981 03/31/2011 12:44 pm René Nussbaumer

test.ganeti.process_unittest: Fix race condition

There was a race condition on heavily loaded testsystem causing randomly
to fail the timeout unittests as the signal handler is not yet setup but
the timeout has already hit.

Therefore we introduce a workaround to wait until a program reached a...

ee7f592e 03/07/2011 06:06 pm Iustin Pop

Log log-file reopening

This makes the log files get an record notifying of the reopen, so as
to force creation of the log files soon after rotation.

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

f47941f8 02/25/2011 11:55 am Michael Hanselmann

utils: Export NiceSortKey function

The ability to split a string into a list of strings and integers can be
handy elsewhere and is necessary for sorting query results by names.

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

92ea69bf 02/24/2011 03:25 pm Michael Hanselmann

Add function to format ordinals

See [1] for the rules.

[1] http://en.wikipedia.org/wiki/Names_of_numbers_in_English#Ordinal_numbers

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

9a6813ac 02/02/2011 06:02 pm Michael Hanselmann

utils.SetupLogging: Return function to reopen log file

This function can be used from a SIGHUP handler to reopen log files.
Initial, simple unittests are included.

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

8cabf472 02/02/2011 06:02 pm Michael Hanselmann

Reopen log files upon SIGHUP in daemons

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

cfcc79c6 02/02/2011 06:02 pm Michael Hanselmann

utils.SetupLogging: Make program a mandatory argument

It's passed in by most users (daemons, CLI scripts) and for the others
(burnin, watcher) it certainly doesn't hurt, especially when using
syslog.

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

aa0cc3e5 02/02/2011 05:57 pm Michael Hanselmann

utils.log: Restrict I/O error handling coverage

The I/O error will occur while opening the file, not while adding
and configuring the handler.

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

d24bc000 02/02/2011 05:57 pm Michael Hanselmann

utils.log: Split formatter building into separate function

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

b6fa9a44 01/31/2011 02:53 pm Michael Hanselmann

Introduce re-openable log record handler

This patch adds a new log handler class based on the standard library's
BaseRotatingHandler. This new class allows the log file to be re-opened,
e.g. upon receiving a SIGHUP signal. The latter will be implemented in...

View revisions

Also available in: Atom