Requeue jobs if AnsibleHostUnreachable return
If ansible-playbook return AnsibleHostUnreachable (3), we can assume there was a network issue runing our playbook. Rather then continuing and potentially posting no logs, we can have zuul requeue the job to try again. Change-Id: I8c4d92fa7156c7d8591ca5b54be8cb30c249eacf Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
b114e6741d
commit
555ffe037d
|
@ -785,6 +785,12 @@ class NodeWorker(object):
|
|||
job.sendWorkStatus(0, 100)
|
||||
|
||||
job_status = self.runAnsiblePlaybook(jobdir, timeout)
|
||||
if job_status == 3:
|
||||
# AnsibleHostUnreachable: We had a network issue connecting to
|
||||
# our zuul-worker. Rather then contiune, have zuul requeue the
|
||||
# job.
|
||||
return result
|
||||
|
||||
post_status = self.runAnsiblePostPlaybook(jobdir, job_status)
|
||||
if job_status and post_status:
|
||||
status = 'SUCCESS'
|
||||
|
|
Loading…
Reference in New Issue