netdisco tells me an entry already exists with that key. I've deleted the node completely and had it discovered, but the error is still there. The device is back in the database, but some information is missing. This is the output of netdisco-do discover.
[2207] 2015-05-26 12:17:18 info discover: started at Tue May 26 14:17:18 2015
[2207] 2015-05-26 12:17:22 info [x.x.x.x] interface - device uptime wrapped 2 times - correcting
[2207] 2015-05-26 12:17:23 info discover: finished at Tue May 26 14:17:23 2015
[2207] 2015-05-26 12:17:23 info discover: status error: error running job: DBIx::Class::Storage::DBI::_dbh_execute_for_fetch(): execute_for_fetch() aborted with 'ERROR: duplicate key value violates unique constraint "device_port_vlan_pkey"
DETAIL: Key (ip, port, vlan, native)=(x.x.x.x, GigabitEthernet2/0/30, 2460, t) already exists.' at populate slice:
{
ip => "x.x.x.x",
last_discover => \"now()",
native => "t",
port => "GigabitEthernet2/0/30",
vlan => 2460,
vlantype => "static"
} at /home/netdisco/perl5/lib/perl5/App/Netdisco/Core/Discover.pm line 473
Version info:
Built using Open Source
Software Version
App::Netdisco 2.032005
DB Schema v40
Dancer 1.3132
Bootstrap 2.3.1
PostgreSQL PostgreSQL 9.1.14 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3, 64-bit.
DBI 1.63, DBD::Pg 2.19.3
SNMP::Info 3.27
Perl 5.018002
Statistics for this installation
175 devices with 7,664 interfaces using 954 IPs
1,272 layer 2 links between devices
6,837 nodes in 16,267 entries
4,449 IPs in 38,104 entries
Statistics took 0 seconds to process.
The access vlan (data) and voice vlan are the same on this port.
When I change the access vlan to something else the key is apparently unique.
Confirmed on several switches. Everytime fixed by removing either vlan from the port. Would be nice if this did not result in an error.
Thanks for this bug report.
Should be fixed in commit [54676ca] and the next release.