Statistics
| Branch: | Tag: | Revision:

root / test @ c50645c0

# Date Author Comment
c50645c0 01/11/2011 04:25 pm Michael Hanselmann

utils: Move X509-related code into separate file

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

3865ca48 01/11/2011 04:25 pm Michael Hanselmann

utils: Move I/O-related code into separate file

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

9d1b963f 01/11/2011 04:25 pm Michael Hanselmann

utils: Move code related to file locking into separate file

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

7831fc5f 01/11/2011 04:25 pm Michael Hanselmann

utils: Move wrappers into separate file

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

7b4baeb1 01/11/2011 04:24 pm Michael Hanselmann

utils: Use function to disable fork

Use a function instead of a variable written by another module.

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

8342c325 01/11/2011 04:24 pm Michael Hanselmann

utils: Change RemovePidFile to take path, not name

This avoids having to monkey-patch the utils module for unittests.
Monkey patching is evil and caused a bug while moving code around.

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

8ec505dd 01/10/2011 06:32 pm Adeodato Simo

Add unit tests for CheckAssignmentForSplitInstances

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

4245446f 01/10/2011 06:32 pm Adeodato Simo

Expose OpAssignGroupNodes over RAPI and RAPI client

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

3af47e13 01/10/2011 06:17 pm Michael Hanselmann

Validate RAPI resource paths

To stay consistent, RAPI resources should only use a restricted set of
characters. No uppercase, no “_”, etc. This is enforced by this patch.

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

f21bb4b7 01/10/2011 06:16 pm Michael Hanselmann

utils: Move hashing-related code into separate file

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

4fd029cf 01/10/2011 06:15 pm Michael Hanselmann

utils: Split algorithms into separate file

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

79d22269 01/10/2011 06:15 pm Michael Hanselmann

utils: Split Retry & co. into separate file

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

7fcffe27 01/10/2011 06:15 pm Michael Hanselmann

utils: Move text-related functions into separate file

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

36a4acd4 01/10/2011 06:15 pm Michael Hanselmann

utils: Move Mlockall into separate file

The unittest file is renamed to match the other utils.* tests.

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

7187e6ff 01/10/2011 04:07 pm Adeodato Simo

Add unit test for ganeti.rapi.client's ModifyGroup

This was forgotten in f18fab7.

Signed-off-by: Adeodato Simo <>
Reviewed-by: Iustin Pop <>

687c10d9 01/10/2011 02:41 pm Iustin Pop

Generalize the OpCode-should-be-in-mcpu test

Currently, the unittest TestDispatchTable in mcpu unittest does a
hard-coded approach to test whether an opcode should be included or
not in the mcpu.Processor dispatch table. This is not flexible, so we
replace it with two changes:...

abd42b0a 01/07/2011 06:05 pm Michael Hanselmann

Fix syntax error with Python 2.4

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

55cc0a44 01/07/2011 05:34 pm Michael Hanselmann

Use new console information in hypervisor abstraction

This makes use of the new way of returning console information from the
master daemon. Unittests are included.

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

25ce3ec4 01/07/2011 05:34 pm Michael Hanselmann

Introduce verbose opcode result for console

With this patch OpConnectConsole will no longer just return a command
with arguments, but rather a detailed description about how to connect
to an instance's console. Unittests for some parts are included. Another...

52b5d286 01/06/2011 05:19 pm René Nussbaumer

Support query of node field 'powered'

This field is based on OOB support and is only available if there's oob
support for that node.

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

d8b7ff5f 01/06/2011 03:02 pm Adeodato Simo

ganeti.query_unittest.py: add tests for group queries

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

e571ee44 01/06/2011 03:01 pm Adeodato Simo

ganeti.query_unittest.py: test lock fields too

Additionally, change TestQueryFields.testSomeFields() to handle lists of
fields shorter than 20 elements.

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

362c5845 01/06/2011 12:29 pm Michael Hanselmann

Merge branch 'devel-2.3'

  • devel-2.3:
    cfgupgrade: Remove unused “program” variable
    cfgupgrade: Check master name, clarify question
    Makefile: Merge build-time reST copying
    Move doc/upgrade.rst to UPGRADE, copy at build-time
    Import upgrade notes into documentation...
24d16f76 01/06/2011 12:08 pm Michael Hanselmann

Convert “gnt-debug locks” to query2

Locks can now be queried using “Query(what="lock", …)” over LUXI.

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

011974df 01/06/2011 12:06 pm Michael Hanselmann

cfgupgrade: Check master name, clarify question

- Check hostname and abort if it doesn't match contents of
“ssconf_master_node”, can be overridden using “--ignore-hostname”
parameter.
- Clarify confirmation question and don't mention instances anymore....

e23881ed 01/05/2011 06:14 pm Michael Hanselmann

RAPI: Add resource to grow instance disk

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

cfaeaaf7 01/05/2011 01:27 pm Michael Hanselmann

baserlib: Add function for filling opcodes

This function makes use of the opcode parameters which now live
directly in the opcode. A number of RAPI resources can now be simplified.

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

62e999a5 01/05/2011 01:27 pm Michael Hanselmann

RAPI: Add resource to modify cluster

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

65ffb373 01/05/2011 12:42 pm Michael Hanselmann

Improve opcode summary tests

Test full summary instead of just format.

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

1cbef6d8 01/05/2011 12:42 pm Michael Hanselmann

Migrate code verifying opcode parameters to base class

This allows the function to be used in other places as well.
An optional parameter is added to control whether default
values should be set. Unittests are added, providing full
coverage.

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

dbc96028 01/05/2011 12:40 pm Michael Hanselmann

Improve tests for OP_ID

… by detecting duplicates.

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

0bff0b12 01/05/2011 12:40 pm Michael Hanselmann

cmdlib: Remove opcode parameters

Remove the parameter definitions and use those from the opcode classes
instead. Small style changes are also made (empty lines, wrapping).

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

65e183af 01/05/2011 12:40 pm Michael Hanselmann

opcodes: Add opcode parameter definitions

This is the first step for migrating them from cmdlib. A metaclass is
used to define “__slots__” upon class creation time (not instantiation).

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

a6070ef7 01/05/2011 12:39 pm Michael Hanselmann

query2: Add new field status “offline”

This allows “gnt-node list” to show the difference between modes marked
offline and nodes with e.g. RPC errors (“(nodata)”). node1 is the
master, node2's node daemon crashed and node3 is marked offline:

$ gnt-node list -o name,offline,dtotal,dfree...

ecdf0398 01/04/2011 05:10 pm Michael Hanselmann

Add unittests for ht module

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

cee32223 12/31/2010 02:52 pm Michael Hanselmann

Merge branch 'devel-2.3'

  • devel-2.3:
    Fix typo in gnt-instance manpage
    jqueue: Fix cancelling while in waitlock in queue
    cli: Extend message for LUXI timeouts
    Fix timeout handling in LUXI client

Conflicts:
man/gnt-instance.sgml: Trivial merge in gnt-instance.rst...

2466c0fd 12/30/2010 07:51 pm Michael Hanselmann

cli: Change “<…>” in query output to “(…)”

This should reduce the amount of damage in case of accidential copy &
paste.

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

30c945d0 12/29/2010 05:48 pm Michael Hanselmann

jqueue: Fix cancelling while in waitlock in queue

Since the recent change to leave jobs in the “waitlock” status (commit
5fd6b6947), cancelling a job while it's back in the queue would break.
This patch handles these cases and adds a unittest.

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

0f9294f7 12/21/2010 08:14 pm Michael Hanselmann

Remove utils.FormatTimestampWithTZ

Long story short: time.strftime("%Z", time.localtime()) doesn't work,
even though it's documented to be equivalent to time.strftime("%Z").

$ TZ=America/Sao_Paulo python -c 'import time; print
time.strftime("%Z"), time.strftime("%Z", time.localtime())'...

9e691184 12/21/2010 08:14 pm Michael Hanselmann

Ensure temp files from RunCmd tests are removed

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

9f37f689 12/21/2010 03:18 pm Michael Hanselmann

utils: Timezone fixes and tests

- Update docstrings to explicitely mention Epoch
- Fix timezone bug in FormatTimestampWithTZ, where it would
use GMT/UTC when it should use the local timezone
- Add unittests for time formatting functions

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

aa29e95f 12/21/2010 03:18 pm Michael Hanselmann

Move QueryFields to query module

Also replace “sorted” with “utils.NiceSort” now that it supports a key
function.

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

153533f3 12/17/2010 05:51 pm Michael Hanselmann

utils.NiceSort: Use sorted(), add keyfunc, unittests

This patch changes utils.NiceSort to use the built-in “sorted()” and
gets rid of the intermediate list. Instead of wrapping the items
ourselves, a key function is used. The caller can specify another key...

50d54091 12/15/2010 05:30 pm Michael Hanselmann

Merge branch 'devel-2.3'

  • devel-2.3:
    jqueue: Keep jobs in “waitlock” while returning to queue
    Improve jqueue unittests
    Update manpages to display version 2.3

Conflicts:
man/ganeti-cleaner.sgml: Removed
man/ganeti-confd.sgml: Removed
man/ganeti-masterd.sgml: Removed...

5fd6b694 12/15/2010 03:42 pm Michael Hanselmann

jqueue: Keep jobs in “waitlock” while returning to queue

Iustin Pop reported that a job's file is updated many times while it
waits for locks held by other thread(s). After an investigation it was
concluded that the reason was a design decision for job priorities to...

ebb2a2a3 12/15/2010 03:42 pm Michael Hanselmann

Improve jqueue unittests

- Verify job file updates
- Ensure queue lock is released while executing opcode

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

ee3aedff 12/14/2010 03:23 pm Michael Hanselmann

cli: Add infrastructure for query2

A new function for formatting the query results is added,
``FormatTable``. This was determined to be easier and safer than
modifying the existing ``GenerateTable`` function while keeping
backwards compatibility for code not yet converted. The new code makes...

2bac48c4 12/13/2010 06:33 pm Adeodato Simo

Add some unit tests for ConfigWriter.AddNodeGroup()

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

60cba7f8 12/13/2010 05:15 pm Michael Hanselmann

qlang: Add function to build simple filter

This will be used in clients to build the filters for query2.

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

145bea54 12/13/2010 05:15 pm Michael Hanselmann

query: Handle items missing timestamps

In upgraded configurations, some items might miss the “ctime” and/or
“mtime” values and need to be handled specially.

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

1c8addc6 12/10/2010 05:48 pm Michael Hanselmann

query: Add definition for instance queries

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

a268af8d 12/08/2010 02:27 pm Adeodato Simo

Group operations: update ganeti.rapi.client with all node group operations

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

0dbaa9ca 12/08/2010 02:27 pm Adeodato Simo

Group operations: expose add/remove/rename in RAPI

Signed-off-by: Adeodato Simo <>
Reviewed-by: Michael Hanselmann <>

9f5a3645 12/06/2010 11:22 pm Michael Hanselmann

utils: Add function to find duplicates in sequence

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Adeodato Simo <>

819ca990 12/06/2010 02:59 pm Guido Trotter

locking: add nodegroup lock level

This also changes masterd to initialize the ganeti's manager with the
current list of nodegroup uuids, and updates unittests

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

0897dc97 12/01/2010 09:31 pm Adeodato Simo

Querying node groups: RAPI support

This implements /groups and /groups/%s RAPI end points.

Signed-off-by: Adeodato Simo <>
Signed-off-by: Iustin Pop <>
Reviewed-by: Iustin Pop <>

83f72637 11/29/2010 10:00 pm Michael Hanselmann

Add OpQuery opcode

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

8235fe04 11/29/2010 10:00 pm Michael Hanselmann

Add node query definition

This includes a bunch of helper functions which can be helpful for other
queries, too. Unittests are included.

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

4ca96421 11/29/2010 10:00 pm Michael Hanselmann

Add utility class for definition-based data queries

While not immediately visible, using definition-based queries will allow
for a number of optimizations and simplifications. This patch just
contains the utility class used for executing queries.

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

a123dc19 11/29/2010 10:00 pm Michael Hanselmann

Add simple query filter parser

This parser reads only the format described by the query2
design document: either an empty filter or an OR operator
with equality checks as operands.

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

c744425f 11/29/2010 07:52 pm Michael Hanselmann

RAPI: Implement OS parameters for instance reinstallation

Dictionaries are hard to encode into query strings, therefore the
“/2/instances/[instance_name]/reinstall” resource is changed to accept
its parameters via the request body. The old query string parameters are...

fdd9ac5b 11/29/2010 05:14 pm Michael Hanselmann

Move “rapi_users” file into separate directory

This reduces the number of notifications in “ganeti-rapi”. Until now it
was notified for every change in …/lib/ganeti and had to check whether
the users file was affected. A symlink is always created in cfgupgrade...

58bb385c 11/29/2010 05:05 pm Michael Hanselmann

impexpd: Implement support for IPv6

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

f40ae421 11/28/2010 04:04 pm Iustin Pop

Improve unittests for the utils module

This just a random collection of unittest improvements. Coverage
increases from 73% to 76%.

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

b7d82e40 11/27/2010 07:51 pm Iustin Pop

Fix breakage from previous commit e695efb

Wrong file name in Makefile.am and wrong naming (.unittest vs
_unittest).

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

e695efbf 11/27/2010 07:29 pm Iustin Pop

Add missing paramter and unittests for this case

While git-am'ing the blockdev_prefix patch, I modified the hv_xen.py
file but forgot to amend the patch :(, so here it is.

Furthermore, to detect such inconsistencies in the future, a unittest is
added that cross-checks the default parameters in constants.py and the...

84ce674e 11/26/2010 06:36 pm Iustin Pop

asyncnotifier tests: simplify the setup code

First change is to replace "range(len(self.NOTIFIERS)))" with
self.NOTIFIERS, as range(len(range(N))) ≡ range(N).

Sencond change is switch from an explicit indexing to use of zip.
Unittests still pass :)

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

0a31dda0 11/23/2010 11:04 pm Michael Hanselmann

Add consistency test for mcpu dispatch table

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

5768e6a6 11/23/2010 01:57 pm René Nussbaumer

Adding convenience getter for ndparams

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

815bf6d5 11/23/2010 12:01 pm Iustin Pop

Fix utils unittest TestRunCmd.testTimeoutKill

Currently the test executes "/bin/sh -c 'trap "" TERM …" via the shell,
which means we have two shells involved (the parent one and the child
one, which does the trap). For some weird reason, this works for older...

095e71aa 11/22/2010 05:18 pm René Nussbaumer

Adding oob_program in the same style as beparams

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

972a114f 11/19/2010 06:26 pm Iustin Pop

Merge branch 'devel-2.3'

  • devel-2.3:
    Updates NEWS and configure.ac for 2.3.0~rc1
    Update NEWS & configure.ac for the 2.2.2 release
    Fix documentation regarding conversion to drbd
    Fix documentation regarding conversion to drbd
    Reinstall instance: disallow offline secondaries...
7f81e2b9 11/19/2010 06:24 pm Iustin Pop

Temporarily remove the interactive tests

make check < /dev/null breaks these tests. Until we have change RunCmd
to override stdin, we need to remove them.

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

c74cda62 11/19/2010 05:19 pm René Nussbaumer

Support timeouts in RunCmd

Further investigations have to be done for merging some of these bits
together with import-export daemon which uses similiar logic.

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

e6784773 11/16/2010 05:19 pm René Nussbaumer

Adding unittests for RunningTimeout

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

6be8e2bf 11/15/2010 07:34 pm Iustin Pop

Switch man pages from SGML to RST

This patch changes the Makefile rules to build the man pages from the
RST sources instead of the SGML ones.

Note: pandoc quotes by default the ‘@’ character in manpage output, so
we explicitely undo this before writing the .in file....

28a7318f 11/11/2010 02:16 pm Iustin Pop

Add unittests for TemporaryReservationManager

And fix an error message.

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

e986f20c 10/28/2010 07:56 pm Michael Hanselmann

Add support and checks for version in LUXI

A new constant, LUXI_VERSION, is used to verify the peer's version. The
version is optional, so old(er) clients and servers talking to peers not
supporting it won't break. Example with mismatching library:

$ gnt-instance list...

4badc36c 10/28/2010 05:06 pm Guido Trotter

Add test for modifiable locking levels

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

f9116d58 10/28/2010 05:06 pm Guido Trotter

GanetiLockManager, remove default values

The nodes and instances parameters to the constructor are mandatory
anyway, as a value of None will fail when creating the LockSet. Rather
than fixing this adding code lines, since we never used the default
value, let's remove them and require that the parameters are passed....

4138d39f 10/22/2010 06:22 pm Iustin Pop

Add a "safe" file wrapper over WriteFile

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

9e100285 10/22/2010 06:21 pm Iustin Pop

Add functions to read and compare file 'ID's

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

691c81b7 10/20/2010 03:53 pm Michael Hanselmann

utils: Add function to find items in dictionary using regex

This basically extracts a small piece of code from ganeti-rapi and puts
it into a utility function. RAPI resources are found using a dictionary
in which the keys can either be static strings or compiled regular...

e543a42f 10/13/2010 03:18 pm Michael Hanselmann

Extract base class from SingleFileEventHandler

The base class can contain code useful to other inotify users.
As it is “SingleFileEventHandler” can not be used in ganeti-rapi,
therefore it'll use its own small inotify handler class based
on this base class....

2287b920 10/13/2010 03:18 pm Michael Hanselmann

http.auth.ReadPasswordFile: Don't read file directly

Reading the file before this function allows for better error
reporting.

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

9e49dfc5 10/12/2010 03:48 pm Michael Hanselmann

jqueue: Fix bug when cancelling jobs

If a job was cancelled while it was waiting for locks, an assertion
would've failed. This patch fixes the problem and provides a unit
test to check for this situation.

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

5c4d37f9 10/07/2010 11:31 am Iustin Pop

Use only one version of WritePidFile

This patch merges the pid file handling used for ganeti-* daemons and
impexp daemons. The latter version is used, since it's more reliable:
uses locked pid files as opposed to checking 'live' processes.

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

72884fef 10/05/2010 06:08 pm Michael Hanselmann

Merge branch 'devel-2.2'

  • devel-2.2:
    Add simple unittest for utils.CommaJoin
    LUDelTags: Improve formatting of error message
    LUGetTags: Acquire locks in shared mode
    gnt-cluster: Replace hardcoded “xenvg” with value retrieved from master
    Export VG name via LUQueryConfigValues...
750022e0 10/05/2010 05:59 pm Michael Hanselmann

Add simple unittest for utils.CommaJoin

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

845c79d8 10/05/2010 05:59 pm Michael Hanselmann

cli: Move parsing of --net option to separate function

This function will also be used in tools/move-instance.

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

df5758b1 10/05/2010 12:11 pm Iustin Pop

Merge branch 'devel-2.2'

  • devel-2.2:
    gnt-job info: Sort input fields
    KVM: Add function to check the hypervisor version
    Bump version to 2.2.0, update NEWS
    Fix instance rename regression from 3fe11ba3
    Fix instance rename regression from 3fe11ba3...
870dc44c 09/30/2010 03:09 am Iustin Pop

Abstract OS name/variant functions

Currently, the computation of the 'pure' name or the variant is
hardcoded and spread around the functions that need it. This is not
nice, and in the future we'd spread it even more with more usage of
variants/pure os names....

05636402 09/29/2010 02:42 pm Guido Trotter

Move the uuid regexp to utils.py

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

f23db633 09/24/2010 06:18 pm Michael Hanselmann

jqueue: Use priority for acquiring locks

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

26d3fd2f 09/24/2010 06:18 pm Michael Hanselmann

jqueue: Use timeout when acquiring locks

As already noted in the design document, an opcode's priority is
increased when the lock(s) can't be acquired within a certain amount of
time, except at the highest priority, where in such a case a blocking
acquire is used....

a7770f03 09/23/2010 04:06 pm Michael Hanselmann

mcpu: Adjust lock acquire strategy

The changes to job queue processing require some changes on this class'
interface. LockAttemptTimeoutStrategy might move to another place, but that'll
be done in a later patch.

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

03b63608 09/23/2010 12:07 pm Michael Hanselmann

jqueue: Rename current_op to better reflect what it actually is

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

db5bce34 09/22/2010 05:38 pm Michael Hanselmann

jqueue: Add unittest for _QueuedJob.CalcStatus

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

be760ba8 09/20/2010 03:41 pm Michael Hanselmann

jqueue: Change model from per-job to per-opcode processing

In order to support priorities, the processing of jobs needs to be
changed. Instead of processing jobs as a whole, the code is changed to
process one opcode at a time and then return to the queue. See the...

913138f4 09/16/2010 01:26 pm Michael Hanselmann

Always enable logging for unittests

By enabling all log levels, we ensure all calls are fully evaluated.
There was one case in the workerpool where a call to “logging.debug”
was wrong, but not caught in unittests because debug logging was
disabled.

The optional environment variable “LOGTOSTDERR” can be set to...