Merge branch 'master' into og-remoteport-fix
This commit is contained in:
1
Build.PL
1
Build.PL
@@ -53,6 +53,7 @@ Module::Build->new(
|
||||
'NetAddr::MAC' => '0.93',
|
||||
'NetAddr::IP' => '4.068',
|
||||
'Opcode' => '1.07',
|
||||
'Package::DeprecationManager' => '0',
|
||||
'Path::Class' => '0.32',
|
||||
'Plack' => '1.0023',
|
||||
'Plack::Handler::Twiggy' => '0',
|
||||
|
||||
9
Changes
9
Changes
@@ -1,3 +1,12 @@
|
||||
2.039021 - 2018-04-
|
||||
|
||||
[BUG FIXES]
|
||||
|
||||
* #389 build/upgrade issues (EL6)
|
||||
* #390 cannot take logarithm of zero (C. Stromsoe)
|
||||
* protect against undef mac (l.e. ferguson)
|
||||
* do not include logical aggregate masters in netmap/speed calc
|
||||
|
||||
2.039020 - 2018-03-26
|
||||
|
||||
[ENHANCEMENTS]
|
||||
|
||||
@@ -76,6 +76,7 @@ Dancer::Logger->init('console', $CONFIG);
|
||||
|
||||
MCE::Loop::init { chunk_size => 1 };
|
||||
my %stats;
|
||||
$stats{entry} = 0;
|
||||
|
||||
exit main();
|
||||
|
||||
@@ -130,13 +131,11 @@ sub process {
|
||||
my $arpentries = [ $device->arpnip($hostlabel, $ssh, $args) ];
|
||||
|
||||
# debug p $arpentries;
|
||||
if (scalar @$arpentries) {
|
||||
hostnames_resolve_async($arpentries);
|
||||
return [$hostlabel, $arpentries];
|
||||
}
|
||||
else {
|
||||
if (not scalar @$arpentries) {
|
||||
warning "WARNING: no entries received from <$hostlabel>";
|
||||
}
|
||||
hostnames_resolve_async($arpentries);
|
||||
return [$hostlabel, $arpentries];
|
||||
}
|
||||
|
||||
sub store_arpentries {
|
||||
|
||||
@@ -23,6 +23,7 @@ ajax '/ajax/content/search/node' => require_login sub {
|
||||
my ( $start, $end ) = param('daterange') =~ m/(\d+-\d+-\d+)/gmx;
|
||||
|
||||
my $mac = NetAddr::MAC->new(mac => $node);
|
||||
undef $mac if ($mac and $mac->as_ieee and ($mac->as_ieee eq '00:00:00:00'));
|
||||
my @active = (param('archived') ? () : (-bool => 'active'));
|
||||
|
||||
my (@times, @wifitimes, @porttimes);
|
||||
|
||||
@@ -39,6 +39,7 @@ get '/search' => require_login sub {
|
||||
my $nd = $s->resultset('Device')->search_fuzzy($q);
|
||||
my ($likeval, $likeclause) = sql_match($q);
|
||||
my $mac = NetAddr::MAC->new($q);
|
||||
undef $mac if ($mac and $mac->as_ieee and ($mac->as_ieee eq '00:00:00:00'));
|
||||
|
||||
if ($nd and $nd->count) {
|
||||
if ($nd->count == 1) {
|
||||
|
||||
@@ -288,13 +288,26 @@ sub store_neighbors {
|
||||
# update master of our aggregate to be a neighbor of
|
||||
# the master on our peer device (a lot of iffs to get there...).
|
||||
# & cannot use ->neighbor prefetch because this is the port insert!
|
||||
if ($peer_device and $peer_device->in_storage and defined $portrow->slave_of) {
|
||||
if (defined $portrow->slave_of) {
|
||||
|
||||
my $peer_device = get_device($remote_ip);
|
||||
my $master = schema('netdisco')->resultset('DevicePort')->single({
|
||||
ip => $device->ip,
|
||||
port => $portrow->slave_of
|
||||
});
|
||||
|
||||
<<<<<<< HEAD
|
||||
if ($master and not ($portrow->is_master or defined $master->slave_of)) {
|
||||
=======
|
||||
if ($peer_device and $peer_device->in_storage and $master
|
||||
and not ($portrow->is_master or defined $master->slave_of)) {
|
||||
|
||||
my $peer_port = schema('netdisco')->resultset('DevicePort')->single({
|
||||
ip => $peer_device->ip,
|
||||
port => $portrow->remote_port,
|
||||
});
|
||||
|
||||
>>>>>>> master
|
||||
$master->update({
|
||||
remote_ip => ($peer_device->ip || $remote_ip),
|
||||
remote_port => ($peer_port ? $peer_port->slave_of : undef ),
|
||||
@@ -309,6 +322,7 @@ sub store_neighbors {
|
||||
return @to_discover;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
sub long_port {
|
||||
my $port = shift or return '';
|
||||
$port =~ s/^([a-z]{2})(\d.+)$/$1%$2/i;
|
||||
@@ -323,6 +337,8 @@ sub short_port {
|
||||
return (($start && $end) ? "${start}${end}" : $port);
|
||||
}
|
||||
|
||||
=======
|
||||
>>>>>>> master
|
||||
# take data from the topology table and update remote_ip and remote_port
|
||||
# in the devices table. only use root_ips and skip any bad topo entries.
|
||||
sub set_manual_topology {
|
||||
|
||||
Reference in New Issue
Block a user