AlertEngine crashes with UnboundLocalError for local variable 'queued_alerts'

Bug #294578 reported by Morten Brekkevold
2
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
High
Thomas Adamcik

Bug Description

AlertEngine from NAV 3.5.0b2, patched with the changeset references by Thomas Adamcik in https://bugs.launchpad.net/nav/+bug/293624, still crashes with UnboundLocalErrors on some installations.

This time the log looks like this:
[2008-11-06 09:20:00,218] [INFO] [pid=10740 nav.alertengine] Starting alertengine loop.
[2008-11-06 09:20:00,308] [INFO] [pid=10740 nav.alertengine] alert 146335 queued for xxxxxx
[2008-11-06 09:20:00,365] [CRITICAL] [pid=10740 nav.alertengine] Unhandeled error: local variable 'queued_alerts' referenced before assignment
Traceback (most recent call last):
  File "/usr/lib/nav/alertengine.py", line 163, in main
    check_alerts(debug=opttest)
  File "./base.py", line 78, in check_alerts
  File "./base.py", line 292, in handle_queued_alerts
UnboundLocalError: local variable 'queued_alerts' referenced before assignment

Tags: alertengine
Changed in nav:
assignee: nobody → adamcik
importance: Undecided → High
milestone: none → v3.5.0
status: New → Confirmed
Revision history for this message
Thomas Adamcik (adamcik) wrote :

Changeset http://metanav.uninett.no/hg/default/rev/ee9e92afb08a not being applied is most likely the culprit in this case. I've asked Morten to verify this fix on the box in question.

Changed in nav:
status: Confirmed → In Progress
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

I've patched the code, and it's running fine now. AFAIK the bug occurs only when dispatching queued alerts, so it might not show up immediately if it is still there.

Revision history for this message
Thomas Adamcik (adamcik) wrote :

Since this has been in default a while now, and no new errors have been posted I'm closing this one now.

Changed in nav:
status: In Progress → Fix Released
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

changed to fix committed, since no release has been made yet

Changed in nav:
status: Fix Released → Fix Committed
Changed in nav:
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.