KeyError in ipdevpoll psu plugin

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

Bug Description

ipdevpoll inventory job is consistently crashing on a couple of Cisco routers on a client installation, with the following traceback:

[ERROR jobs.jobhandler] [inventory some-gw.example.org] Plugin nav.ipdevpoll.plugins.psu.PowerSupplyUnit(u'some-gw.example.org') reported an unhandled failure
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 345, in errback
    self._startRunCallbacks(fail)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 424, in _startRunCallbacks
    self._runCallbacks()
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 441, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 949, in gotResult
    _inlineCallbacks(r, g, deferred)
--- <exception caught here> ---
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 891, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.6/dist-packages/twisted/python/failure.py", line 338, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/pymodules/python2.6/nav/ipdevpoll/plugins/psu.py", line 140, in handle
    entity_index)
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 891, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.6/dist-packages/twisted/python/failure.py", line 338, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/pymodules/python2.6/nav/mibs/cisco_entity_fru_control_mib.py", line 118, in is_psu_up
    self.psu_status_table = yield self._get_power_status_table()
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 891, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.6/dist-packages/twisted/python/failure.py", line 338, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/pymodules/python2.6/nav/mibs/cisco_entity_fru_control_mib.py", line 62, in _get_power_status_table
    table = yield self._get_named_table('cefcFRUPowerStatusTable')
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 891, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.6/dist-packages/twisted/python/failure.py", line 338, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/pymodules/python2.6/nav/mibs/cisco_entity_fru_control_mib.py", line 49, in _get_named_table
    named_table = yield df
  File "/usr/lib/python2.6/dist-packages/twisted/internet/defer.py", line 441, in _runCallbacks
    self.result = callback(self.result, *args, **kw)
  File "/usr/lib/pymodules/python2.6/nav/mibs/mibretriever.py", line 436, in resultFormatter
    column_name = table.reverse_column_index[column_no]
exceptions.KeyError: 4

Tags: ipdevpoll
Changed in nav:
status: New → Triaged
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :

It seems NAV ships with a 2008-revision of the CISCO-ENTITY-FRU-CONTROL-MIB where the cefcFRUPowerStatusTable has only three columns.

The router in question was recently upgraded to the latest available IOS version, and provides at least 5 columns in this table (which is specified in the newest revision of CISCO-ENTITY-FRU-CONTROL-MIB). This error occurs because NAV expects the response to have only 3 columns and cannot find a reference to the fourth received column in its MIB.

Solution should be to simply ship NAV with a newer version of the MIB.

Changed in nav:
status: Triaged → Confirmed
importance: Undecided → Medium
status: Confirmed → In Progress
Revision history for this message
Morten Brekkevold (mbrekkevold) wrote :
Changed in nav:
status: In Progress → Fix Committed
milestone: none → 3.11.3
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.