From eb4df8bd42e44324705f66b680502f8676016d9d Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 30 Apr 2014 22:02:31 +0100 Subject: [PATCH 01/12] tweak doc note pointing to Deployment page --- Netdisco/lib/App/Netdisco.pm | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index 0aad30d8..84997502 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -246,6 +246,9 @@ Notes|App::Netdisco::Manual::ReleaseNotes>. Then, the process is as follows: # restart job daemon (if you use it) ~/bin/netdisco-daemon restart +For further documentation on deployment, see +L. + =head1 Tips and Tricks =head2 Searching @@ -270,12 +273,6 @@ run: ~/bin/localenv nd-import-topology /path/to/netdisco-topology.txt -=head2 Deployment Scenarios - -More documentation on how to deploy the application in other scenarios, for -example behind a web proxy, is in the -L documentation. - =head2 Database API Bundled with this distribution is a L layer for the Netdisco From f6c394c9b34eee677c8063a490ab9ba63707e346 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 30 Apr 2014 22:23:46 +0100 Subject: [PATCH 02/12] release 2.027000 --- Netdisco/Changes | 2 +- Netdisco/META.yml | 2 +- Netdisco/lib/App/Netdisco.pm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index 1d21b052..23d5e8f4 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,4 +1,4 @@ -2.026001_004 - +2.027000 - 2014-04-30 [ENHANCEMENTS] diff --git a/Netdisco/META.yml b/Netdisco/META.yml index 8c44bd13..d9f18323 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -78,4 +78,4 @@ resources: homepage: http://netdisco.org/ license: http://opensource.org/licenses/bsd-license.php repository: git://git.code.sf.net/p/netdisco/netdisco-ng -version: 2.026001_004 +version: 2.027000 diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index 84997502..d0d6c4ea 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -4,7 +4,7 @@ use strict; use warnings; use 5.010_000; -our $VERSION = '2.026001_004'; +our $VERSION = '2.027000'; use App::Netdisco::Environment; use Dancer ':script'; From 64951c3b9b6da343ae6458b59ce90b11bb5f7fd8 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 30 Apr 2014 22:29:40 +0100 Subject: [PATCH 03/12] get_port_macs returns all port MACs --- Netdisco/Changes | 6 ++++++ Netdisco/lib/App/Netdisco/Util/PortMAC.pm | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index 23d5e8f4..e221da2a 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,3 +1,9 @@ +2.027001 - + + [BUG FIXES] + + * get_port_macs returns all port MACs + 2.027000 - 2014-04-30 [ENHANCEMENTS] diff --git a/Netdisco/lib/App/Netdisco/Util/PortMAC.pm b/Netdisco/lib/App/Netdisco/Util/PortMAC.pm index 72836397..5b75e478 100644 --- a/Netdisco/lib/App/Netdisco/Util/PortMAC.pm +++ b/Netdisco/lib/App/Netdisco/Util/PortMAC.pm @@ -21,10 +21,13 @@ subroutines. =head1 EXPORT_OK -=head2 get_port_macs( $device ) +=head2 get_port_macs Returns a Hash reference of C<< { MAC => IP } >> for all interface MAC -addresses on a device. +addresses on all devices. + +If you need to filter for a given device, simply compare the IP (hash value) +to your device's IP. =cut From c8180e3ea6e626ecae4c708c04a44ce8b9eb7fe0 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Wed, 30 Apr 2014 22:30:37 +0100 Subject: [PATCH 04/12] forgot the actual bug fix for previous --- Netdisco/lib/App/Netdisco/Util/PortMAC.pm | 8 -------- 1 file changed, 8 deletions(-) diff --git a/Netdisco/lib/App/Netdisco/Util/PortMAC.pm b/Netdisco/lib/App/Netdisco/Util/PortMAC.pm index 5b75e478..3bbf5112 100644 --- a/Netdisco/lib/App/Netdisco/Util/PortMAC.pm +++ b/Netdisco/lib/App/Netdisco/Util/PortMAC.pm @@ -32,16 +32,8 @@ to your device's IP. =cut sub get_port_macs { - my $device = shift; my $port_macs = {}; - unless ( $device->in_storage ) { - debug sprintf - ' [%s] get_port_macs - skipping device not yet discovered', - $device->ip; - return $port_macs; - } - my $dp_macs = schema('netdisco')->resultset('DevicePort') ->search( { mac => { '!=' => [ -and => (undef, '00:00:00:00:00:00') ] } }, From b464f4b3bd58f3af81f3193b7b39d0fe5ddd8812 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 3 May 2014 08:30:14 +0100 Subject: [PATCH 05/12] release 2.027001 --- Netdisco/Changes | 2 +- Netdisco/META.yml | 2 +- Netdisco/lib/App/Netdisco.pm | 2 +- Netdisco/lib/App/Netdisco/Core/Macsuck.pm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index e221da2a..e388e753 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,4 +1,4 @@ -2.027001 - +2.027001 - 2014-05-03 [BUG FIXES] diff --git a/Netdisco/META.yml b/Netdisco/META.yml index d9f18323..2c17c296 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -78,4 +78,4 @@ resources: homepage: http://netdisco.org/ license: http://opensource.org/licenses/bsd-license.php repository: git://git.code.sf.net/p/netdisco/netdisco-ng -version: 2.027000 +version: 2.027001 diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index d0d6c4ea..472ea3d6 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -4,7 +4,7 @@ use strict; use warnings; use 5.010_000; -our $VERSION = '2.027000'; +our $VERSION = '2.027001'; use App::Netdisco::Environment; use Dancer ':script'; diff --git a/Netdisco/lib/App/Netdisco/Core/Macsuck.pm b/Netdisco/lib/App/Netdisco/Core/Macsuck.pm index 34729817..5ec2b51d 100644 --- a/Netdisco/lib/App/Netdisco/Core/Macsuck.pm +++ b/Netdisco/lib/App/Netdisco/Core/Macsuck.pm @@ -68,7 +68,7 @@ sub do_macsuck { # cache the device ports to save hitting the database for many single rows my $device_ports = {map {($_->port => $_)} $device->ports(undef, {prefetch => 'neighbor_alias'})->all}; - my $port_macs = get_port_macs($device); + my $port_macs = get_port_macs(); my $interfaces = $snmp->interfaces; # get forwarding table data via basic snmp connection From af6aafd437027a104e7e37d762c1f9cbd85762ca Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 3 May 2014 09:03:06 +0100 Subject: [PATCH 06/12] deployment doc note was in wrong place --- Netdisco/lib/App/Netdisco.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index 472ea3d6..57d74752 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -229,6 +229,9 @@ You should take care not to run this Netdisco daemon and the Netdisco 1.x daemon at the same time. Similarly, if you use the device discovery with Netdisco 2, disable your system's cron jobs for the Netdisco 1.x poller. +For further documentation on deployment, see +L. + =head1 Upgrading Before upgrading please review the latest L. Then, the process is as follows: # restart job daemon (if you use it) ~/bin/netdisco-daemon restart -For further documentation on deployment, see -L. - =head1 Tips and Tricks =head2 Searching From 643dbff69ef9b7c65250a82852baddd78429e159 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 3 May 2014 09:07:56 +0100 Subject: [PATCH 07/12] clarify note on RC scripts --- Netdisco/lib/App/Netdisco/Manual/Deployment.pod | 2 +- Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Netdisco/lib/App/Netdisco/Manual/Deployment.pod b/Netdisco/lib/App/Netdisco/Manual/Deployment.pod index 9e6c959b..a340ea63 100644 --- a/Netdisco/lib/App/Netdisco/Manual/Deployment.pod +++ b/Netdisco/lib/App/Netdisco/Manual/Deployment.pod @@ -4,7 +4,7 @@ App::Netdisco::Manual::Deployment - Tips and Tricks for Deployment =head1 Init and Run Control Scripts -The Netdisco applications will emit RC scripts suitable for Linux systems: +The Netdisco applications will generate RC scripts suitable for Linux systems: bin/netdisco-web get_init_file bin/netdisco-daemon get_init_file diff --git a/Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod b/Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod index c253dc29..afaa18ee 100644 --- a/Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod +++ b/Netdisco/lib/App/Netdisco/Manual/ReleaseNotes.pod @@ -45,8 +45,9 @@ respectively) will now watch your C configuration file, and restart themselves whenever it is changed. The Web and Backend daemons will also now drop privilege to the same user and -group as their files on disk. This allows you to symlink the programs as -run-control scripts, yet maintain non-root privilege status. +group as their files on disk. This allows use of run control (init) scripts +whilst maintaining non-root privilege status (see +L documentation for details). The housekeeping task C has been renamed to C. Old configuration will continue to work, but we recommend you rename this part of From 35130a6826cb2df2d6a97c1205a45ee4c71d248c Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 3 May 2014 09:13:46 +0100 Subject: [PATCH 08/12] release 2.003002 --- Web-Plugin-RANCID/Changes | 4 ++++ Web-Plugin-RANCID/META.yml | 2 +- .../lib/App/NetdiscoX/Web/Plugin/RANCID.pm | 19 +++++++++---------- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Web-Plugin-RANCID/Changes b/Web-Plugin-RANCID/Changes index ecae509d..35146aae 100644 --- a/Web-Plugin-RANCID/Changes +++ b/Web-Plugin-RANCID/Changes @@ -1,3 +1,7 @@ +2.003002 - 2014-05-03 + + * POD fixups + 2.003001 - 2014-02-04 * Change to use %DEVICE% as well - full url must be configured in location diff --git a/Web-Plugin-RANCID/META.yml b/Web-Plugin-RANCID/META.yml index 0fae7cb2..53c7c1e6 100644 --- a/Web-Plugin-RANCID/META.yml +++ b/Web-Plugin-RANCID/META.yml @@ -24,4 +24,4 @@ resources: homepage: http://netdisco.org/ license: http://opensource.org/licenses/bsd-license.php repository: git://git.code.sf.net/p/netdisco/netdisco-ng -version: '2.003001' +version: 2.003002 diff --git a/Web-Plugin-RANCID/lib/App/NetdiscoX/Web/Plugin/RANCID.pm b/Web-Plugin-RANCID/lib/App/NetdiscoX/Web/Plugin/RANCID.pm index ba8a5136..759130aa 100644 --- a/Web-Plugin-RANCID/lib/App/NetdiscoX/Web/Plugin/RANCID.pm +++ b/Web-Plugin-RANCID/lib/App/NetdiscoX/Web/Plugin/RANCID.pm @@ -1,6 +1,6 @@ package App::NetdiscoX::Web::Plugin::RANCID; -our $VERSION = '2.003001'; +our $VERSION = '2.003002'; use Dancer ':syntax'; @@ -58,8 +58,7 @@ App::NetdiscoX::Web::Plugin::RANCID - Link to device backups in RANCID/WebSVN - X::RANCID plugin_rancid: - location: 'https://websvn-server.example.com/rancid/%GROUP%/' - open_in_same_window: false + location: 'https://websvn-server.example.com/rancid/%DEVICE%' =head1 Description @@ -89,12 +88,12 @@ The text "C<%GROUP%>" will be replaced with the group name for this device, if known to Netdisco. This uses the same configuration as for L, an example of which is below: -rancid: - by_ip: [ other ] - groups: - switch: [ 'name:.*[Ss][Ww].*' ] - rtr: [ 'name:[rR]tr.*' ] - ap: [ 'name:[aA][pP].*' ] + rancid: + by_ip: [ other ] + groups: + switch: [ 'name:.*[Ss][Ww].*' ] + rtr: [ 'name:[rR]tr.*' ] + ap: [ 'name:[aA][pP].*' ] Briefly, each group value is a list of rules for matching devices similar to those used by any C<*_only> configuration item. You can provide an IP, subnet @@ -103,7 +102,7 @@ regular expression as in the above example. The device DNS name is used, or if missing the device SNMP sysName. Adding the group to the list in C will make the link include the device IP -instead. +instead of the name. =head2 open_in_same_window From 51e733b79a10fad810c06d3706a65f175815a6ae Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sun, 4 May 2014 10:03:51 +0100 Subject: [PATCH 09/12] release 2.027002 --- Netdisco/Changes | 6 ++++++ Netdisco/META.yml | 2 +- Netdisco/lib/App/Netdisco.pm | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index e388e753..caa77335 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,3 +1,9 @@ +2.027002 - 2014-05-04 + + [BUG FIXES] + + * revert use password instead of pass for Dancer::Plugin::DBIC + 2.027001 - 2014-05-03 [BUG FIXES] diff --git a/Netdisco/META.yml b/Netdisco/META.yml index 2c17c296..7943d6f1 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -78,4 +78,4 @@ resources: homepage: http://netdisco.org/ license: http://opensource.org/licenses/bsd-license.php repository: git://git.code.sf.net/p/netdisco/netdisco-ng -version: 2.027001 +version: 2.027002 diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index 57d74752..bf182fb8 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -4,7 +4,7 @@ use strict; use warnings; use 5.010_000; -our $VERSION = '2.027001'; +our $VERSION = '2.027002'; use App::Netdisco::Environment; use Dancer ':script'; @@ -24,7 +24,7 @@ if (ref {} eq ref setting('database')) { setting('plugins')->{DBIC}->{netdisco} ||= { dsn => $dsn, user => $user, - password => $pass, + pass => $pass, options => { AutoCommit => 1, RaiseError => 1, From a0426b56cdf82dc758eb54740797723f5758c2eb Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Thu, 8 May 2014 18:29:34 +0100 Subject: [PATCH 10/12] Use password instead of pass for Dancer::Plugin::DBIC --- Netdisco/Changes | 6 ++++++ Netdisco/Makefile.PL | 2 +- Netdisco/lib/App/Netdisco.pm | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index caa77335..0dbb44d9 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,3 +1,9 @@ +2.027003 - 2014-05-04 + + [BUG FIXES] + + * fixed use of password instead of pass for Dancer::Plugin::DBIC + 2.027002 - 2014-05-04 [BUG FIXES] diff --git a/Netdisco/Makefile.PL b/Netdisco/Makefile.PL index 81b8fe87..b51175a8 100644 --- a/Netdisco/Makefile.PL +++ b/Netdisco/Makefile.PL @@ -16,7 +16,7 @@ requires 'DBIx::Class' => 0.08210; requires 'DBIx::Class::Helpers' => 2.018004; requires 'Daemon::Control' => 0.001000; requires 'Dancer' => 1.3112; -requires 'Dancer::Plugin::DBIC' => 0.1803; +requires 'Dancer::Plugin::DBIC' => 0.2001; requires 'Dancer::Plugin::Auth::Extensible' => 0.30; requires 'Dancer::Plugin::Passphrase' => '2.0.1'; requires 'File::ShareDir' => 1.03; diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index bf182fb8..81686ecc 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -24,7 +24,7 @@ if (ref {} eq ref setting('database')) { setting('plugins')->{DBIC}->{netdisco} ||= { dsn => $dsn, user => $user, - pass => $pass, + password => $pass, options => { AutoCommit => 1, RaiseError => 1, From f223d1206af3cae8cc77dd8f98ad7c761fc9863b Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Thu, 15 May 2014 08:11:30 +0100 Subject: [PATCH 11/12] another check for macsuck_bleed (J. Leonhardt) --- Netdisco/Changes | 1 + Netdisco/lib/App/Netdisco/Core/Macsuck.pm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Netdisco/Changes b/Netdisco/Changes index 0dbb44d9..d2315e6f 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -3,6 +3,7 @@ [BUG FIXES] * fixed use of password instead of pass for Dancer::Plugin::DBIC + * another check for macsuck_bleed (J. Leonhardt) 2.027002 - 2014-05-04 diff --git a/Netdisco/lib/App/Netdisco/Core/Macsuck.pm b/Netdisco/lib/App/Netdisco/Core/Macsuck.pm index 5ec2b51d..8f0bdce5 100644 --- a/Netdisco/lib/App/Netdisco/Core/Macsuck.pm +++ b/Netdisco/lib/App/Netdisco/Core/Macsuck.pm @@ -367,7 +367,7 @@ sub _walk_fwtable { $device->ip, $mac, $port, $remote; # continue!! } - else { + elsif (not setting('macsuck_bleed')) { debug sprintf ' [%s] macsuck %s - port %s is detected uplink - skipping.', $device->ip, $mac, $port; From 213f44ec21d920d74da62a8cf4459be01b465147 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Thu, 15 May 2014 08:12:44 +0100 Subject: [PATCH 12/12] release 2.027003 --- Netdisco/META.yml | 4 ++-- Netdisco/lib/App/Netdisco.pm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Netdisco/META.yml b/Netdisco/META.yml index 7943d6f1..59dd5595 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -33,7 +33,7 @@ requires: Daemon::Control: 0.001 Dancer: 1.3112 Dancer::Plugin::Auth::Extensible: 0.3 - Dancer::Plugin::DBIC: 0.1803 + Dancer::Plugin::DBIC: 0.2001 Dancer::Plugin::Passphrase: 2.0.1 File::ShareDir: 1.03 Guard: 1.022 @@ -78,4 +78,4 @@ resources: homepage: http://netdisco.org/ license: http://opensource.org/licenses/bsd-license.php repository: git://git.code.sf.net/p/netdisco/netdisco-ng -version: 2.027002 +version: 2.027003 diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index 81686ecc..cadd6505 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -4,7 +4,7 @@ use strict; use warnings; use 5.010_000; -our $VERSION = '2.027002'; +our $VERSION = '2.027003'; use App::Netdisco::Environment; use Dancer ':script';