Diff for "QA/OopsToolsSetup"

Not logged in - Log In / Register

Differences between revisions 8 and 9
Revision 8 as of 2011-04-19 02:58:09
Size: 2347
Editor: lifeless
Comment: note how to add users.
Revision 9 as of 2011-04-19 03:19:41
Size: 2445
Editor: lifeless
Comment: note that we need to edit the reports
Deletions are marked like this. Additions are marked like this.
Line 43: Line 43:
and click the Load prefixes button. You should see a list of new prefixes added if there were any new ones to add. and click the Load prefixes button. You should see a list of new prefixes added if there were any new ones to add. After loading the new prefixes be sure to edit the relevant reports under 'creating new reports'.

Launchpad oops-tools setup

This page describes how to deploy new code to Launchpad's oops-tools instance, how and which cronjobs are configured, how to make the tool aware of new prefixes when those are added to Launchpad's config files and how to create new reports to be sent to the list.

oops-tools deployment

To deploy a new version of LP's oops-tools instance:

ssh devpad
sudo su - lpqateam
cd /srv/lp-oops.canonical.com/cgi-bin/lpoops
bzr up

If there are changes to the models and/or you need to do data migration (a new migration has been created) then run:

bin/django migrate

Usually there's no need to restart the service after an update. Oops tools has a monitor.py script (see src/oopstools/monitor.py) which monitors changes to .py files and when there are changes to them, it kills the process and starts a new one.

cronjobs

There are some cronjobs setup in the lpqateam crontab.

  • update_db: script that loads oops reports from the file system into the oops-tools database.
  • dir_finder: script that searches the file system for new oops directories and build the cache used by the update_db script to look up for oopses.
  • report: script that saves a daily aggregation of OOPS report that happened in the previous day. It also emails the report to the launchpad mailing list.

Loading new prefixes

Once new prefixes are added to lp:lp-production-configs, they need to be added to oops-tools. Go to:

 https://lp-oops.canonical.com/prefixloader/

and click the Load prefixes button. You should see a list of new prefixes added if there were any new ones to add. After loading the new prefixes be sure to edit the relevant reports under 'creating new reports'.

Creating new reports

To create a new report which will be sent to the LP mailing list daily go to: https://lp-oops.canonical.com/admin/oops/report. If you don't have access run bin/django createsuperuser.

There you can add a new report or change the existing ones.

Each report is composed by a name, the title of the report which will be used in the email sent to the list, a summary type, which know how to group the OOPSes and render the html and txt output and prefixes, which are the OOPS prefixes in the given report.

QA/OopsToolsSetup (last edited 2012-09-21 00:14:34 by lifeless)