[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, 12 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, 12 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, 12 months
Running mash in Koji
by Mathieu Bridon
Hi,
Dennis Gilmore has been talking for some time about how he'd like to run
Mash in Koji tasks, instead of the set of scripts releng currently uses.
So I started working on this, and I got to the point where it actually
works, but I have a few questions before I can finish it and submit the
patches.
1. What would be an appropriate weight for this new task?
At the moment I'm just using the default, but given that mashing can be
quite intensive, it might be better to increase that. I have no idea on
what would be the right number, though.
2. What would be the appropriate permissions to run this task?
Right now, the task requires the user to be an admin. Should I introduce
a new 'mash' permission? Is there an existing 'releng' permission I
should use?
3. What to do with the output?
Mash will create the repositories for all configured architectures,
corresponding to a certain Koji tag.
As such, its output is much bigger that, say, a build task.
The task could upload everything back to the Hub, but that could take a
significant time and might hammer the Hub?
Dennis was saying that another possibility was to mount /mnt/koji as
read-write on the builder, and inside the chroot, so that the task could
write its output directly there.
What would be the preferred option?
--
Mathieu
10 years, 2 months
[PATCH 0/3] allow the hub Kerberos principal to be defined
by Aron Parsons
This patch set allows you to set the entire Kerberos principal for the Koji hub.
When using Kerberos in an Active Directory environment, the server principal is
not the typical host/server@REALM format, but rather HOSTNAME$. The existing
configuration for the hub is not sufficient as you can only define the service,
not the entire principal.
Aron Parsons (3):
add a fallback to an unformatted version of host_principal_format
allow the hub server principal to be defined
add support for defining HubPrincipal in koji-gc
builder/kojid | 5 ++++-
koji/__init__.py | 19 +++++++++++--------
util/koji-gc | 5 ++++-
www/kojiweb/index.py | 3 ++-
www/kojiweb/wsgi_publisher.py | 1 +
5 files changed, 22 insertions(+), 11 deletions(-)
10 years, 2 months
later rebuild for new architecture
by Peter Bojtos
Hi all,
I have a Koji system and a tag within it with lots of (~1000) packages.
I've succesfully built all of them for i686 architecture, since it was the only set architecture.
Later I had an idea to create packages for x86_64 as well and set up the tag's architecture to i686,x86_64. Every newly built package builds fine for both architectures.
Is there any way to rebuild the ~1000 package only for x86_64 now?
I tried to use 'koji create-task buildArch' but it wasn't successfull.
I even tried to cancel the builds and resubmit them, but I couldn't, since they are completed. I don't really want to do a mass rebuild, only if this is the only solution.
Thanks for the help,
Peter
10 years, 2 months
ERROR: Could not find useradd in chroot, maybe the install failed? in mock_output.log
by Radha Venkatesh (radvenka)
I have set up a koji build system and on running a scratch build (koji build --scratch dist-ncp bzip2-1.0.5-7.el6_0.src.rpm), I see the below error in mock_output.log. All the source rpms have been imported into the build server.
INFO: mock.py version 1.1.32 starting...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
Start: lock buildroot
Start: clean chroot
Finish: clean chroot
Finish: lock buildroot
Start: chroot init
Start: lock buildroot
Mock Version: 1.1.32
INFO: Mock Version: 1.1.32
INFO: calling preinit hooks
Start: device setup
Finish: device setup
Start: yum update
Start: Outputting list of available packages
Finish: Outputting list of available packages
Finish: yum update
ERROR: Could not find useradd in chroot, maybe the install failed?
Here are the packages I have added to the group
koji list-groups dist-ncp-build
bash: None, default [dist-ncp-build]
bzip2: None, default [dist-ncp- build]
coreutils: None, default [dist-ncp-build]
cpio: None, default [dist-ncp-build]
cvs: None, default [dist-ncp-build]
diffutils: None, default [dist-ncp-build]
fedora-release: None, default [dist-ncp-build]
findutils: None, default [dist-ncp-build]
gawk: None, default [dist-ncp-build]
gcc: None, default [dist-ncp-build]
gcc-c++: None, default [dist-ncp-build]
gnupg: None, default [dist-ncp-build]
grep: None, default [dist-ncp-build]
gzip: None, default [dist-ncp-build]
info: None, default [dist-ncp-build]
make: None, default [dist-ncp-build]
patch: None, default [dist-ncp-build]
redhat-rpm-config: None, default [dist-ncp-build]
rpm-build: None, default [dist-ncp-build]
rpmdevtools: None, default [dist-ncp-build]
sed: None, default [dist-ncp-build]
shadow-utils: None, default [dist-ncp-build]
tar: None, default [dist-ncp-build]
unzip: None, default [dist-ncp-build]
utils-linux-ng: None, default [dist-ncp-build]
wget: None, default [dist-ncp-build]
which: None, default [dist-ncp-build]
What am I missing?
Thanks,
Radha.
10 years, 2 months