kojid: make install timeout of imagefactory conf configurable

This commit is contained in:
Yuming Zhu 2018-03-14 00:35:54 +08:00 committed by Mike McLean
parent d9682472b3
commit 38f3d919af
2 changed files with 9 additions and 4 deletions

View file

@ -3562,8 +3562,8 @@ class OzImageTask(BaseTaskHandler):
#IF specific
'imgdir': os.path.join(self.workdir, 'scratch_images'),
'tmpdir': os.path.join(self.workdir, 'oz-tmp'),
'verbose' : True,
'timeout': 7200,
'verbose': True,
'timeout': self.options.oz_install_timeout,
'output': 'log',
'raw': False,
'debug': True,
@ -5709,7 +5709,7 @@ def get_options():
'max_retries': 120,
'offline_retry': True,
'offline_retry_interval': 120,
'keepalive' : True,
'keepalive': True,
'log_timestamps': False,
'timeout' : None,
'no_ssl_verify' : False,
@ -5725,6 +5725,7 @@ def get_options():
'resolver-status.properties *.lastUpdated',
'failed_buildroot_lifetime' : 3600 * 4,
'rpmbuild_timeout' : 3600 * 24,
'oz_install_timeout': None,
'cert': None,
'ca': '', # FIXME: Unused, remove in next major release
'serverca': None}
@ -5732,7 +5733,7 @@ def get_options():
for name, value in config.items('kojid'):
if name in ['sleeptime', 'maxjobs', 'minspace', 'retry_interval',
'max_retries', 'offline_retry_interval', 'failed_buildroot_lifetime',
'timeout', 'rpmbuild_timeout',]:
'timeout', 'rpmbuild_timeout', 'oz_install_timeout',]:
try:
defaults[name] = int(value)
except ValueError:

View file

@ -38,6 +38,10 @@
; Timeout for build duration (24 hours)
; rpmbuild_timeout=86400
; Install timeout(seconds) for image build
; if it's unset, use the number in /etc/oz/oz.cfg, supported since oz-0.16.0
; oz_install_timeout=7200
; The URL for the xmlrpc server
server=http://hub.example.com/kojihub