Koji config?
by Brian Kosick
Hello,
So I'm trying other areas as I get to them, I'm trying to setup koji
integration now.
I have the server correctly setup as a koji build host (kojid) and I can
successfully request koji builds as myself from this server.
However, I can't seem to get the
tg-admin command to work
tg-admin --config=/etc/bodhi/bodhi.cfg shell
>>> from bodhi.buildsys import get_session
>>> koji = get_session()
# Koji's XML-RPC hub
koji_hub = 'http://build64.qa.mxlogic.com/kojihub'
# Koji certs
client_cert = '/etc/bodhi/kojicerts/apache.pem'
clientca_cert = '/etc/bodhi/kojicerts/fedora-cacert.cert'
serverca_cert = '/etc/bodhi/kojicerts/fedora-cacert.cert'
FYI my clientca and serverca happen to be the same.
I'm getting
[bkosick@builder5 bodhi]$ tg-admin --config=/etc/bodhi/bodhi.cfg shell
Python 2.4.3 (#1, Jun 11 2009, 14:09:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(CustomShell)
>>> from bodhi.buildsys import get_session
>>> koji = get_session()
Traceback (most recent call last):
File "<console>", line 1, in ?
File "/home/bkosick/tmpclones/bodhi/bodhi/buildsys.py", line 183, in get_session
session = koji_login()
File "/home/bkosick/tmpclones/bodhi/bodhi/buildsys.py", line 175, in koji_login
koji_session.ssl_login(client, clientca, serverca)
File "/usr/lib/python2.4/site-packages/koji/__init__.py", line 1411, in ssl_login
sinfo = self.callMethod('sslLogin', proxyuser)
File "/usr/lib/python2.4/site-packages/koji/__init__.py", line 1456, in callMethod
return self._callMethod(name, args, opts)
File "/usr/lib/python2.4/site-packages/koji/__init__.py", line 1481, in _callMethod
return proxy.__getattr__(name)(*args)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/usr/lib64/python2.4/xmlrpclib.py", line 1129, in request
self.send_content(h, request_body)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1243, in send_content
connection.endheaders()
File "/usr/lib64/python2.4/httplib.py", line 804, in endheaders
self._send_output()
File "/usr/lib64/python2.4/httplib.py", line 685, in _send_output
self.send(msg)
File "/usr/lib64/python2.4/httplib.py", line 664, in send
self.sock.sendall(str)
File "/usr/lib/python2.4/site-packages/koji/ssl/SSLConnection.py", line 110, in sendall
sent = con.send(data, flags)
Error: [('SSL routines', 'SSL3_GET_SERVER_CERTIFICATE', 'certificate verify failed')]
I guess my question is it looking for a user or host cert for the
bodhi->koji interaction?
Thanks,
--
Brian Kosick
CM Manager
Brian_Kosick(a)mcafee.com
bkosick(a)mxlogic.com
720-895-4479
14 years, 4 months
Re: [bodhi] #365: Still haveing issue where releases "disappear"
by Brian Kosick
Getting in server.log
bodhi.jobs] ERROR 2009-11-04 17:52:49,818 invalid literal for int():
RHEL5
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/bodhi/jobs.py", line 136, in
cache_release_data
Releases().update()
File "/usr/lib/python2.4/site-packages/bodhi/model.py", line 1010, in
update
releases.sort(lambda x, y: cmp(int(x['long_name'].split()[-1]),
File "/usr/lib/python2.4/site-packages/bodhi/model.py", line 1010, in
<lambda>
releases.sort(lambda x, y: cmp(int(x['long_name'].split()[-1]),
ValueError: invalid literal for int(): RHEL5
[bodhi.jobs] INFO 2009-11-04 17:52:49,820 Release cache complete
This is the command that I used:
tg-admin --config /etc/bodhi/bodhi.cfg shell
Python 2.4.3 (#1, Jun 11 2009, 14:09:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(CustomShell)
>>> release = Release(name='MXLExtras', long_name='MXL Extras RHEL5',
id_prefix='MXLEXTRAS', dist_tag='dist-mxl-el5-64')
>>> from bodhi.jobs import refresh_metrics
>>> refresh_metrics()
>>> Do you wish to commit your database changes? [yes]yes
On Wed, 2009-11-04 at 17:44 -0700, bodhi wrote:
> #365: Still haveing issue where releases "disappear"
> ---------------------------------+------------------------------------------
> Reporter: bkosick(a)mxlogic.com | Type: defect
> Status: new | Priority: major
> Milestone: | Component: bodhi-server
> Version: | Keywords:
> ---------------------------------+------------------------------------------
> https://fedorahosted.org/bodhi/ticket/252#comment:1
>
> Even after following the
>
> tg-admin --config=prod.cfg shell
> >>> from bodhi.jobs import refresh_metrics
> >>> refresh_metrics
>
>
> Instructions
>
> Also the instructions should show that ">>> refresh_metrics" needs to be
> ">>> refresh_metrics()"
> otherwise nothing happens
>
> --
> Ticket URL: <https://fedorahosted.org/bodhi/ticket/365>
> bodhi <https://fedorahosted.org/bodhi>
> Bodhi is a web application that facilitates the process of publishing updates for a software distribution.
--
Brian Kosick
CM Manager
Brian_Kosick(a)mcafee.com
bkosick(a)mxlogic.com
720-895-4479
14 years, 4 months
Authentication questions/setup
by Brian Kosick
Hi All,
After a long eventful year, I'm finally able to restart my bodhi
implementation. After some head-banging, I figured out that bodhi's
mod_wsgi and koji/spacewalks mod_python do not play nice together on the
same http server. So I install the latest 0.6.11 as an rpm on a new
server and have it up and running following these instructions:
https://fedorahosted.org/bodhi/wiki/Deployment.
My problem now is I'm trying to authenticate, according to the app.cfg
file it seems (to me) that I can use bugzilla as my auth system which
I'm trying to do. However when I try to use these settings in app.cfg:
<snip>
##
## Bugzilla settings. The username/password for our bugzilla account
comes
## from the bodhi_{email,password} fields.
##
bz_server = 'https://bugzilla.corp.mxlogic.com/bugzilla/xmlrpc.cgi'
bz_cookie = None
<snip>
# IDENTITY
# General configuration of the TurboGears Identity management module
# --------
# Switch to turn on or off the Identity management module
identity.on=True
# [REQUIRED] URL to which CherryPy will internally redirect when an
access
# control check fails. If Identity management is turned on, a value for
this
# option must be specified.
identity.failure_url="/login"
#identity.provider='sqlobjectcsrf'
identity.provider='bugzilla'
# The names of the fields on the login form containing the visitor's
user ID
# and password. In addition, the submit button is specified simply so
its
# existence may be stripped out prior to passing the form data to the
target
# controller.
#identity.form.user_name="user_name"
#identity.form.password="password"
#identity.form.submit="login"
# What sources should the identity provider consider when determining
the
# identity associated with a request? Comma separated list of identity
sources.
# Valid sources: form, visit, http_auth
#identity.source="form,http_auth,visit"
I get a "500 internal server error" and the following in httpd error
log
--------
[Wed Nov 04 16:58:34 2009]
[error] /usr/lib/python2.4/site-packages/bodhi/search.py:45:
DeprecationWarning: default_reversed is deprecated. Use
default_order='-field' to in
dicate default reversed order, or default_order=['field1', '-field2,
'field3'] for multiple fields.
[Wed Nov 04 16:58:34 2009] [error] limit=25,
allow_limit_override=True)
[Wed Nov 04 16:58:34 2009]
[error] /usr/lib/python2.4/site-packages/bodhi/search.py:45:
DeprecationWarning: allow_limit_override is deprecated. Use max_limit to
specify an
upper bound for limit.
[Wed Nov 04 16:58:34 2009] [error] limit=25,
allow_limit_override=True)
[Wed Nov 04 16:58:34 2009]
[error] /usr/lib/python2.4/site-packages/bodhi/controllers.py:212:
DeprecationWarning: allow_limit_override is deprecated. Use max_limit to
speci
fy an upper bound for limit.
[Wed Nov 04 16:58:34 2009] [error]
@expose(template="bodhi.templates.list", allow_json=True)
[Wed Nov 04 16:58:34 2009]
[error] /usr/lib/python2.4/site-packages/bodhi/controllers.py:362:
DeprecationWarning: allow_limit_override is deprecated. Use max_limit to
speci
fy an upper bound for limit.
[Wed Nov 04 16:58:34 2009] [error]
@expose(template="bodhi.templates.mine", allow_json=True)
[Wed Nov 04 16:58:34 2009]
[error] /usr/lib/python2.4/site-packages/bodhi/controllers.py:842:
DeprecationWarning: allow_limit_override is deprecated. Use max_limit to
speci
fy an upper bound for limit.
[Wed Nov 04 16:58:34 2009] [error]
@expose(template='bodhi.templates.list')
[Wed Nov 04 16:58:34 2009]
[error] /usr/lib/python2.4/site-packages/bodhi/controllers.py:1063:
DeprecationWarning: allow_limit_override is deprecated. Use max_limit to
spec
ify an upper bound for limit.
[Wed Nov 04 16:58:34 2009] [error]
@expose(template='bodhi.templates.comments')
[Wed Nov 04 16:58:34 2009]
[error] /usr/lib/python2.4/site-packages/bodhi/controllers.py:1147:
DeprecationWarning: allow_limit_override is deprecated. Use max_limit to
specify an upper bound for limit.
[Wed Nov 04 16:58:34 2009] [error]
@expose(template="bodhi.templates.user")
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,867 CONFIG: Server parameters:
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,868 CONFIG: server.environment: development
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,868 CONFIG: server.log_to_screen: True
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,868 CONFIG: server.log_file: server.log
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,869 CONFIG: server.log_tracebacks: True
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,869 CONFIG: server.log_request_headers: True
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,869 CONFIG: server.protocol_version: HTTP/1.0
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,870 CONFIG: server.socket_host:
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,870 CONFIG: server.socket_port: 8084
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,870 CONFIG: server.socket_file:
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,871 CONFIG: server.reverse_dns: False
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,871 CONFIG: server.socket_queue_size: 5
[Wed Nov 04 16:58:34 2009] [error] [cherrypy.msg] INFO 2009-11-04
16:58:34,872 CONFIG: server.thread_pool: 10
[Wed Nov 04 16:58:34 2009] [error] [turbogears.visit] INFO 2009-11-04
16:58:34,991 Visit Tracking starting
[Wed Nov 04 16:58:34 2009] [error] [turbogears.visit.sovisit] INFO
2009-11-04 16:58:34,997 Succesfully loaded "bodhi.model.Visit"
[Wed Nov 04 16:58:35 2009] [error] [turbogears.visit] INFO 2009-11-04
16:58:35,003 Visit filter initialised
[Wed Nov 04 16:58:35 2009] [error] [turbogears.identity] INFO 2009-11-04
16:58:35,006 Identity starting
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] mod_wsgi
(pid=15659): Target WSGI script '/usr/share/bodhi/bodhi.wsgi' cannot be
loaded as Python module.
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] mod_wsgi
(pid=15659): Exception occurred processing WSGI script
'/usr/share/bodhi/bodhi.wsgi'.
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] Traceback (most
recent call last):
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] File
"/usr/share/bodhi/bodhi.wsgi", line 29, in ?
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182]
cherrypy.server.start(init_only=True, server_class=None)
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] File
"/usr/lib/python2.4/site-packages/cherrypy/_cpserver.py", line 72, in
start
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182]
Engine.start(self)
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] File
"/usr/lib/python2.4/site-packages/cherrypy/_cpengine.py", line 106, in
start
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182]
self._start()
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] File
"/usr/lib/python2.4/site-packages/cherrypy/_cpserver.py", line 78, in
_start
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182]
Engine._start(self)
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] File
"/usr/lib/python2.4/site-packages/cherrypy/_cpengine.py", line 110, in
_start
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] func()
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] File
"/usr/lib/python2.4/site-packages/turbogears/startup.py", line 276, in
startTurboGears
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182]
ext.start_extension()
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] File
"/usr/lib/python2.4/site-packages/turbogears/identity/visitor.py", line
38, in start_extension
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182]
create_extension_model()
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] File
"/usr/lib/python2.4/site-packages/turbogears/identity/visitor.py", line
51, in create_extension_model
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] provider =
create_default_provider()
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] File
"/usr/lib/python2.4/site-packages/turbogears/identity/__init__.py", line
45, in create_default_provider
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182]
provider_class = load_class(provider_plugin)
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] File
"/usr/lib/python2.4/site-packages/turbogears/util.py", line 433, in
load_class
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] return
getattr(module, classname)
[Wed Nov 04 16:58:35 2009] [error] [client 10.30.0.182] AttributeError:
'module' object has no attribute 'bugzilla'
--
Brian Kosick
CM Manager
Brian_Kosick(a)mcafee.com
bkosick(a)mxlogic.com
720-895-4479
14 years, 4 months