Revert "jqueue: Resume jobs from “waitlock” status"
authorMichael Hanselmann <hansmi@google.com>
Fri, 10 Sep 2010 15:28:30 +0000 (17:28 +0200)
committerMichael Hanselmann <hansmi@google.com>
Mon, 13 Sep 2010 14:39:44 +0000 (16:39 +0200)
This reverts commit 4008c8edae31a3971fa8c4b200238afc8005d3d4.

While it worked in my initial tests, I've now found cases where this doesn't
work properly as it is. More work is needed and will be done as part of the
Ganeti 2.3 job queue changes.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/jqueue.py

index fe61c22..bd4d986 100644 (file)
@@ -945,11 +945,11 @@ class JobQueue(object):
 
       status = job.CalcStatus()
 
-      if status in (constants.JOB_STATUS_QUEUED,
-                    constants.JOB_STATUS_WAITLOCK):
+      if status in (constants.JOB_STATUS_QUEUED, ):
         self._wpool.AddTask((job, ))
 
       elif status in (constants.JOB_STATUS_RUNNING,
+                      constants.JOB_STATUS_WAITLOCK,
                       constants.JOB_STATUS_CANCELING):
         logging.warning("Unfinished job %s found: %s", job.id, job)
         job.MarkUnfinishedOps(constants.OP_STATUS_ERROR,