On Tue, 25 Jun 2013 10:55:25 +0200 Ingeborg Hellemo ingeborg.hellemo@uit.no wrote:
ingeborg.hellemo@uit.no said:
% (self.model._meta.object_name, num, kwargs)) nav.models.rrd.MultipleObje
ctsReturned: get() returned more than one RrdFile -- it returned 2! Lookup parameters were {'category': 'port-counters', 'key': 'interface', 'value': '2001418'}
I guess there is some inconsistency in database, but where and after what shall I look?
Sorry about the noice. When I read the error message one more time the answer was almost there:
It's not noise, not every NAV user has your hacking skills :)
nav=> select * from rrd_file where value='2001418';
You nailed it!
Then, of course, one can wonder why a port is detected as both a switch-port and a router-interface.
Easily: A device reports an IP address on one of its switch ports. We hadn't thought of this when testing migrations, though (we had no such instances in our test data) :(
The solution is to kill the duplicates - it doesn't matter which one, since the Cricket would have been configured to collect statistics for each instance in the rrd_file database table.
We can whip up an SQL statement to fix the problem for user's who are SQL-challenged, but I should probably confer with John-Magne first.