Merge branch 'master' into og-pluggable-daemon
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
2.026001_003 -
|
2.026001_004 -
|
||||||
|
|
||||||
[ENHANCEMENTS]
|
[ENHANCEMENTS]
|
||||||
|
|
||||||
* Add FRU filter option to Module Inventory Report
|
* Add FRU filter option to Module Inventory Report
|
||||||
* Display Phone and Wifi icon on nodes even when not discovered as neighbors
|
* Display Phone and Wifi icon on nodes even when not discovered as neighbors
|
||||||
|
* Sort connected nodes first by VLAN
|
||||||
|
* Add docs note about RC scripts
|
||||||
|
|
||||||
[BUG FIXES]
|
[BUG FIXES]
|
||||||
|
|
||||||
@@ -11,6 +13,8 @@
|
|||||||
* Fixes to allow output of get_init_file to be used as init script
|
* Fixes to allow output of get_init_file to be used as init script
|
||||||
* Legitimate for same MAC to be in two VLANs on same switchport
|
* Legitimate for same MAC to be in two VLANs on same switchport
|
||||||
* Fix for broken [#82] (/etc/hosts check during ARP IP resolv)
|
* Fix for broken [#82] (/etc/hosts check during ARP IP resolv)
|
||||||
|
* Discover nodes on ports which have broken near-edge topology
|
||||||
|
* Use password instead of pass for Dancer::Plugin::DBIC
|
||||||
|
|
||||||
2.025001 - 2014-04-08
|
2.025001 - 2014-04-08
|
||||||
|
|
||||||
|
|||||||
@@ -78,4 +78,4 @@ resources:
|
|||||||
homepage: http://netdisco.org/
|
homepage: http://netdisco.org/
|
||||||
license: http://opensource.org/licenses/bsd-license.php
|
license: http://opensource.org/licenses/bsd-license.php
|
||||||
repository: git://git.code.sf.net/p/netdisco/netdisco-ng
|
repository: git://git.code.sf.net/p/netdisco/netdisco-ng
|
||||||
version: 2.026001_003
|
version: 2.026001_004
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ use strict;
|
|||||||
use warnings;
|
use warnings;
|
||||||
use 5.010_000;
|
use 5.010_000;
|
||||||
|
|
||||||
our $VERSION = '2.026001_003';
|
our $VERSION = '2.026001_004';
|
||||||
|
|
||||||
use App::Netdisco::Environment;
|
use App::Netdisco::Environment;
|
||||||
use Dancer ':script';
|
use Dancer ':script';
|
||||||
@@ -24,7 +24,7 @@ if (ref {} eq ref setting('database')) {
|
|||||||
setting('plugins')->{DBIC}->{netdisco} ||= {
|
setting('plugins')->{DBIC}->{netdisco} ||= {
|
||||||
dsn => $dsn,
|
dsn => $dsn,
|
||||||
user => $user,
|
user => $user,
|
||||||
pass => $pass,
|
password => $pass,
|
||||||
options => {
|
options => {
|
||||||
AutoCommit => 1,
|
AutoCommit => 1,
|
||||||
RaiseError => 1,
|
RaiseError => 1,
|
||||||
|
|||||||
@@ -88,13 +88,6 @@ sub do_macsuck {
|
|||||||
# reverse sort allows vlan 0 entries to be included only as fallback
|
# reverse sort allows vlan 0 entries to be included only as fallback
|
||||||
foreach my $vlan (reverse sort keys %$fwtable) {
|
foreach my $vlan (reverse sort keys %$fwtable) {
|
||||||
foreach my $port (keys %{ $fwtable->{$vlan} }) {
|
foreach my $port (keys %{ $fwtable->{$vlan} }) {
|
||||||
if ($device_ports->{$port}->is_uplink and not setting('macsuck_bleed')) {
|
|
||||||
debug sprintf
|
|
||||||
' [%s] macsuck - port %s is uplink, topo broken - skipping.',
|
|
||||||
$ip, $port;
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
|
|
||||||
debug sprintf ' [%s] macsuck - port %s vlan %s : %s nodes',
|
debug sprintf ' [%s] macsuck - port %s vlan %s : %s nodes',
|
||||||
$ip, $port, $vlan, scalar keys %{ $fwtable->{$vlan}->{$port} };
|
$ip, $port, $vlan, scalar keys %{ $fwtable->{$vlan}->{$port} };
|
||||||
|
|
||||||
@@ -296,6 +289,7 @@ sub _get_vlan_list {
|
|||||||
# table of node entries.
|
# table of node entries.
|
||||||
sub _walk_fwtable {
|
sub _walk_fwtable {
|
||||||
my ($device, $snmp, $interfaces, $port_macs, $device_ports, $comm_vlan) = @_;
|
my ($device, $snmp, $interfaces, $port_macs, $device_ports, $comm_vlan) = @_;
|
||||||
|
my $skiplist = {}; # ports through which we can see another device
|
||||||
my $cache = {};
|
my $cache = {};
|
||||||
|
|
||||||
my $fw_mac = $snmp->fw_mac;
|
my $fw_mac = $snmp->fw_mac;
|
||||||
@@ -308,7 +302,7 @@ sub _walk_fwtable {
|
|||||||
|
|
||||||
while (my ($idx, $mac) = each %$fw_mac) {
|
while (my ($idx, $mac) = each %$fw_mac) {
|
||||||
my $bp_id = $fw_port->{$idx};
|
my $bp_id = $fw_port->{$idx};
|
||||||
next unless check_mac($device, $mac, $port_macs);
|
next unless check_mac($device, $mac);
|
||||||
|
|
||||||
unless (defined $bp_id) {
|
unless (defined $bp_id) {
|
||||||
debug sprintf
|
debug sprintf
|
||||||
@@ -335,6 +329,13 @@ sub _walk_fwtable {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (exists $skiplist->{$port}) {
|
||||||
|
debug sprintf
|
||||||
|
' [%s] macsuck %s - seen another device thru port %s - skipping.',
|
||||||
|
$device->ip, $mac, $port;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
# this uses the cached $ports resultset to limit hits on the db
|
# this uses the cached $ports resultset to limit hits on the db
|
||||||
my $device_port = $device_ports->{$port};
|
my $device_port = $device_ports->{$port};
|
||||||
|
|
||||||
@@ -374,6 +375,8 @@ sub _walk_fwtable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $vlan = $fw_vlan->{$idx} || $comm_vlan || '0';
|
||||||
|
|
||||||
if (exists $port_macs->{$mac}) {
|
if (exists $port_macs->{$mac}) {
|
||||||
my $switch_ip = $port_macs->{$mac};
|
my $switch_ip = $port_macs->{$mac};
|
||||||
if ($device->ip eq $switch_ip) {
|
if ($device->ip eq $switch_ip) {
|
||||||
@@ -389,7 +392,12 @@ sub _walk_fwtable {
|
|||||||
|
|
||||||
# when there's no CDP/LLDP, we only want to gather macs at the
|
# when there's no CDP/LLDP, we only want to gather macs at the
|
||||||
# topology edge, hence skip ports with known device macs.
|
# topology edge, hence skip ports with known device macs.
|
||||||
next unless setting('macsuck_bleed');
|
if (not setting('macsuck_bleed')) {
|
||||||
|
debug sprintf ' [%s] macsuck %s - adding port %s to skiplist',
|
||||||
|
$device->ip, $mac, $port;
|
||||||
|
$skiplist->{$port} = delete $cache->{$vlan}->{$port};
|
||||||
|
next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# possibly move node to lag master
|
# possibly move node to lag master
|
||||||
@@ -399,7 +407,6 @@ sub _walk_fwtable {
|
|||||||
$device_ports->{$port}->update({is_uplink => \'true'});
|
$device_ports->{$port}->update({is_uplink => \'true'});
|
||||||
}
|
}
|
||||||
|
|
||||||
my $vlan = $fw_vlan->{$idx} || $comm_vlan || '0';
|
|
||||||
++$cache->{$vlan}->{$port}->{$mac};
|
++$cache->{$vlan}->{$port}->{$mac};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,16 @@
|
|||||||
|
|
||||||
App::Netdisco::Manual::Deployment - Tips and Tricks for Deployment
|
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:
|
||||||
|
|
||||||
|
bin/netdisco-web get_init_file
|
||||||
|
bin/netdisco-daemon get_init_file
|
||||||
|
|
||||||
|
If you'd like to send a patch for BSD, please submit it against the
|
||||||
|
L<Daemon::Control> distribution.
|
||||||
|
|
||||||
=head1 Enable MD5 authentication to PostgreSQL
|
=head1 Enable MD5 authentication to PostgreSQL
|
||||||
|
|
||||||
Some installations of PostgreSQL don't have MD5 authentication enabled by
|
Some installations of PostgreSQL don't have MD5 authentication enabled by
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ get '/ajax/content/device/ports' => require_login sub {
|
|||||||
# what kind of nodes are we interested in?
|
# what kind of nodes are we interested in?
|
||||||
my $nodes_name = (param('n_archived') ? 'nodes' : 'active_nodes');
|
my $nodes_name = (param('n_archived') ? 'nodes' : 'active_nodes');
|
||||||
$nodes_name .= '_with_age' if param('c_nodes') and param('n_age');
|
$nodes_name .= '_with_age' if param('c_nodes') and param('n_age');
|
||||||
$set = $set->search_rs({}, { order_by => ["${nodes_name}.mac", "ips.ip"] })
|
$set = $set->search_rs({}, { order_by => ["${nodes_name}.vlan", "${nodes_name}.mac", "ips.ip"] })
|
||||||
if param('c_nodes');
|
if param('c_nodes');
|
||||||
|
|
||||||
# retrieve active/all connected nodes, if asked for
|
# retrieve active/all connected nodes, if asked for
|
||||||
|
|||||||
Reference in New Issue
Block a user