Merge "Make setup playbook timeout configurable"

This commit is contained in:
Zuul 2019-01-25 17:26:15 +00:00 committed by Gerrit Code Review
commit 8b25219da8
2 changed files with 10 additions and 2 deletions

View File

@ -575,6 +575,12 @@ The following sections of ``zuul.conf`` are used by the executor:
add any site-wide variables. See the :ref:`User's Guide
<user_jobs_sitewide_variables>` for more information.
.. attr:: ansible_setup_timeout
:default: 60
Timeout of the ansible setup playbook in seconds that runs before
the first playbook of the job.
.. attr:: disk_limit_per_job
:default: 250

View File

@ -1963,8 +1963,8 @@ class AnsibleJob(object):
cmd.extend(['-e@%s' % self.executor_variables_file])
result, code = self.runAnsible(
cmd=cmd, timeout=60, playbook=playbook,
wrapped=False)
cmd=cmd, timeout=self.executor_server.setup_timeout,
playbook=playbook, wrapped=False)
self.log.debug("Ansible complete, result %s code %s" % (
self.RESULT_MAP[result], code))
if self.executor_server.statsd:
@ -2143,6 +2143,8 @@ class ExecutorServer(object):
'default_username', 'zuul')
self.disk_limit_per_job = int(get_default(self.config, 'executor',
'disk_limit_per_job', 250))
self.setup_timeout = int(get_default(self.config, 'executor',
'ansible_setup_timeout', 60))
self.zone = get_default(self.config, 'executor', 'zone')
self.merge_email = get_default(self.config, 'merger', 'git_user_email')
self.merge_name = get_default(self.config, 'merger', 'git_user_name')