Maintenance system stops working when an IP device on maintenance is deleted

Bug #1398791 reported by Morten Brekkevold
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
Critical
Morten Brekkevold

Bug Description

Under NAV 4.2 (up to 4.2.1), if an IP device currently on endless ("until up") maintenance is deleted from NAV, the maintenance engine (maintengine) will crash on every run, effectively rendering the entire maintenance system broken. No new maintenance tasks will be activated, and active ones will remain active indefinitely.

The problem occurs because maintengine will attempt to extract information about the deleted component from the maintenance task. Traceback from maintengine.log looks like this:

[2014-12-03 11:35:02,057] [ERROR] [pid=13467 nav.maintengine] An unhandled exception occurred:
Traceback (most recent call last):
  File "/usr/lib/nav/maintengine.py", line 40, in main
    check_devices_on_maintenance()
  File "/usr/lib/python2.7/dist-packages/nav/maintengine.py", line 220, in check_devices_on_maintenance
    check_tasks_without_end()
  File "/usr/lib/python2.7/dist-packages/django/db/transaction.py", line 224, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nav/maintengine.py", line 84, in check_tasks_without_end
    end_time = subject.last_downtime_ended()
AttributeError: 'NoneType' object has no attribute 'last_downtime_ended'

Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :
Changed in nav:
status: Confirmed → In Progress
status: In Progress → Fix Committed
Changed in nav:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers