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

Bug #1398791 reported by Morten Brekkevold
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
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/", line 40, in main
  File "/usr/lib/python2.7/dist-packages/nav/", line 220, in check_devices_on_maintenance
  File "/usr/lib/python2.7/dist-packages/django/db/", line 224, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/nav/", line 84, in check_tasks_without_end
    end_time = subject.last_downtime_ended()
AttributeError: 'NoneType' object has no attribute 'last_downtime_ended'

Tags: maintenance
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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