koji build server install - DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist
by steve.webb@beatport.com
Hey there.
I'm trying to build my own koji build server and following along with the
instructions here: http://fedoraproject.org/wiki/Koji/ServerHowTo
I got past the postgres authentication stuff and the SSL cert stuff, and
now I'm trying to get basic functionality working with koji-hub and
running into a bit of a sticky issue that I can't resolve on my own.
The 'list-hosts' command seems to work ok:
[kojiadmin@bpkojipoc001 ~]$ koji list-hosts
Hostname Enb Rdy Load/Cap Arches Last Update
But the "add-user" command gives me a:
File "/usr/share/koji-hub/kojixmlrpc.py", line 191, in _marshaled_dispatch
response = self._dispatch(method, params)
File "/usr/share/koji-hub/kojixmlrpc.py", line 253, in _dispatch
ret = func(*params,**opts)
File "/usr/lib/python2.6/site-packages/koji/auth.py", line 649, in sslLogin
return context.session.sslLogin(*args, **opts)
File "/usr/lib/python2.6/site-packages/koji/auth.py", line 394, in sslLogin
sinfo = self.createSession(user_id, hostip, koji.AUTHTYPE_SSL)
File "/usr/lib/python2.6/site-packages/koji/auth.py", line 480, in createSession
c.execute(q, {})
File "/usr/lib/python2.6/site-packages/koji/db.py", line 95, in execute
ret = self.cursor.execute(operation, parameters)
File "/usr/lib64/python2.6/site-packages/pgdb.py", line 174, in execute
self.executemany(operation, (params,))
File "/usr/lib64/python2.6/site-packages/pgdb.py", line 195, in executemany
raise DatabaseError, "error '%s' in '%s'" % ( msg, sql )
DatabaseError: error 'ERROR: relation "sessions_id_seq" does not exist
LINE 1: SELECT nextval('sessions_id_seq')
^
' in 'SELECT nextval('sessions_id_seq')'
I checked out the DB schema and didn't see a 'sessions_id_seq' anywhere,
and the only place that I could find it was in auth.py in the koji python
utilities scripts (which is where it's failing, I believe).
Can someone explain to me how this is being used and/or how to fix this
issue?
Thanks in advance.
- Steve Webb
--
Steve Webb | System Administrator
Beatport | Music for DJ's
------------------------------------------
2399 Blake Street, Suite 170
Denver, Colorado USA 80205
tel: +1.720.932.9103
fax: +1.720.932.9104
noc: +1.303.565.2710
mobile: +1.303.564.4269
13 years, 4 months
[PATCH] Add --wait option to regen-repo
by Jeroen van Meeuwen
Hello,
I have a customer with a rather limited build infrastructure in terms of
resources, but the requirement to regularly regenerate the repositories used
to pick up changes made to the external repositories.
While the command is being issued from a cronjob, there's no tty and thus koji
thinks it's being ran in the background, while in fact I want it to only run
one regen-repo at a time.
The attached patch adds --wait where we also have --nowait, in order to force
koji to wait for the regen-repo command to complete whether successful or not,
whether running in the "background" or not, making sure that only one regen-
repo task hogs the limited resources at a time.
Thanks in advance,
Kind regards,
Jeroen van Meeuwen
-kanarip
13 years, 4 months
how to use mash update ?
by Eric Zhong
I can use mash to get all packages from koji with "mash dist-fc13"
When i have a new build , i don't want to reget all packages form koji , i
just want to get the package like update .
can mash do that?
How to use mash to get update packages?
How to use these options below ,and What is their purpose?
-p PREVIOUS, --previous=PREVIOUS
previous mash run to use as basis for createrepo
-d DELTA, --delta=DELTA
previous directory to use for deltarpm creation
I can't find docs for mash, ^-^
Thanks
13 years, 4 months
Koji 1.4.0 on RHEL 5.5
by Allen Hewes
Hi Folks,
I am assuming I have the right list? I thought that the infrastructure@ one could be a possibility, but I see some of the koji nijas here... If I am in the wrong place, lemme know where the right place is! ;-)
I have followed the Koji guide at http://fedoraproject.org/wiki/Koji/ServerHowTo.
I also followed the "server bootstrap" guide at http://fedoraproject.org/wiki/Koji/ServerBootstrap.
I am a real koji noob, so I am not comfortable with all the terms and flow. I am still working on understanding how koji works.
I can do all kinds of stuff with the koji cli, so I know I at least got something right.
But I get errors on task newRepo. After getting koji up to snuff via the ServerHowTo, I run these commands from kojiadmin user;
koji import ifstat-1.1-1.3.el5.src.rpm
koji add-tag dist-foo
koji add-pkg --owner allen dist-foo ifstat
koji tag-pkg dist-foo ifstat-1.1-1.3.el5
koji add-tag --parent dist-foo --arches i386 dist-foo-build
koji add-target dist-foo dist-foo-build
Then I get in /var/log/kojid.log:
2010-11-01 03:03:01,390 [WARNING] koji.build.TaskManager: TRACEBACK: Traceback (most recent call last):
File "/usr/sbin/kojid", line 1458, in runTask
response = (handler.run(),)
File "/usr/sbin/kojid", line 1534, in run
return self.handler(*self.params,**self.opts)
File "/usr/sbin/kojid", line 3772, in handler
for f in os.listdir(self.datadir):
OSError: [Errno 2] No such file or directory: '/mnt/koji/kojid/tasks/4/4/repo/repodata'
Then further down:
2010-11-01 03:03:19,708 [WARNING] koji.build.TaskManager: FAULT:
Traceback (most recent call last):
File "/usr/sbin/kojid", line 1458, in runTask
response = (handler.run(),)
File "/usr/sbin/kojid", line 1534, in run
return self.handler(*self.params,**self.opts)
File "/usr/sbin/kojid", line 3729, in handler
results = self.wait(subtasks.values(), all=True, failany=True)
File "/usr/sbin/kojid", line 1621, in wait
return dict(session.host.taskWaitResults(self.id,subtasks))
File "/usr/lib/python2.4/site-packages/koji/__init__.py", line 1468, in __call__
return self.__func(self.__name,args,opts)
File "/usr/lib/python2.4/site-packages/koji/__init__.py", line 1718, in _callMethod
raise err
Fault: <Fault 1: 'Traceback (most recent call last):
File "/usr/sbin/kojid", line 1458, in runTask
response = (handler.run(),)
File "/usr/sbin/kojid", line 1534, in run
return self.handler(*self.params,**self.opts)
File "/usr/sbin/kojid", line 3772, in handler
for f in os.listdir(self.datadir):
OSError: [Errno 2] No such file or directory: \'/mnt/koji/kojid/tasks/4/4/repo/repodata\'
'>
tagBuild and tagNotification complete OK, they are task 1 and 2. From the DB, I can tell that newRepo is task 3 and createrepo is task 4, both are failing with the same "No such file or directory".
I am using koji and all associated RPMs from EPEL and base RHEL. This is a RHEL 5.5 machine. I do use some RPMForge bits, but the koji parts from the guides are either RH or EPEL. I am also running everything on one server; apache (koji-hub), kojid and kojira.
I can run mock just fine and createrepo works also.
I have seen a few posts with the same errors, but the response wasn't clear to me. I didn't quite get what the responder was saying, because mock and createrepo work on my system.
Any ideas?
Thanks much,
-Allen
13 years, 4 months
RE: Koji 1.4.0 on RHEL 5.5
by Allen Hewes
> On 5.5 you need to install python-hashlib and python-createrepo RPM
> packages. These required packages are installed if you are using koji
> RPM.
> The createrepo task creates the repository with the python library and
> not with createrepo command and createrepo RPM on
> REHL5.5 don't contain this library.
Pierre,
I forgot to add that I did see your post... ;-)
And here's the installed RPMs on my box...
$ sudo rpm -qa | grep 'createrepo\|hashlib\|koji'
koji-web-1.4.0-2.el5.noarch
createrepo-0.4.11-3.el5.noarch
koji-hub-1.4.0-2.el5.noarch
koji-1.4.0-2.el5.noarch
koji-utils-1.4.0-2.el5.noarch
koji-builder-1.4.0-2.el5.noarch
python-createrepo-0.9.6-1.el5.noarch
koji-hub-plugins-1.4.0-2.el5.noarch
python-hashlib-20081119-4.el5.i386
-Allen
13 years, 5 months