← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~lifeless/launchpad/librarian into lp:launchpad/devel

 

Robert Collins has proposed merging lp:~lifeless/launchpad/librarian into lp:launchpad/devel.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  #86185 Librarian should log OOPS reports
  https://bugs.launchpad.net/bugs/86185


Start logging OOPS reports in the librarian using the existing OOPS code that codehosting developed.

No tests which makes me sad, but the primary failure mode here is bad config, which we wouldn't catch anyway.
-- 
https://code.launchpad.net/~lifeless/launchpad/librarian/+merge/30880
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~lifeless/launchpad/librarian into lp:launchpad/devel.
=== modified file 'configs/development/launchpad-lazr.conf'
--- configs/development/launchpad-lazr.conf	2010-07-21 08:15:57 +0000
+++ configs/development/launchpad-lazr.conf	2010-07-25 05:18:45 +0000
@@ -161,6 +161,8 @@
 restricted_download_port: 58085
 restricted_download_url: http://launchpad.dev:58085/
 use_https = False
+oops_prefix: L
+error_dir: /var/tmp/codehosting.test
 
 [librarian_server]
 root: /var/tmp/fatsam

=== modified file 'daemons/librarian.tac'
--- daemons/librarian.tac	2010-04-20 14:27:26 +0000
+++ daemons/librarian.tac	2010-07-25 05:18:45 +0000
@@ -19,6 +19,7 @@
 from canonical.librarian.libraryprotocol import FileUploadFactory
 from canonical.librarian import storage, db
 from canonical.librarian import web as fatweb
+from lp.services.twistedsupport.loggingsupport import set_up_oops_reporting
 
 # Connect to database
 dbconfig.setConfigSection('librarian')
@@ -70,6 +71,9 @@
 uploadPort = config.librarian.restricted_upload_port
 setUpListener(uploadPort, webPort, restricted=True)
 
+# Log OOPS reports
+set_up_oops_reporting('librarian', 'librarian')
+
 # Setup a signal handler to dump the process' memory upon 'kill -44'.
 def sigdumpmem_handler(signum, frame):
     scanner.dump_all_objects(DUMP_FILE)

=== modified file 'lib/canonical/config/schema-lazr.conf'
--- lib/canonical/config/schema-lazr.conf	2010-07-24 00:07:54 +0000
+++ lib/canonical/config/schema-lazr.conf	2010-07-25 05:18:45 +0000
@@ -1225,6 +1225,12 @@
 
 use_https = True
 
+# See [error_reports].
+# Must be unique per librarian instance.
+oops_prefix: none
+
+# see [error_reports].
+error_dir: none
 
 [librarian_gc]
 # The database user which will be used by this process.