Merge lp:~lifeless/launchpad/librarian into lp:launchpad

Proposed by Robert Collins
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: no longer in the source branch.
Merged at revision: 11228
Proposed branch: lp:~lifeless/launchpad/librarian
Merge into: lp:launchpad
Diff against target: 52 lines (+13/-0)
3 files modified
configs/development/launchpad-lazr.conf (+2/-0)
daemons/librarian.tac (+4/-0)
lib/canonical/config/schema-lazr.conf (+7/-0)
To merge this branch: bzr merge lp:~lifeless/launchpad/librarian
Reviewer Review Type Date Requested Status
Michael Hudson-Doyle Approve
Review via email: mp+30880@code.launchpad.net

Description of the change

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.

To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Looks fine. Have you prepared a lp-production-configs branch to go along with this?

review: Approve
Revision history for this message
Robert Collins (lifeless) wrote :

Can't do the prod change till I get the directory from losas; emailed
them about 17 hours back :)

-Rob

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'configs/development/launchpad-lazr.conf'
2--- configs/development/launchpad-lazr.conf 2010-07-21 08:15:57 +0000
3+++ configs/development/launchpad-lazr.conf 2010-07-26 09:26:09 +0000
4@@ -161,6 +161,8 @@
5 restricted_download_port: 58085
6 restricted_download_url: http://launchpad.dev:58085/
7 use_https = False
8+oops_prefix: L
9+error_dir: /var/tmp/codehosting.test
10
11 [librarian_server]
12 root: /var/tmp/fatsam
13
14=== modified file 'daemons/librarian.tac'
15--- daemons/librarian.tac 2010-04-20 14:27:26 +0000
16+++ daemons/librarian.tac 2010-07-26 09:26:09 +0000
17@@ -19,6 +19,7 @@
18 from canonical.librarian.libraryprotocol import FileUploadFactory
19 from canonical.librarian import storage, db
20 from canonical.librarian import web as fatweb
21+from lp.services.twistedsupport.loggingsupport import set_up_oops_reporting
22
23 # Connect to database
24 dbconfig.setConfigSection('librarian')
25@@ -70,6 +71,9 @@
26 uploadPort = config.librarian.restricted_upload_port
27 setUpListener(uploadPort, webPort, restricted=True)
28
29+# Log OOPS reports
30+set_up_oops_reporting('librarian', 'librarian')
31+
32 # Setup a signal handler to dump the process' memory upon 'kill -44'.
33 def sigdumpmem_handler(signum, frame):
34 scanner.dump_all_objects(DUMP_FILE)
35
36=== modified file 'lib/canonical/config/schema-lazr.conf'
37--- lib/canonical/config/schema-lazr.conf 2010-07-24 00:07:54 +0000
38+++ lib/canonical/config/schema-lazr.conf 2010-07-26 09:26:09 +0000
39@@ -1225,6 +1225,13 @@
40
41 use_https = True
42
43+# See [error_reports].
44+# Must be unique per librarian instance.
45+oops_prefix: none
46+# Must be set per librarian instance.
47+error_dir: none
48+# Must be false: librarian has no zlog.
49+copy_to_zlog: False
50
51 [librarian_gc]
52 # The database user which will be used by this process.