Produce better errors on startup if cat jobs fail
If a cat job times out, it has no 'updated' attribute, so the job.updated check fails with an attribute error. Instead, detect that case and report a useful error message to users so they know why Zuul just failed to start. Change-Id: I0822bdb6bd425494d323538d0c598e8b1a0c727a
This commit is contained in:
parent
de00c44021
commit
28916c741b
|
@ -1840,6 +1840,10 @@ class TenantParser(object):
|
||||||
for job in jobs:
|
for job in jobs:
|
||||||
self.log.debug("Waiting for cat job %s" % (job,))
|
self.log.debug("Waiting for cat job %s" % (job,))
|
||||||
job.wait(self.merger.git_timeout)
|
job.wait(self.merger.git_timeout)
|
||||||
|
if not hasattr(job, 'updated'):
|
||||||
|
# We timed out
|
||||||
|
raise Exception("Cat job %s timed out; consider setting "
|
||||||
|
"merger.git_timeout in zuul.conf" % (job,))
|
||||||
if not job.updated:
|
if not job.updated:
|
||||||
raise Exception("Cat job %s failed" % (job,))
|
raise Exception("Cat job %s failed" % (job,))
|
||||||
self.log.debug("Cat job %s got files %s" %
|
self.log.debug("Cat job %s got files %s" %
|
||||||
|
|
Loading…
Reference in New Issue