Errors in handling XML-RPC requests are not visible anywhere

Bug #897515 reported by Michael Hudson-Doyle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA Deployment Tool
Won't Fix
Undecided
Unassigned
Linaro XML-RPC application for Django
Won't Fix
Critical
Unassigned

Bug Description

Filing this as a bug is a bit cheeky I guess -- but maybe it should go in the README file.

I can't find the tracebacks corresponding to internal errors. Where are they?

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Specifically here I mean errors in XML-RPC methods.

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

I think those are not displayed verbosely without debugging. We should roll our middleware for consistent debugging I think (sentry?). Otherwise I can see tracebacks (for everything EXCEPT API requests that technically need to fail differently) in lava-uwsgi.log

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I think you're right about other errors being in lava-uwsgi.log. But we need to be able to see the tracebacks for xml-rpc internal errors so let's repurpose this bug for that...

summary: - not obvious where server side errors end up
+ Errors in handling XML-RPC requests are not visible anywhere
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

We need to integrate linaro-django-xmlrpc with some logging facility then. Currently each API bug just logs an exception AFAIR but somehow this is lost.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

I'm having one of those "why is everything so hard" days wrt this :(

It seems to me that we could get something useful fairly quickly by arranging to send unhandled xmlrpc exceptions to syslog. Django 1.3 has some kind of support for configuring logging from settings.py, so I think something like:

LOGGING = {
    'version': 1,
    'handlers': {
        'errorsys': {
            'class': 'logging.handers.SyslogHandler',
            'level': logging.ERROR,
        },
    },
    'loggers': {
        'linaro_django_xmlrpc.models.Dispatcher': {
            'handlers':['errorsys'],
            'propagate': True,
        },
    },
}

plus a change to linaro_django_xmlrpc to not call .exception on the root logger when handling an unhandled exception by default should at least get us to the point where we can see the exceptions.

The real fix is to install sentry I guess, but that seems a bit more involved (need to get sentry server installed somehow, then raven, then configure LOGGING to send stuff to sentry).

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Of course, when I try to configure logging like that (with trivial typos fixed), it (a) doesn't work (b) errors in xml-rpc methods show up in the uswgi.log file anyway -- even when I try to revert to a vanilla-ish setup.

I'm giving up and going home for now.

Zygmunt Krynicki (zyga)
Changed in linaro-django-xmlrpc:
status: New → Confirmed
importance: Undecided → Critical
Changed in lava-deployment-tool:
status: New → Invalid
Alan Bennett (akbennett)
Changed in linaro-django-xmlrpc:
status: Confirmed → Won't Fix
Changed in lava-deployment-tool:
status: Invalid → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.