Commit ea6e6c2b authored by Guido Trotter's avatar Guido Trotter
Browse files

Fail job on ganeti exceptions

When a Job raises a ganeti exception a message is printed but nothing is
reported in the job itself. It's better to update the job status, thus
notifying the client, possibly polling for the job result, of what went
wrong.

Reviewed-by: iustinp
parent 5d3a153a
......@@ -285,7 +285,9 @@ def PoolWorker(worker_id, incoming_queue):
try:
JobRunner(proc, item)
except errors.GenericError, err:
print "ganeti exception %s" % err
msg = "ganeti exception %s" % err
item.SetStatus(opcodes.Job.STATUS_FAIL, result=[msg])
print msg
finally:
#utils.Unlock('cmd')
#utils.LockCleanup()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment