Log abnormal worker exit codes

This commit is contained in:
Randall Leeds 2020-04-20 19:31:53 -07:00
parent a232c270fd
commit ee1e5c1928

View File

@ -520,6 +520,8 @@ class Arbiter(object):
# that it could not boot, we'll shut it down to avoid # that it could not boot, we'll shut it down to avoid
# infinite start/stop cycles. # infinite start/stop cycles.
exitcode = status >> 8 exitcode = status >> 8
if exitcode != 0:
self.log.error('Worker (pid:%s) exited with code %s', wpid, exitcode)
if exitcode == self.WORKER_BOOT_ERROR: if exitcode == self.WORKER_BOOT_ERROR:
reason = "Worker failed to boot." reason = "Worker failed to boot."
raise HaltServer(reason, self.WORKER_BOOT_ERROR) raise HaltServer(reason, self.WORKER_BOOT_ERROR)