[koji PATCH] allow setting build priority
by Dan Horák
When building for multiple tags it could be useful to set different priorities
for the tasks, eg. rawhide builds will be lower prio than branched builds.
---
util/koji-shadow | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/util/koji-shadow b/util/koji-shadow
index 25492d5..8790cf8 100755
--- a/util/koji-shadow
+++ b/util/koji-shadow
@@ -140,6 +140,8 @@ def get_options():
help=_("tag sucessful builds into the tag we are building, default is to not tag"))
parser.add_option("--arches",
help=_("arches to use when creating tags"))
+ parser.add_option("--priority", type="int", default=5,
+ help=_("priority to set for submitted builds"))
#parse once to get the config file
(options, args) = parser.parse_args()
@@ -1080,7 +1082,7 @@ class BuildTracker(object):
#TODO ...and verify repo
repo_id, event_id = session.getTaskResult(task_id)
#kick off build
- task_id = session.build(src, None, opts={'repo_id': repo_id}, priority=5 )
+ task_id = session.build(src, None, opts={'repo_id': repo_id}, priority=options.priority )
return task_id
def report(self):
--
1.8.1.4
9 years, 9 months
[koji PATCH] fix format when printing rpms without buildroot
by Dan Horák
---
util/koji-shadow | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/util/koji-shadow b/util/koji-shadow
index 25492d5..da7b247 100755
--- a/util/koji-shadow
+++ b/util/koji-shadow
@@ -473,7 +473,7 @@ class TrackedBuild(object):
if brs and bad:
print "Warning: some rpms for %s lacked buildroots:" % self.nvr
for rinfo in bad:
- print " %(name)-%(version)-%(release).%(arch)" % rinfo
+ print " %(name)s-%(version)s-%(release)s.%(arch)s" % rinfo
return brs.keys()
def getDeps(self):
--
1.8.1.4
9 years, 9 months
[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
Cannot perform koji add-host - ActionNotAllowed: admin permission required
by Radha Venkatesh (radvenka)
Hi,
I am trying to set up a koji build server and have gone through all the steps guide. I am encountering a problem in adding the build host using "koji add-host" command
[kojiadmin@vos-cm20 koji]$ koji add-host kojid-1 x86_64
ActionNotAllowed: admin permission required
The tables in my database have been setup correctly
koji=# select * from users;
id | name | password | status | usertype | krb_principal
----+-----------+----------+--------+----------+---------------
1 | kojiadmin | | 0 | 0 |
2 | vos-cm20 | | 0 | 0 |
(2 rows)
koji=# select * from user_perms;
user_id | perm_id | create_event | revoke_event | creator_id | revoker_id | active
---------+---------+--------------+--------------+------------+------------+--------
1 | 1 | 1 | | 1 | | t
What am I doing wrong? Any pointers would be appreciated.
Thanks,
Radha.
10 years