Statistics
| Branch: | Tag: | Revision:

root / lib / utils @ ff699aa9

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

58a59652 01/27/2011 06:39 pm Iustin Pop

cluster verify: add hvparams verification

Currently, the validity of the hypervisor parameters is only checked
at init/modification time, and not in the cluster verify. This is bad,
as it can lead to inconsistent state that is only detected when the
next modification (which can be unrelated) is made, leading to...

a3d32770 01/18/2011 01:47 pm Iustin Pop

Rename OpVerifyCluster and LUVerifyCluster

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

View revisions

Also available in: Atom