Commit Graph
23 Commits
Author SHA1 Message Date
Christian Ramseyer 8dc35a1b84 Merge branch 'master' of https://github.com/netdisco/netdisco
* 'master' of https://github.com/netdisco/netdisco:
  release 2.044011
2020-01-27 21:08:51 +01:00
Christian Ramseyer 0938cd1651 New version of the IOSXR module using Expect
* The previous module only worked for 32-bit IOSXR, and already
  there some fiddling with the STDIN of the process was required
  when being run from netdisco-backend
* In 64-bit IOSXR, the STDIN workaround stopped working and
  created a stuck ssh process on every arpnip
* This new version uses Expect instead of plain SSH, so a proper
  pty is provided under any circumstances
* Successfully tested on recent 32- and 64-bit variants
2020-01-27 21:03:23 +01:00
Christian Ramseyer f2f5d908bb Fix regression from PR #680
Hi @ollyg! Unfortunately I have found some issues with the code we
finally released in #680:

* get_port_macs expects an array ref but values() returns array,
  so the code was never called due to the return unless... check
* When fw_mac_list had exactly two entries, only the second value
  was bound as a scalar to the parameter. This is probably due
  to the shorthand bind formats described in
  https://metacpan.org/pod/DBIx::Class::ResultSet#DBIC-BIND-VALUES,
  but I'm not a 100% on this.
* return unless now checks for an entry in the list, with the old
  check the statement was also executed for empty lists

In cases where only the device(_port)?.mac lookup worked for uplink
detection, users of 02.044005 - 010 might get a lot of uplinks not
labeled as such.
2020-01-26 22:08:49 +01:00
Christian RamseyerandOliver Gorwits 26d3fbdd40 Reduce macsuck bandwidth usage to database (#680)
* Reduce macsuck bandwidth usage to database

get_port_macs transfers a full list of all device_port.(mac,ip) in every macsuck.
With 8k devices and 40k interfaces it takes up around 15MB. Transferring them 8k times
during an 1h macsuck cycle requires bandwidth in the 300 to 400 mbit/s range.

This patch changes get_port_macs to be called inside walk_fwtable and only transfer
the macs found in the current target device/vlan.
2019-12-21 18:28:47 +00:00
Christian Ramseyer b82e1d273b remove unnecessary blank line added in last commit 2019-10-04 23:50:18 +02:00
Christian Ramseyer 372ada2726 netdisco-do overrides _min_age config
Give the user wanting to manually run a discover|arpnip|macsuck job in
the foreground preference over the respective `_min_age` setting. Tiny
quality of life improvement that mostly comes up in debugging.
2019-10-04 23:40:23 +02:00
Christian RamseyerandOliver Gorwits 8ffdff3bbc Add speed_admin to device ports tab (#650) (#653)
* Add speed_admin to device ports tab (#650)

* move from device_port_properties to device_port table, and tidy up
2019-09-23 13:58:26 +01:00
Christian Ramseyer 26960bdd34 Fix potential crash in Discover/Properties::_get_ipv6_aliases
* On e.g. Cisco N9K, ipv6 objects can be returned undef which crashes the ip alias discovery with `Can't use an undefined value as a HASH reference at .../Discover/Properties.pm line 346.`
 * Discovery continues but leaves device_ip empty, which in turn makes device->neighbor non-functional
 * Fixed by adding various `$snmp->x || {}` safeguards
2019-09-20 13:52:34 +02:00
Christian Ramseyer 8edbd515e7 Store i_speed_admin (#650) 2019-09-19 14:11:04 +02:00
Christian RamseyerandGitHub fc8ed46910 Manually install Test::Compile 2.1.2 for Travis CI (#635)
Seems to work, I'm merging this and add some comments in #622
2019-08-20 19:55:59 +02:00
Christian Ramseyer b58a62f300 Properly escape angle brackets in C<> 2019-06-18 13:42:23 +02:00
Christian Ramseyer a61159deb9 Fix device_auth formatting in POD 2019-06-18 13:39:19 +02:00
Christian Ramseyer a97e069788 Improve netdisco-do doc (related to #540)
* mention how to dumpconfig device_auth
* explain ANSI_COLORS_DISABLED
2019-03-16 14:08:07 +01:00
Christian Ramseyer 9d0aabf194 Merge branch 'master' of https://github.com/netdisco/netdisco 2019-03-16 13:56:14 +01:00
Christian Ramseyer 7547b6629a Merge branch 'master' of https://github.com/netdisco/netdisco 2019-03-09 11:37:34 +01:00
Christian Ramseyer c34c58dd0e Merge branch 'master' of https://github.com/netdisco/netdisco 2019-03-05 10:08:29 +01:00
Christian Ramseyer bf3658f0f3 Merge branch 'master' of https://github.com/netdisco/netdisco 2019-02-28 09:26:29 +01:00
ram c2600ac550 Change location of ifindex to DevicePortProperties
* instead of DevicePort
* as requested by Oliver in PR #513 review
2019-02-23 15:26:38 +01:00
ram 24a7e80470 PR for #510 - store ifindex in device_port 2019-02-23 15:26:38 +01:00
Christian Ramseyer dc9feb747f Merge ASA.PM patch by stromsoe (#494}
* Embedded # characters in the output for show names cause sshcollector not to collect any ARP entries on the ASA platform, since the $prompt variable matches in the middle of the output. Fix is to modify $prompt to match end-of-line.
 * Changing the terminal pager length should be done before sending show names instead of after.
 * Matching on IP address to see if a name needs to be mapped should include start and end field markers, in the event that the name returned from "show arp" embeds an IP address (eg, "abc1.2.3.4xyz")
2019-01-29 23:40:43 +01:00
Christian RamseyerandOliver Gorwits b1ca1b968d Improve netdisco-sshcollector CLI experience (#460)
* Improve netdisco-sshcollector CLI experience

 * add -d <device>
 * add -O debug option to toggle Net::OpenSSH::debug
 * add -w MCE::Loop max_workers
 * updated POD for all of the above

* Fix -Q documentation

 * Specifying -Q multiple times has no effect, removed part talking about that.

* Emit Net::OpenSSH connection failures as warnings
2018-12-28 15:58:32 +00:00
Christian RamseyerandOliver Gorwits f5622929e0 Provide stdin to IOSXR.pm when none available (#462)
* See issue #461 for a detailed description
2018-12-28 14:33:02 +00:00
Christian RamseyerandOliver Gorwits 0737914af5 Fix potential Postgres insert failure (#306)
Some devices can contain random non-utf8 data in syscontact and syslocation,
making the insert fail with "ERROR:  invalid byte sequence for encoding "UTF8"
on discovery. Work around this with Encode::decode.
2017-04-21 20:20:36 +01:00