Arnold crash when enabling missing port

Bug #334789 reported by Morten Brekkevold
2
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
Medium
John-Magne Bredal

Bug Description

Arnold tracks its blocked ports using swportid references. Since Arnold's database was separate from the manage database up until NAV 3.5, it does not have proper referential integrity to the swport table. If an swport entry goes away, or is replaced by a new one, Arnold has no way of knowing this. This may happen from time to time, and for those who have HP equipment, this happened during the upgrade from NAV 3.4 to 3.5 (for all HP switch ports).

The visible symptom of this is that the list of blocked ports will have entries with "N/A" in the switch column. Attempting to enable one of these entries results in the following traceback:
--------------------------
Mod_python error: "PythonHandler nav.web.arnoldhandler"

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line 299, in HandlerDispatch
    result = object(req)

  File "/usr/lib/python2.4/site-packages/nav/web/arnoldhandler.py", line 469, in handler
    req.write(page.respond())

  File "/usr/lib/python2.4/site-packages/nav/web/templates/MainTemplate.py", line 627, in respond
    _v = VFFSL(SL,"content",False)() # '$content()' on line 219, col 1

  File "/usr/lib/python2.4/site-packages/nav/web/templates/ArnoldTemplate.py", line 240, in content
    _v = VFFSL(SL,"printChooseEnablePorts",False)(VFFSL(SL,"blockedports",True)) # '$printChooseEnablePorts($blockedports)' on line 121, col 3

  File "/usr/lib/python2.4/site-packages/nav/web/templates/ArnoldTemplate.py", line 1328, in printChooseEnablePorts
    _v = VFFSL(SL,"candidate",True)['sysname'] # "$candidate['sysname']" on line 739, col 11

KeyError: 'sysname'
------------------------

Tags: arnold
Changed in nav:
assignee: nobody → john-m-bredal
importance: Undecided → Medium
status: New → Confirmed
Changed in nav:
milestone: none → v3.5.2
Revision history for this message
John-Magne Bredal (john-m-bredal) wrote :
Changed in nav:
status: Confirmed → 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.