If an uncaught exception is thrown currently it destroys the calling
thread. This patch changes the behaviour to failing the current job,
logging a message, but trying to keep the daemon up.
Reviewed-by: imsnah
msg = "ganeti exception %s" % err
item.SetStatus(opcodes.Job.STATUS_FAIL, result=[msg])
print msg
+ except Exception, err:
+ msg = "unhandled exception %s" % err
+ item.SetStatus(opcodes.Job.STATUS_FAIL, result=[msg])
+ print msg
+ except:
+ msg = "unhandled unknown exception"
+ item.SetStatus(opcodes.Job.STATUS_FAIL, result=[msg])
+ print msg
+
finally:
#utils.Unlock('cmd')
#utils.LockCleanup()