Search in statistics gives stacktrace

Bug #1316608 reported by Christian Strand Young
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Network Administration Visualized
Fix Released
Medium
John-Magne Bredal

Bug Description

Did a search for CPU, last month with 9 rows.
The search gave the traceback below.
Seems like one or more of the metrics that were being looked up is None.

AttributeError: 'NoneType' object has no attribute 'sysname'
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/nav/web/sortedstats/views.py", line 37, in index result.collect()
File "/usr/lib/python2.7/dist-packages/nav/web/sortedstats/statmodules.py", line 62, in collect self.graph_url = self.get_graph_url()
File "/usr/lib/python2.7/dist-packages/nav/web/sortedstats/statmodules.py", line 99, in get_graph_url for x in metrics]
File "/usr/lib/python2.7/dist-packages/nav/web/sortedstats/statmodules.py", line 223, in get_metric_name return self.metric_lookups[metric].sysname
AttributeError: 'NoneType' object has no attribute 'sysname

Revision history for this message
John-Magne Bredal (john-m-bredal) wrote :

Graphite has no idea that the metrics it gathers are related to an Interface or Netbox in NAV. Thus we are dependent on reversing a metric to an object to display information about the metric/object in the user interface. This reversion does not work 100% of the time, and when it does not Ranked Statistics crashes.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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