Commit cc2bea8b authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

ganeti-masterd: Remove unused locking code

Reviewed-by: iustinp, ultrotter
parent 96cb3986
...@@ -288,28 +288,21 @@ def PoolWorker(worker_id, incoming_queue, context): ...@@ -288,28 +288,21 @@ def PoolWorker(worker_id, incoming_queue, context):
if item is None: if item is None:
break break
logging.debug("worker %s processing job %s", worker_id, item.data.job_id) logging.debug("worker %s processing job %s", worker_id, item.data.job_id)
#utils.Lock('cmd') proc = mcpu.Processor(context, feedback=lambda x: None)
try: try:
proc = mcpu.Processor(context, feedback=lambda x: None) JobRunner(proc, item, context)
try: except errors.GenericError, err:
JobRunner(proc, item, context) msg = "ganeti exception"
except errors.GenericError, err: logging.error(msg, exc_info=err)
msg = "ganeti exception" item.SetStatus(opcodes.Job.STATUS_FAIL, result=[msg])
logging.error(msg, exc_info=err) except Exception, err:
item.SetStatus(opcodes.Job.STATUS_FAIL, result=[msg]) msg = "unhandled exception"
except Exception, err: logging.error(msg, exc_info=err)
msg = "unhandled exception" item.SetStatus(opcodes.Job.STATUS_FAIL, result=[msg])
logging.error(msg, exc_info=err) except:
item.SetStatus(opcodes.Job.STATUS_FAIL, result=[msg]) msg = "unhandled unknown exception"
except: logging.error(msg, exc_info=True)
msg = "unhandled unknown exception" item.SetStatus(opcodes.Job.STATUS_FAIL, result=[msg])
logging.error(msg, exc_info=True)
item.SetStatus(opcodes.Job.STATUS_FAIL, result=[msg])
finally:
#utils.Unlock('cmd')
#utils.LockCleanup()
pass
logging.debug("worker %s finish job %s", worker_id, item.data.job_id) logging.debug("worker %s finish job %s", worker_id, item.data.job_id)
logging.debug("worker %s exiting", worker_id) logging.debug("worker %s exiting", worker_id)
......
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