Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong Link Speed on Neighbor Map #589

Closed
def-bs opened this issue May 22, 2019 · 11 comments
Closed

Wrong Link Speed on Neighbor Map #589

def-bs opened this issue May 22, 2019 · 11 comments

Comments

@def-bs
Copy link

def-bs commented May 22, 2019

Expected Behavior

In Neighbor Map I expect that when Link Speed is enabled, the current speed of the connection is shown.

Current Behavior

When link speed is enabled, the current speed of the connection is not shown correctly.
Schermata a 2019-05-22 13-45-42

Your Environment

App::Netdisco 2.42.8
SNMP::Info 3.68
DB Schema 57
PostgreSQL 9.6.13
Perl 5.24.1

@ollyg
Copy link
Member

ollyg commented May 22, 2019

Hi @def-bs thanks for the report, but you've not indicated what the correct/incorrect values are?

Note that the 2G entries are Aggregated Link totals. So if you have a trunk/bundle/aggregate of 2x1G it will show 2G as the speed for the connection between the devices.

If this is not the cause, please can you indicate the precise error? Thanks,

@def-bs
Copy link
Author

def-bs commented May 22, 2019

I mean that are not shown correctly, it is shown as "2020GM"

Schermata a 2019-05-22 14-45-36

@ollyg
Copy link
Member

ollyg commented May 22, 2019

@def-bs thanks! OK I will reply later with more questions, because I'd like to see what the connections are between the devices and what speeds are in the device_port_details table for those ports.

@ollyg
Copy link
Member

ollyg commented May 22, 2019

sorry I meant device_port_properties table, I think

@inphobia
Copy link
Member

also, if you hover your mouse over the incorrect link, you should see some info in the top right corner:
image

can you show that too?

having the 2 device models would also help. lenovo & some fortinet devices at least can report bogus speeds. our netmap currently uses i_speed_raw so even if the module has a fixup for i_speed, netmap can still show incorrect data.

https://github.com/netdisco/snmp-info/blob/e886190e8e110d3bc8ede533d8f225d384d97da7/lib/SNMP/Info/Layer3/Lenovo.pm#L104-L106

and a long shot, but if you use things like vpc or mlag discovery order of devices might play a role too.

@def-bs
Copy link
Author

def-bs commented May 22, 2019

Schermata a 2019-05-22 16-15-42

@inphobia
Copy link
Member

and what kind of devices are these? vendor/model/os preferably

@def-bs
Copy link
Author

def-bs commented May 23, 2019

It is a "hp / 2510-24B", OS / Version | hp Q.11.78 and HP J8697A Switch 5406zl, OS hp / K.16.02.0026

@inphobia
Copy link
Member

i don't really see any strangeness in that snmp::info module.

could you provide us with the output of:

netdisco-do psql -e "COPY (select ip,port,raw_speed from device_port_properties where ip = '10.1.100.252') TO STDOUT WITH CSV HEADER"
netdisco-do psql -e "COPY (select ip,port,type,speed,remote_ip,remote_port,remote_type,remote_id from device_port where ip = '10.1.100.252') TO STDOUT WITH CSV HEADER"

replace 10.1.100.252 with the ip of your device, and run it for both devices.

we would prefer the complete output but if it contains sensitive data you can always email it (or you can create a private github repo and give me and ollyg access, works surprisingly well)

@ollyg
Copy link
Member

ollyg commented May 27, 2019

What's happening here, I think, is that Netdisco is rendering two connections on top of each other with different speeds, which creates a jumble in the picture. You can see another example in @def-bs first screenshot showing 1G and 2G at the same time, top left of the pic.

I don't know why this happens - Netdisco should run an SQL query to aggregate all the links between each pair of devices, and show that as one link. It's doing it twice, with different total speed values (seems to be a G and an M value in the example of @def-bs).

Perhaps the "left" and "right" end of the links are swapped, or some data is missing from the DB. I'm trying to reproduce the error on my system...

(for ref, this will be the Virtual::DeviceLinks SQL query and line 168 onwards of Web::Plugin::Device::Neighbors)

@ollyg
Copy link
Member

ollyg commented May 27, 2019

right, I hope this is fixed in:
[master 8878853] #589 only show link with highest agg speed if map links between two devices are asymmetric

the cause is asymmetric device_port entries for the two devices. it can be reproduced by taking two devices with multiple links between and removing the remote_port entry on one port on one side, causing asymmetric results from the DeviceLinks query.

the patch sorts the DeviceLinks results so the highest aggregate speed is shown first and then subsequent links are skipped.

@ollyg ollyg closed this as completed May 27, 2019
ollyg added a commit that referenced this issue May 27, 2019
rc9000 added a commit to rc9000/netdisco that referenced this issue Aug 20, 2019
* upstream/master: (178 commits)
  fix for netdisco#633
  fix for netdisco#633
  fix for netdisco#633
  add relation to get latest node on port
  netdisco#624 device layers search should be OR (not AND)
  show how to package own radius dictionary files
  netdisco#630 display full oui vendor
  improvements to radius patch
  Modified to add Radius support (netdisco#621)
  typo
  typos
  typo
  typo
  typo
  typo
  typo
  typo
  typos
  typo
  typo
  Change Port Free icon to be more accessible (netdisco#633)
  you really need to install the packages we ask
  fix travis
  make sidebar tiny bit wider (netdisco#625)
  compare ieee mac against 6 iterations (netdisco#611)
  add poe on/off icons to legend
  handle row.power.power being NULL
  netdisco-docker triage
  typo
  if user installs Pg they should use supported version
  netdisco#610 better MAC addr input sanity checking
  a few more files to ignore (netdisco#609)
  fix pod
  fix pod as in b58a62
  fix pod as in b58a62
  fix pod formatting and typos
  fix pod formatting
  fix pod
  fix pod formatting
  fix pod formatting
  Properly escape angle brackets in C<>
  Fix device_auth formatting in POD
  yaml whitespace matters
  allow stats to run smoothly on ancient Pg 8.4
  release 2.042010
  netdisco#601 fix job queue no longer shows running or queued jobs
  Revert "fix netdisco#601"
  Revert "fix everything that does not use sidebar in web if"
  fix everything that does not use sidebar in web if
  fix netdisco#601
  release 2.042009
  netdisco#581 skip storing and displaying fabricated vlan 0
  perl 5.30 is released
  last pieces of b59043d / netdisco#590 (netdisco#600)
  netdisco#571 tests should not use user local config
  netdisco#589 only show link with highest agg speed if map links between two devices are asymmetric
  netdisco#586 do not show poller performance rows for still running jobs
  netdisco#584 fix for case where port has no corresponding properties row
  netdisco#577 fix bug related to hostnames comprised a-f only
  netdisco#585 make toastr notifications less annoying
  netdisco#590 remove DBIx::Class::Schema::Loader remnants
  netdisco#594 add PK to device_port_log and other tidying
  netdisco#596 fix default value on actionset field
  dbic sync between actual db & our functions/docs (netdisco#595)
  device_auth
  device_auth
  device_auth usage
  device_auth config
  change to device_auth config
  ask for some device info
  html template fixups (netdisco#576)
  configuration has moved to the wiki (netdisco#574)
  allow setting some speudo device  info (netdisco#572)
  intellij support (netdisco#573)
  move testing targets to perl 5.10 and 5.28
  show some opensuse love
  release 2.042008
  minor amendments to previous commit
  improve check_acl performance for basic IP string compare
  release 2.042007
  netdisco#568 use different icon for WAPs from clients
  improve check_acl performance for basic IP string compare
  netdisco#565 fix netdisco-do when no device param needed
  spelling/wording
  wording
  Allow to pass multiple time the -d parameter to perform the discovery of many devices in one command call. (netdisco#564)
  release 2.042006
  do not show ignored dupe jobs in job queue
  fix inconsistency in titlebar global search when port is selected
  netdisco#549 redux - fix for changing pseudo device ports
  netdisco rancid updates (netdisco#558)
  release 2.042005
  fix strange interaction between CORE::sort and List::MoreUtils::uniq
  refactor to try device port vlan update again
  better var names and change logic to skip port
  better sql update, fixed worker return, better logic on vlans
  netdisco#528 record egress untagged vlans in device_port_vlan table
  netdisco#549 clean manual topology after device ports change
  netdisco#551 better error message for both device_auth and snmp_auth
  netdisco#552 device addresses report has broken column data
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants