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
=== 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-26 09:26:09 +0000
@@ -161,6 +161,8 @@
161restricted_download_port: 58085161restricted_download_port: 58085
162restricted_download_url: http://launchpad.dev:58085/162restricted_download_url: http://launchpad.dev:58085/
163use_https = False163use_https = False
164oops_prefix: L
165error_dir: /var/tmp/codehosting.test
164166
165[librarian_server]167[librarian_server]
166root: /var/tmp/fatsam168root: /var/tmp/fatsam
167169
=== modified file 'daemons/librarian.tac'
--- daemons/librarian.tac 2010-04-20 14:27:26 +0000
+++ daemons/librarian.tac 2010-07-26 09:26:09 +0000
@@ -19,6 +19,7 @@
19from canonical.librarian.libraryprotocol import FileUploadFactory19from canonical.librarian.libraryprotocol import FileUploadFactory
20from canonical.librarian import storage, db20from canonical.librarian import storage, db
21from canonical.librarian import web as fatweb21from canonical.librarian import web as fatweb
22from lp.services.twistedsupport.loggingsupport import set_up_oops_reporting
2223
23# Connect to database24# Connect to database
24dbconfig.setConfigSection('librarian')25dbconfig.setConfigSection('librarian')
@@ -70,6 +71,9 @@
70uploadPort = config.librarian.restricted_upload_port71uploadPort = config.librarian.restricted_upload_port
71setUpListener(uploadPort, webPort, restricted=True)72setUpListener(uploadPort, webPort, restricted=True)
7273
74# Log OOPS reports
75set_up_oops_reporting('librarian', 'librarian')
76
73# Setup a signal handler to dump the process' memory upon 'kill -44'.77# Setup a signal handler to dump the process' memory upon 'kill -44'.
74def sigdumpmem_handler(signum, frame):78def sigdumpmem_handler(signum, frame):
75 scanner.dump_all_objects(DUMP_FILE)79 scanner.dump_all_objects(DUMP_FILE)
7680
=== 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-26 09:26:09 +0000
@@ -1225,6 +1225,13 @@
12251225
1226use_https = True1226use_https = True
12271227
1228# See [error_reports].
1229# Must be unique per librarian instance.
1230oops_prefix: none
1231# Must be set per librarian instance.
1232error_dir: none
1233# Must be false: librarian has no zlog.
1234copy_to_zlog: False
12281235
1229[librarian_gc]1236[librarian_gc]
1230# The database user which will be used by this process.1237# The database user which will be used by this process.