[koji PATCH] allow setting the timeout for builds from config file
by Dan Horák
---
builder/kojid | 5 +++--
builder/kojid.conf | 3 +++
koji/__init__.py | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/builder/kojid b/builder/kojid
index f906d0b..18c1fa4 100755
--- a/builder/kojid
+++ b/builder/kojid
@@ -204,7 +204,7 @@ class BuildRoot(object):
for k in ('repoid', 'tag_name'):
if hasattr(self, k):
opts[k] = getattr(self, k)
- for k in ('mockdir', 'topdir', 'topurl', 'topurls', 'packager', 'vendor', 'distribution', 'mockhost', 'yum_proxy'):
+ for k in ('mockdir', 'topdir', 'topurl', 'topurls', 'packager', 'vendor', 'distribution', 'mockhost', 'yum_proxy', 'rpmbuild_timeout'):
if hasattr(self.options, k):
opts[k] = getattr(self.options, k)
opts['buildroot_id'] = self.id
@@ -3060,6 +3060,7 @@ def get_options():
'maven_repo_ignore': '*.md5 *.sha1 maven-metadata*.xml _maven.repositories '
'resolver-status.properties *.lastUpdated',
'failed_buildroot_lifetime' : 3600 * 4,
+ 'rpmbuild_timeout' : 3600 * 24,
'cert': '/etc/kojid/client.crt',
'ca': '/etc/kojid/clientca.crt',
'serverca': '/etc/kojid/serverca.crt'}
@@ -3067,7 +3068,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',]:
+ 'timeout', 'rpmbuild_timeout',]:
try:
defaults[name] = int(value)
except ValueError:
diff --git a/builder/kojid.conf b/builder/kojid.conf
index 1fa9ad4..05fe3b0 100644
--- a/builder/kojid.conf
+++ b/builder/kojid.conf
@@ -32,6 +32,9 @@
; The _host string to use in mock
; mockhost=koji-linux-gnu
+; Timeout for build duration (24 hours)
+; rpmbuild_timeout=86400
+
; The URL for the xmlrpc server
server=http://hub.example.com/kojihub
diff --git a/koji/__init__.py b/koji/__init__.py
index f42226b..8ab81a8 100644
--- a/koji/__init__.py
+++ b/koji/__init__.py
@@ -1266,7 +1266,7 @@ def genMockConfig(name, arch, managed=False, repoid=None, tag_name=None, **opts)
# don't encourage network access from the chroot
'use_host_resolv': opts.get('use_host_resolv', False),
# Don't let a build last more than 24 hours
- 'rpmbuild_timeout': 86400
+ 'rpmbuild_timeout': opts.get('rpmbuild_timeout', 86400)
}
# bind_opts are used to mount parts (or all of) /dev if needed.
--
1.7.7.6
9 years, 9 months
Koji-1.7.1-1.fc17 repository toplink failure
by Anthony Joseph Messina
After upgrading to koji-1.7.1 on my private hub and builders, my builders are
no longer able to use the repositories they create when building subsequent
dependent packages. When attempting to install locally built packages, the
following error is issued in the root.log:
error was [Errno 2] Local file does not exist:
/tmp/koji/tasks/9129/19129/repo_3627_premerge/toplink/packages/...
The repos are created successfully:
$ /usr/bin/createrepo -vd -o /tmp/koji/tasks/9129/19129/repo -i
/mnt/koji/repos/f17-build/3627/x86_64/pkglist -g /mnt/koji/repos/f17-
build/3627/groups/comps.xml --update --skip-stat /mnt/koji/repos/f17-
build/3627/x86_64
Scanning old repo data
Spawning worker 0 with 36 pkgs
Worker 0: reading toplink/packages/dahdi-tools/2.6.1/3.fc17.1/x86_64/dahdi-
tools-2.6.1-3.fc17.1.x86_64.rpm
Worker 0: reading toplink/packages/dahdi-tools/2.6.1/3.fc17.1/x86_64/dahdi-
tools-devel-2.6.1-3.fc17.1.x86_64.rpm
Worker 0: reading toplink/packages/dahdi-tools/2.6.1/3.fc17.1/x86_64/dahdi-
tools-libs-2.6.1-3.fc17.1.x86_64.rpm
...
...
I believe the issue is related to the following commit:
https://fedorahosted.org/koji/changeset/da6dd0b1832e9929565a1ab03ab844aac...
I'm not sure why when building packages, the builders are inserting
'/tmp/koji/tasks/9129/19129/repo_3627_premerge/toplink'
instead of topdir or topurl, such as
'/mnt/koji' or 'http://example.com/kojifiles'
Right now I'm working on selectively reverting that commit to see if I can
build packages against other local packages.
Any assistance is appreciated. Thanks. -Anthony
--
Anthony - http://messinet.com - http://messinet.com/~amessina/gallery
8F89 5E72 8DF0 BCF0 10BE 9967 92DC 35DC B001 4A4E
10 years, 3 months
task createrepo do nothing
by Fabrice Cantos
Hi,
I have setup my own koji build system .
I have the koji hub on a separate server that the koji builder.
However every time that I tried to build a package, the task createrepo
never completed.
-bash-3.2$ koji list-tasks
2259 20 fabrice OPEN noarch build [sat-1.fabrice.co.nz]
2260 19 fabrice FREE noarch +waitrepo
2257 15 kojira OPEN noarch newRepo [sat-1.fabrice.co.nz]
2258 14 kojira OPEN noarch +createrepo
[sat-1.fabrice.co.nz]
-bash-3.2$ koji list-hosts --channel=createrepo
Hostname Enb Rdy Load/Cap Arches Last Update
fc-test.fabrice.co.nz Y N 0.0/4.0 x86_64,i386,i686 2013-05-20
22:57:17
sat-1.fabrice.co.nz Y Y 1.5/8.0 i386,x86_64,i686 2013-05-21
02:38:23
I don't know if it is relevant but on the kojid log I have this warning :
" [INFO] koji: Try #5 for call 2 (rawUpload) failed: global name
'handler' is not defined"
File "/usr/lib/python2.6/site-packages/koji/__init__.py", line 1886,
in _callMethod
return self._sendCall(handler, headers, request)
File "/usr/lib/python2.6/site-packages/koji/__init__.py", line 1797,
in _sendCall
return self._sendOneCall(handler, headers, request)
File "/usr/lib/python2.6/site-packages/koji/__init__.py", line 1819,
in _sendOneCall
ret = self._read_xmlrpc_response(response)
File "/usr/lib/python2.6/site-packages/koji/__init__.py", line 1850,
in _read_xmlrpc_response
raise xmlrpclib.ProtocolError(self._host + handler,
NameError: global name 'handler' is not defined
Thanks in advance
--
Please consider the environment before printing this email.
NIWA is the trading name of the National Institute of Water & Atmospheric Research Ltd.
10 years, 4 months