On Fri, 23 Jan 2009 09:55:27 +0100 Stokkenes Vidar Vidar.Stokkenes@hn-ikt.no wrote:
NAV will fetch the serial info off some of these devices just perfect, while with some switches will return "Cisco 3560" as serial. I've tried added a fake serial on the few switches where I have this problem, but NAV often fails in general to poll port info etc off these devices with bogus serial info.
[snip]
I can understand how it COULD fail on some devices for SOME reason, but why would it completely halt NAV from polling info properly? And can someone please report back if they have the same problem? (maybe it’s a bug worth troubleshooting?)
We do know of situations where something like this could possibly happen. Two typical cases are devices that report garbage binary data as serial numbers via SNMP, and devices that report identical bogus serial numbers, thus creating a duplicate problem.
In the case of binary garbage, getDeviceData is not always robust enough to filter this out, and once it tries to store the serial in the database, PostgreSQL shoots it down, and the collection run for that device may be aborted.
When it comes to duplicate serial numbers, getDeviceData will have a hard time trying to resolve it, since the data model doesn't support it. Trying to set the same serial number for two devices will cause a PostgreSQL integrity error, and most likely abort the collection run for the device whose serial number cannot be set.
The first problem is easier to solve than the second: Add more sanity checks to the serial number strings. The second problem is a very difficult one, as NAV relies on correct serial number retrieval to detect when a device has been replaced (either a module or a chassis).
In many cases, the problems with bogus and/or duplicate serial numbers can be resolved by upgrading the software on the devices, if at all possible.
Have a very nice weekend everyone, and good luck with updating! (and maybe I see some of you in Barcelona next week) :)
Same to you (except for the Barcelona part) :)