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 Ganeti 2.3 design document for details. This patch does not yet use priorities for acquiring locks. The enclosed unittests increase the test coverage of jqueue.py from about 34% to 58%. Please note that they also test some parts not added by this patch, but testing them became only possible with some infrastructure added by this patch. For the first time, many implications and assumptions for the job queue are codified in these unittests. Signed-off-by:Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
Loading
Please register or sign in to comment