Skip to main content


Project description

This file is part of oopstools

Copyright 2009-2011 Canonical Ltd. All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <>.

OOPS Tools

This is a Django application to analyze OOPS reports

Please see and for how to develop in this


OOPStools uses buildout for configuration.

All dependencies (except for the database packages) are available from the
lazr-source-dependencies branch on Launchpad. Simply typing make will set-up
the download-cache of dependencies eggs and then create the buildout.

If you already have that shared eggs cache branch available locally (to share
between branches of the Lazr project), simply set the LAZR_SOURCEDEPS_DIR to
the directory containing the download-cache and eggs directories before
invoking make.

To run under apache with mod_wsgi (recommended)

* libapache2-mod-wsgi package

To run under apache with mod_python

* libapache2-mod-python package

Deployment using mod_wsgi

Update the production.cfg file with your database configuration and the paths
to your OOPS directories:

db-name = /path/to/your/oops.db
index-template = 'index.html'
oopsdir = /path/to/oops/reports

Update setting a custom SECRET_KEY

To deploy oops tools make sure all the dependecies are installed.

* bin/buildout -c production.cfg

* Run bin/django syncdb

* Run bin/django migrate

* Copy apache/ to /etc/apache2/sites-available/

Running locally

Sometimes Launchpad developers want to run oops-tools to help analyse locally
generated OOPS reports.

The first step is to setup the local database.

Local PostgreSQL setup

If you do Launchpad development, you probably have PostgreSQL already running
on port 5432. You'll need another cluster to run the oops-tools database.

Create a new cluster for lpoops:

$ LC_ALL=C sudo pg_createcluster 8.4 lpoops --encoding UNICODE --port 5433

Apply the following patch to /etc/postgresql/8.4/lpoops/pg_hba.conf. Note that
this configuration change needs to be before the "DO NOT DISABLE!" line in the
pg_hba.conf file.

sudo patch /etc/postgresql/8.4/lpoops/pg_hba.conf <<'EOF'
--- pg_hba.conf 2005-11-02 17:33:08.000000000 -0800
+++ /tmp/pg_hba.conf 2005-11-03 07:32:46.932400423 -0800
@@ -58,7 +58,9 @@
# on a non-local interface via the listen_addresses configuration parameter,
# or via the -i or -h command line switches.
+# Oops-tools users
+local all all trust
+host all all trust


In case localhost is using IPv6, you'll need an extra line just below the one above.

host all all ::1/128 trust

Start the cluster.

$ sudo pg_ctlcluster 8.4 lpoops start

Add your own user to the cluster:

$ sudo -u postgres /usr/lib/postgresql/8.4/bin/createuser -a -d $USER --port

To create the new db:

$ createuser lpoops --createdb --no-superuser --no-createrole --port 5433
$ createdb -O lpoops lpoops --host localhost --port 5433

Note that this command creates a password-less database. Use --password to
create a db with a password.

To delete the db:

$ dropdb lpoops --port 5433
$ dropuser lpoops --port 5433

Configuration changes

If you used a different port than 5433 for the PostgreSQL setup, pass the
DBPORT variable to make and it'll build the configuration files using the
value provided.

* `make DBPORT=$PORT`
* Run bin/django syncdb
* Run bin/django migrate
* `make run` at the root of the oops-tools directory
* Point your browser to http://localhost:8000/oops

NEWS for oopstools


* Initial release

* Add dependency on testtools and fixtures for cleaner tests.

* Fix race conditions with oops loading and non-sequential oopses. These can
occur when e.g. rsync is writing at the same time as oops loading, or if a
non-sequential publisher is used. (Robert Collins, #667373)

* Update to oops-datedir-repo 0.0.7 and add reading of bson serialized oopses
(which are more extensible and more easily parsed). (Robert Collins)

Project details

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page