Browse Source

Merge "Make setup playbook timeout configurable"

tags/3.6.0
Zuul 5 months ago
parent
commit
8b25219da8
2 changed files with 10 additions and 2 deletions
  1. 6
    0
      doc/source/admin/components.rst
  2. 4
    2
      zuul/executor/server.py

+ 6
- 0
doc/source/admin/components.rst View File

@@ -575,6 +575,12 @@ The following sections of ``zuul.conf`` are used by the executor:
575 575
       add any site-wide variables.  See the :ref:`User's Guide
576 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 584
    .. attr:: disk_limit_per_job
579 585
       :default: 250
580 586
 

+ 4
- 2
zuul/executor/server.py View File

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

Loading…
Cancel
Save