Hi, I'm testing the latest NAV virtual machine. I've got problems adding some Extreme Networks SummitX-250 and Summit-X450. The error log show that entPhysicalDescr is empty. Here's the log of ipdevpoll run : /usr/lib/nav/ipdevpolld -J snmpcheck -n 10.0.0.37 2014-04-04 11:23:40,406 [INFO nav.ipdevpoll] --- Starting ipdevpolld snmpcheck --- 2014-04-04 11:23:42,399 [INFO plugins] Imported 23 plugin classes, 23 classes in plugin registry 2014-04-04 11:23:42,399 [INFO nav.ipdevpoll] Running single 'snmpcheck' job for 2-a16-0-1.univ-rouen.fr root@nav-debian-virtual-appliance:/usr/share/pyshared/nav# /usr/lib/nav/ ipdevpolld -J inventory -n 10.0.0.37 2014-04-04 11:23:56,936 [INFO nav.ipdevpoll] --- Starting ipdevpolld inventory --- 2014-04-04 11:23:58,933 [INFO plugins] Imported 23 plugin classes, 23 classes in plugin registry 2014-04-04 11:23:58,933 [INFO nav.ipdevpoll] Running single 'inventory' job for 2-a16-0-1.univ-rouen.fr 2014-04-04 11:23:58,985 [DEBUG plugins.modules.modules] [inventory 2- a16-0-1.univ-rouen.fr] Collecting ENTITY-MIB module data 2014-04-04 11:24:53,472 [DEBUG plugins.modules.modules] [inventory 2- a16-0-1.univ-rouen.fr] alias mapping: {} 2014-04-04 11:24:53,474 [DEBUG plugins.modules.modules] [inventory 2- a16-0-1.univ-rouen.fr] test :[{'entPhysicalSoftwareRev': '15.3.1.4', 'entPhysicalHardwareRev': '7.0', 'entPhysicalParentRelPos': 1, 0: 3, 'entPhysicalClass': 'module', 'entPhysicalName': '', 'entPhysicalContainedIn': 2, 'entPhysicalSerialNum': '0943G-80792', 'entPhysicalDescr': None, 'entPhysicalFirmwareRev': '1.0.3.5', 'entPhysicalIsFRU': True, 'entPhysicalModelName': '800190-00-07'}] 2014-04-04 11:24:53,476 [ERROR jobs.jobhandler] [inventory 2-a16-0-1.univ- rouen.fr] Plugin nav.ipdevpoll.plugins.modules.Modules(u'2-a16-0-1.univ- rouen.fr') reported an unhandled failure 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/modules.py", line 61, in handle self._process_entities(physical_table) File "/usr/lib/python2.7/dist-packages/nav/ipdevpoll/plugins/modules.py", line 185, in _process_entities module_containers = self._process_modules(entities) File "/usr/lib/python2.7/dist-packages/nav/ipdevpoll/plugins/modules.py", line 123, in _process_modules module = self._module_from_entity(ent) File "/usr/lib/python2.7/dist-packages/nav/ipdevpoll/plugins/modules.py", line 109, in _module_from_entity module.description = ent['entPhysicalDescr'].strip() exceptions.AttributeError: 'NoneType' object has no attribute 'strip'
2014-04-04 11:24:53,480 [ERROR jobs.jobhandler] [inventory 2-a16-0-1.univ- rouen.fr] Job 'inventory' for 2-a16-0-1.univ-rouen.fr aborted: Job aborted due to plugin failure (cause=AttributeError("'NoneType' object has no attribute 'strip'",))
Anyone can help ?
Regards
On Fri, 4 Apr 2014 11:30:09 +0200 (CEST) rija.rasolo@univ-rouen.fr wrote:
Hi, I'm testing the latest NAV virtual machine. I've got problems adding some Extreme Networks SummitX-250 and Summit-X450. The error log show that entPhysicalDescr is empty.
That's strange...
2014-04-04 11:24:53,474 [DEBUG plugins.modules.modules] [inventory 2- a16-0-1.univ-rouen.fr] test :[{'entPhysicalSoftwareRev': '15.3.1.4', 'entPhysicalHardwareRev': '7.0', 'entPhysicalParentRelPos': 1, 0: 3, 'entPhysicalClass': 'module', 'entPhysicalName': '', 'entPhysicalContainedIn': 2, 'entPhysicalSerialNum': '0943G-80792', 'entPhysicalDescr': None, 'entPhysicalFirmwareRev': '1.0.3.5', 'entPhysicalIsFRU': True, 'entPhysicalModelName': '800190-00-07'}]
This line indicates you have an even more serious problem; the device does not present a name string for the module at all. This is what NAV would use to name the modules.
[snip]
File "/usr/lib/python2.7/dist-packages/nav/ipdevpoll/plugins/modules.py", line 109, in _module_from_entity module.description = ent['entPhysicalDescr'].strip() exceptions.AttributeError: 'NoneType' object has no attribute 'strip'
2014-04-04 11:24:53,480 [ERROR jobs.jobhandler] [inventory 2-a16-0-1.univ- rouen.fr] Job 'inventory' for 2-a16-0-1.univ-rouen.fr aborted: Job aborted due to plugin failure (cause=AttributeError("'NoneType' object has no attribute 'strip'",))
Anyone can help ?
Yes/no/maybe ;-)
The crash itself may be simple to fix - stop assuming that all devices are well-behaved and have actual values for this variables.
The harder question is: What do we do with a module that cannot be identified via name? Do we ignore it? Do we invent a fantasy name? Can we substitute the module's serial number?
I've hardly any experience with Extreme Networks; How do these Extreme Networks devices name or number their modules in real life?