Expanding some switch ports makes Network Explorer hang
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Network Administration Visualized |
Fix Released
|
Medium
|
Morten Brekkevold |
Bug Description
When exploring a VLAN using the Network Explorer (NAV 4.1-4.2.2), expanding a switch port will sometimes cause a failing AJAX request.
The backend will return a 500 Internal Server error, while the frontend makes no report of this. Expanding a node causes a spinner icon to display while data is being loaded - the only feedback the user has is that the spinner icon now displays indefinitely.
On the backend, however, this traceback is e-mailed to the admins on every attempt:
Traceback (most recent call last):
File "/usr/lib/
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/
return self.dispatch(
File "/usr/lib/
return handler(request, *args, **kwargs)
File "/usr/lib/
context = self.get_
File "/usr/lib/
c.update(
File "/usr/lib/
'short': unicode(
File "/usr/lib/
return self.get_
File "/usr/lib/
and self.sysname.
AttributeError: 'NoneType' object has no attribute 'endswith'
description: | updated |
Changed in nav: | |
status: | Confirmed → In Progress |
Changed in nav: | |
status: | In Progress → Fix Committed |
Changed in nav: | |
status: | Fix Committed → Fix Released |
A Django ORM select_related() call in the Network Explorer seems to trigger a bug in Django 1.4. The call in question will join the Netbox table three times in a single query, and in cases where there is no actual relation (i.e. for NULL values), Django instead returns empty model objects with all their attributes set to None.
The simplest solution is to remove the select_related() call, possible at the cost of some slower requests (but a slow, correct response is preferable to a fast, failing one).
fix here: https:/ /nav.uninett. no/hg/stable/ rev/9ddf8cfa46a 9