Merge "Use pull mode for synchronize in _makeFTPTask"
diff --git a/zuul/launcher/ansiblelaunchserver.py b/zuul/launcher/ansiblelaunchserver.py
index 3b9584a..510d985 100644
--- a/zuul/launcher/ansiblelaunchserver.py
+++ b/zuul/launcher/ansiblelaunchserver.py
@@ -785,6 +785,12 @@
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'
@@ -991,15 +997,19 @@
inventory.write('\n')
timeout = None
+ timeout_var = None
for wrapper in jjb_job.get('wrappers', []):
if isinstance(wrapper, dict):
timeout = wrapper.get('build-timeout', {})
if isinstance(timeout, dict):
timeout = timeout.get('timeout')
+ timeout_var = timeout.get('timeout-var', None)
if timeout:
timeout = timeout * 60
if not timeout:
timeout = ANSIBLE_DEFAULT_TIMEOUT
+ if timeout_var:
+ parameters[timeout_var] = timeout
with open(jobdir.playbook, 'w') as playbook:
tasks = []