Make setup playbook timeout configurable
In some environments the setup playbook can sometimes take more than 60 seconds. In order to avoid retry limits in these cases make this timeout configurable. Change-Id: Ib45957df12b34ddaeec79eb10f7b2e99091dcad1
This commit is contained in:
parent
9e679eaded
commit
7a320f74db
|
@ -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
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue