Report exceptions in launcher

Make sure that the launcher always completes a job even if it
encounters an exception when trying to launch it.

Change-Id: I4f691fb61d3fd54cab69d49bfdb3a82c6230c4ff
This commit is contained in:
James E. Blair 2017-02-02 15:33:18 -08:00
parent cdab203f5e
commit 096c5cdba5
1 changed files with 3 additions and 0 deletions

View File

@ -446,6 +446,9 @@ class AnsibleJob(object):
try:
self.jobdir = JobDir()
self._launch()
except Exception:
self.log.exception("Exception while launching job")
self.job.sendWorkException(traceback.format_exc())
finally:
self.running = False
try: