Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/oops-repo-breakage into
lp:maas.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~jtv/maas/oops-repo-breakage/+merge/100362
Our oops setup had two problems, which I learned about by running into bug
971255:
1. pserv created a DateDirRepo without an instance id, which is now the
recommended way; maasserver created it with an instance id, which has the
advantage of including sortable timestamps in the names of oops files.
Apparently the latter uses a now-obsolete naming scheme and the two settings
can't live together.
2. The DateDirRepo code does not deal well with unexpected files in the oops
directory. Even though each day gets its own neat dated subdirectory, having
other files in the oops directory may break things.
And so this branch:
- creates both DateDirRepo instances without an instance_id, and
- moves the oopses into a subdirectory oops/logs that they won't have to share
with other logs.
Unfortunately this does mean that the names of oops files become opaque hashes.
They'll no longer show up as a chronological sequence in a standard file
listing.
--
https://code.launchpad.net/~jtv/maas/oops-repo-breakage/+merge/100362
Your team Launchpad code reviewers is requested to review the proposed merge of
lp:~jtv/maas/oops-repo-breakage into lp:maas.
=== modified file 'etc/pserv.yaml'
--- etc/pserv.yaml 2012-03-15 22:43:55 +0000
+++ etc/pserv.yaml 2012-04-02 07:15:23 +0000
@@ -15,8 +15,11 @@
## OOPS configuration (optional).
#
oops:
+ ## Directory in which to place OOPS reports. Must not contain any files
+ # or directories other than what the oops machinery creates there.
+ #
# directory:
- directory: "logs"
+ directory: "logs/oops"
# reporter:
reporter: "maas-pserv"
=== modified file 'etc/txlongpoll.yaml'
--- etc/txlongpoll.yaml 2012-03-15 22:43:55 +0000
+++ etc/txlongpoll.yaml 2012-04-02 07:15:23 +0000
@@ -13,9 +13,11 @@
## OOPS configuration.
#
oops:
- ## Directory in which to place OOPS reports.
+ ## Directory in which to place OOPS reports. Must not contain any files
+ # or directories other than what the oops machinery creates there.
+ #
# directory: ""
- directory: "logs"
+ directory: "logs/oops"
## The reporter used when generating OOPS reports.
# reporter: "LONGPOLL"
reporter: "maas-txlongpoll"
=== modified file 'src/maas/settings.py'
--- src/maas/settings.py 2012-03-27 07:52:50 +0000
+++ src/maas/settings.py 2012-04-02 07:15:23 +0000
@@ -39,7 +39,7 @@
MANAGERS = ADMINS
# Location where python-oops should store errors.
-OOPS_REPOSITORY = 'logs'
+OOPS_REPOSITORY = 'logs/oops'
LOGOUT_URL = '/'
LOGIN_REDIRECT_URL = '/'
=== modified file 'src/maasserver/management/commands/runserver.py'
--- src/maasserver/management/commands/runserver.py 2012-03-10 19:26:16 +0000
+++ src/maasserver/management/commands/runserver.py 2012-04-02 07:15:23 +0000
@@ -79,7 +79,7 @@
# Django's debug mode causes it to handle exceptions itself, so
# don't expect oopses when DEBUG is set to True.
oops_config = oops.Config()
- oops_repository = DateDirRepo(settings.OOPS_REPOSITORY, 'maasserver')
+ oops_repository = DateDirRepo(settings.OOPS_REPOSITORY)
oops_config.publishers.append(oops_repository.publish)
install_hooks(oops_config)
return make_app(wsgi_handler, oops_config, error_render=render_error)
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help : https://help.launchpad.net/ListHelp