ipdevpoll 5minstats job fails on some Cisco WLCs

Bug #1484427 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

It seems some Cisco WLCs report nameless interfaces. The code that generates Graphite metric names from the statports plugin (part of the 5minstats job) cannot handle this, and crashes.

Traceback:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 368, in callback
    self._startRunCallbacks(result)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 464, in _startRunCallbacks
    self._runCallbacks()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 551, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1101, in gotResult
    _inlineCallbacks(r, g, deferred)
--- <exception caught here> ---
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1045, in _inlineCallbacks
    result = g.send(result)
  File "/usr/lib/python2.7/dist-packages/nav/ipdevpoll/plugins/statports.py", line 68, in handle
    tuples = list(self._make_metrics(stats, timestamp))
  File "/usr/lib/python2.7/dist-packages/nav/ipdevpoll/plugins/statports.py", line 100, in _make_metrics
    self.netbox, row['ifName'] or row['ifDescr'], key)
  File "/usr/lib/python2.7/dist-packages/nav/metrics/templates.py", line 58, in metric_path_for_interface
    return tmpl.format(interface=metric_prefix_for_interface(sysname, ifname),
  File "/usr/lib/python2.7/dist-packages/nav/metrics/templates.py", line 116, in metric_prefix_for_interface
    ifname=escape_metric_name(ifname))
  File "/usr/lib/python2.7/dist-packages/nav/metrics/names.py", line 33, in escape_metric_name
    string = string.replace(char, "_")
exceptions.AttributeError: 'NoneType' object has no attribute 'replace'

Tags: ipdevpoll
Revision history for this message
Morten Brekkevold (mbrekkevold) 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.