summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-01-25 17:26:15 +0000
committerGerrit Code Review <review@openstack.org>2019-01-25 17:26:15 +0000
commit8b25219da8e59d843fcb49d271f4c43105c12735 (patch)
tree740f2239edfca53ea6ad600c873bea3f6569803e
parent7d31a01737bde1238b11587e648fbf86af70819e (diff)
parent7a320f74dba98556bd638410143863105883a4b4 (diff)
Merge "Make setup playbook timeout configurable"
-rw-r--r--doc/source/admin/components.rst6
-rw-r--r--zuul/executor/server.py6
2 files changed, 10 insertions, 2 deletions
diff --git a/doc/source/admin/components.rst b/doc/source/admin/components.rst
index 1089a05..be6fd52 100644
--- a/doc/source/admin/components.rst
+++ b/doc/source/admin/components.rst
@@ -575,6 +575,12 @@ The following sections of ``zuul.conf`` are used by the executor:
575 add any site-wide variables. See the :ref:`User's Guide 575 add any site-wide variables. See the :ref:`User's Guide
576 <user_jobs_sitewide_variables>` for more information. 576 <user_jobs_sitewide_variables>` for more information.
577 577
578 .. attr:: ansible_setup_timeout
579 :default: 60
580
581 Timeout of the ansible setup playbook in seconds that runs before
582 the first playbook of the job.
583
578 .. attr:: disk_limit_per_job 584 .. attr:: disk_limit_per_job
579 :default: 250 585 :default: 250
580 586
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index 5eca20c..73d65b7 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -1963,8 +1963,8 @@ class AnsibleJob(object):
1963 cmd.extend(['-e@%s' % self.executor_variables_file]) 1963 cmd.extend(['-e@%s' % self.executor_variables_file])
1964 1964
1965 result, code = self.runAnsible( 1965 result, code = self.runAnsible(
1966 cmd=cmd, timeout=60, playbook=playbook, 1966 cmd=cmd, timeout=self.executor_server.setup_timeout,
1967 wrapped=False) 1967 playbook=playbook, wrapped=False)
1968 self.log.debug("Ansible complete, result %s code %s" % ( 1968 self.log.debug("Ansible complete, result %s code %s" % (
1969 self.RESULT_MAP[result], code)) 1969 self.RESULT_MAP[result], code))
1970 if self.executor_server.statsd: 1970 if self.executor_server.statsd:
@@ -2143,6 +2143,8 @@ class ExecutorServer(object):
2143 'default_username', 'zuul') 2143 'default_username', 'zuul')
2144 self.disk_limit_per_job = int(get_default(self.config, 'executor', 2144 self.disk_limit_per_job = int(get_default(self.config, 'executor',
2145 'disk_limit_per_job', 250)) 2145 'disk_limit_per_job', 250))
2146 self.setup_timeout = int(get_default(self.config, 'executor',
2147 'ansible_setup_timeout', 60))
2146 self.zone = get_default(self.config, 'executor', 'zone') 2148 self.zone = get_default(self.config, 'executor', 'zone')
2147 self.merge_email = get_default(self.config, 'merger', 'git_user_email') 2149 self.merge_email = get_default(self.config, 'merger', 'git_user_email')
2148 self.merge_name = get_default(self.config, 'merger', 'git_user_name') 2150 self.merge_name = get_default(self.config, 'merger', 'git_user_name')