cmdlib: Factorize lock releasing
[ganeti-local] / lib / jqueue.py
index 56f7a66..6b60c5e 100644 (file)
@@ -540,6 +540,15 @@ class _OpExecCallbacks(mcpu.OpExecCbBase):
     # Cancel here if we were asked to
     self._CheckCancel()
 
+  def SubmitManyJobs(self, jobs):
+    """Submits jobs for processing.
+
+    See L{JobQueue.SubmitManyJobs}.
+
+    """
+    # Locking is done in job queue
+    return self._queue.SubmitManyJobs(jobs)
+
 
 class _JobChangesChecker(object):
   def __init__(self, fields, prev_job_info, prev_log_serial):
@@ -1723,7 +1732,8 @@ class JobQueue(object):
         status = True
         data = job_id
       except errors.GenericError, err:
-        data = str(err)
+        data = ("%s; opcodes %s" %
+                (err, utils.CommaJoin(op.Summary() for op in ops)))
         status = False
       results.append((status, data))