Comment 1 for bug 889982

Revision history for this message
Robert Collins (lifeless) wrote : Re: crash inserting report into DB

I patched the orm to get this out:
SELECT "oops_prefix"."id", "oops_prefix"."value", "oops_prefix"."appinstance_id" FROM "oops_prefix" WHERE "oops_prefix"."value" = %s ('F5054932567230492013CE',)
SELECT "oops_appinstance"."id", "oops_appinstance"."title" FROM "oops_appinstance" WHERE "oops_appinstance"."title" = %s ('F5054932567230492013CE',)
INSERT INTO "oops_prefix" ("value", "appinstance_id") VALUES (%s, %s) ('F5054932567230492013CE', 44)

So it looks like the schema needs a tweak to support appinstances that are not noddily short.

This is the file on disk (different because of different python dictionary order; may want to tweak that)
grep -i F5054932567230492013CE -r /srv/oops-amqp/staging/
/srv/oops-amqp/staging/2011-11-09/OOPS-914c6f3d5bba6a35f70d10c60f21d0d7

>>> import bson
>>> content = file('/srv/oops-amqp/staging/2011-11-09/OOPS-914c6f3d5bba6a35f70d10c60f21d0d7', 'rb').read()
>>> d = bson.loads(content)
>>> d.keys()
[u'revno', u'req_vars', u'reporter', u'url', u'branch_nick', u'timeline', u'hostname', u'value', u'ignore', u'time', u'duration', u'type', u'id', u'tb_text']
>>> d['reporter']
>>> d['hostname']
'tellurium'
u'req_vars': [['<oops-message-268>', "Failure: error(111, 'Connection refused')"], ['path', '/srv/bazaar.staging.launchpad.net/staging/launchpad/cronscripts/translations-export-to-branch.py'], ['script_name', 'translations-export-to-branch']],

So this is a misconfigured/oddly configured translations script, trying to dynamically allocate an appserver instance when no sensible reporter exists.

I think we should change the code to not use the oops id, but instead use the hostname or something - or just 'unknown' - its less likely to proliferate.