Failures in bug heat calculation jobs don't get logged because of an error

Bug #530789 reported by Eleanor Berger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
Eleanor Berger

Bug Description

If an error occurs during the run of a bug heat job, it is not logged, because the error reporting itself is broken. Instead you get the following unhandled error:

launchpad@asuka:/srv/staging.launchpad.net/staging/launchpad/cronscripts$ python calculate-bug-heat.py
2010-03-02 15:53:30 INFO creating lockfile
2010-03-02 15:53:35 INFO Running synchronously.
Traceback (most recent call last):
  File "calculate-bug-heat.py", line 33, in <module>
    script.lock_and_run()
  File "/srv/staging.launchpad.net/staging/launchpad/lib/lp/services/scripts/base.py", line 290, in lock_and_run
    implicit_begin=implicit_begin, isolation=isolation)
  File "/srv/staging.launchpad.net/staging/launchpad/lib/lp/services/scripts/base.py", line 248, in run
    self.main()
  File "calculate-bug-heat.py", line 28, in main
    return super(RunCalculateBugHeat, self).main()
  File "/srv/staging.launchpad.net/staging/launchpad/lib/lp/services/job/runner.py", line 413, in main
    job_source, self.dbuser, self.logger)
  File "/srv/staging.launchpad.net/staging/launchpad/lib/lp/services/job/runner.py", line 226, in runFromSource
    runner.runAll()
  File "/srv/staging.launchpad.net/staging/launchpad/lib/lp/services/job/runner.py", line 244, in runAll
    oops = self.runJobHandleError(job)
  File "/srv/staging.launchpad.net/staging/launchpad/lib/lp/services/job/runner.py", line 186, in runJobHandleError
    return self._doOops(job, info)
  File "/usr/lib/python2.5/contextlib.py", line 33, in __exit__
    self.gen.throw(type, value, traceback)
  File "/srv/staging.launchpad.net/staging/launchpad/lib/canonical/launchpad/webapp/errorlog.py", line 574, in oopsMessage
    yield
  File "/srv/staging.launchpad.net/staging/launchpad/lib/lp/services/job/runner.py", line 186, in runJobHandleError
    return self._doOops(job, info)
  File "/srv/staging.launchpad.net/staging/launchpad/lib/lp/services/job/runner.py", line 195, in _doOops
    self.error_utility.raising(info)
  File "/srv/staging.launchpad.net/staging/launchpad/lib/canonical/launchpad/webapp/errorlog.py", line 412, in raising
    self._raising(info, request=request, now=now, informational=False)
  File "/srv/staging.launchpad.net/staging/launchpad/lib/canonical/launchpad/webapp/errorlog.py", line 416, in _raising
    entry = self._makeErrorReport(info, request, now, informational)
  File "/srv/staging.launchpad.net/staging/launchpad/lib/canonical/launchpad/webapp/errorlog.py", line 529, in _makeErrorReport
    oopsid, filename = self.newOopsId(now)
  File "/srv/staging.launchpad.net/staging/launchpad/lib/canonical/launchpad/webapp/errorlog.py", line 392, in newOopsId
    self.errordir(now)
  File "/srv/staging.launchpad.net/staging/launchpad/lib/canonical/launchpad/webapp/errorlog.py", line 350, in errordir
    errordir = os.path.join(self.error_dir, date)
  File "/usr/lib/python2.5/posixpath.py", line 62, in join
    elif path == '' or path.endswith('/'):
AttributeError: 'NoneType' object has no attribute 'endswith'

Revision history for this message
Eleanor Berger (intellectronica) wrote :

Setting importance to Critical since this is blocking QA for this release and could block the release itself.

Changed in malone:
importance: High → Critical
Revision history for this message
Eleanor Berger (intellectronica) wrote :

(16:30:26) gmb: intellectronica: It's simply a case of setting the error dir in schema-lazr.conf, I believe.
(16:30:56) gmb: intellectronica: You should then add separate ones in the devel and testing configs, so that the default is the one that we'll use in production and on staging.
(16:31:13) gmb: intellectronica: THe losas should be able to tell you what the directory should be.
(16:31:27) intellectronica: gmb: ok. do you know if there's an example i can copy from?
(16:34:09) gmb: intellectronica: Ah, okay, just looking, it looks like I'm wrong. The default (in schema-lazr.conf) should stay as none. You'll need to branch lp-production-configs and add error_dir entries in there for staging and production.
(16:34:25) gmb: intellectronica: You can see examples of how it's done in configs/development/launchpad-lazr.conf

Changed in malone:
assignee: nobody → Tom Berger (intellectronica)
Changed in malone:
status: Triaged → In Progress
Changed in malone:
status: In Progress → Fix Committed
Changed in malone:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.