Send Netdot-devel mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Netdot-devel digest..."
Today's Topics:
1. [Netdot - Bug #1818] Could not insert base MAC: : Error while
inserting PhysAddr: Missing address ([email protected])
2. [Netdot - Bug #1790] FATAL - Could not get a valid iptree4
from cache ([email protected])
3. [Netdot - Bug #1809] (Resolved) UI bug when viewing BGP peers
([email protected])
4. [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.6-26-g25130aa ([email protected])
5. [Netdot - Bug #1790] FATAL - Could not get a valid iptree4
from cache ([email protected])
6. [Netdot - Bug #1790] FATAL - Could not get a valid iptree4
from cache ([email protected])
7. [Netdot - Bug #1790] FATAL - Could not get a valid iptree4
from cache ([email protected])
----------------------------------------------------------------------
Message: 1
Date: Fri, 27 Jun 2014 12:05:11 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1818] Could not insert base
MAC: : Error while inserting PhysAddr: Missing address
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1818 has been updated by Carlos Vicente.
Brian Candler wrote:
> Carlos Vicente wrote:
> > Problem 1:
> >
> > Very strange because notice that the physaddr value passed in the SQL
> > insert statement is "2". I re-read the code and could not figure out how
> > that may have happened.
>
> I did have a capture of $info in _assign_base_mac but unfortunately haven't
> kept the logs.
>
> However IIRC, the interfaces at that point looked something like this:
>
> [...]
But notice that the value expected is not an interface IfIndex, but the id of
the PhysAddr record in the DB.
----------------------------------------
Bug #1818: Could not insert base MAC: : Error while inserting PhysAddr: Missing
address
https://osl.uoregon.edu/redmine/issues/1818#change-3211
Author: Brian Candler
Status: Resolved
Priority: Normal
Assignee: Brian Candler
Category: DeviceManagement
Target version: 1.0.7
Resolution: fixed
[Netdot 1.0.6, configured with IFNAME_SHORT => 1, running under Ubuntu 14.04]
This is when adding the first device, which is the Netdot server itself,
running snmpd.
It was added via the GUI and using SNMP, and then I ran from the CLI:
<pre>
/usr/local/netdot/bin/updatedevices.pl -DIFAT -d
...
DEBUG - Device::get_snmp_info: Finished getting SNMP info from x.x.x.21
DEBUG - monitor.example.net did not return base MAC. Using first available
interface MAC.
Use of uninitialized value $address in sprintf at
/usr/local/netdot/lib/Netdot/Model/Device.pm line 5641.
DEBUG - monitor.example.net: Could not insert base MAC: : Error while inserting
PhysAddr: Missing address
DEBUG - monitor.example.net: No suitable base MAC found
ERROR - Error while inserting Asset: Can't insert new Asset: DBD::mysql::st
execute failed: Cannot add or update a child row: a foreign key constraint
fails (`netdot`.`asset`, CONSTRAINT `fk_physaddr_1` FOREIGN KEY (`physaddr`)
REFERENCES `physaddr` (`id`)) [for Statement "INSERT INTO asset (product_id,
reserved_for, physaddr)
VALUES (?, ?, ?)
" with ParamValues: 0='1', 1=undef, 2=2] at
/usr/share/perl5/DBIx/ContextualFetch.pm line 52.
at /usr/local/netdot/bin/updatedevices.pl line 213.
</pre>
So two issues.
Problem 1: error handling when no base MAC address can be found (shouldn't try
to insert undef value; shouldn't continue with a SQL constraint failure). I
haven't looked at ways of improving this. Note that recent fix #1814 will
suppress the sprintf error, but I'm not sure it will fix the Asset insertion.
Problem 2: why no base MAC address was found on a machine which clearly has
interfaces?
<pre>
$ snmpwalk -v2c -c XXXX x.x.x.21 ifTable
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: em1
IF-MIB::ifType.1 = INTEGER: softwareLoopback(24)
IF-MIB::ifType.2 = INTEGER: ethernetCsmacd(6)
IF-MIB::ifMtu.1 = INTEGER: 65536
IF-MIB::ifMtu.2 = INTEGER: 1500
IF-MIB::ifSpeed.1 = Gauge32: 10000000
IF-MIB::ifSpeed.2 = Gauge32: 100000000
IF-MIB::ifPhysAddress.1 = STRING:
IF-MIB::ifPhysAddress.2 = STRING: 90:b1:1c:90:d2:1c
</pre>
Note that because this machine has a modern 3.13 kernel, it is using the new
"predictable network interface names" instead of eth0. See
http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
I will skip all the boring debugging I had to do to get to the bottom of this,
which in fact is explained in a lowly debug message:
<pre>
DEBUG - Device::get_snmp_info: x.x.x.21: Interface em1 ignored per config
option (IFRESERVED)
</pre>
Grr. The pattern explicitly excludes <code>em\d+</code>. But why? Also, the
default IFRESERVED regexp is missing parentheses, so only the first item is
anchored.
So I would suggest a better default to be:
<pre>
IFRESERVED =>
'^(bme|pime|mtun|lsi|jsrv|pimd|vt-|tap|pe-|pd-|dsc|rptr|unrouted)',
</pre>
However this still assumes that we won't ever come across any Linux devices
with names like bme0 or dsc0.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://osl.uoregon.edu/redmine/my/account
------------------------------
Message: 2
Date: Fri, 27 Jun 2014 12:20:45 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1790] FATAL - Could not get a
valid iptree4 from cache
To: [email protected], [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1790 has been updated by Carlos Vicente.
Wim Vandersmissen wrote:
> Carlos, got bitten by the bug today, tried your no_cdbi patch, didn't work.
> base64 encoding the data did work however, I created a pull request on github
> for it
>
> https://github.com/cvicente/Netdot/pull/18
Thanks, but I just tested it and got:
<pre>Magic number checking on storable string failed at
/usr/lib/perl/5.14/Storable.pm line 416.</pre>
Any ideas?
----------------------------------------
Bug #1790: FATAL - Could not get a valid iptree4 from cache
https://osl.uoregon.edu/redmine/issues/1790#change-3212
Author: Alen F
Status: New
Priority: Urgent
Assignee: Alen F
Category: Netdot
Target version: 1.0.5
Resolution:
Hello,
since Upgrade to 1.5 this error is on add/delete etc.
IP Tree Update not solve the problem.
kind regards
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://osl.uoregon.edu/redmine/my/account
------------------------------
Message: 3
Date: Fri, 27 Jun 2014 12:56:31 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1809] (Resolved) UI bug when
viewing BGP peers
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1809 has been updated by Carlos Vicente.
Status changed from New to Resolved
Resolution set to fixed
Added extra checks
----------------------------------------
Bug #1809: UI bug when viewing BGP peers
https://osl.uoregon.edu/redmine/issues/1809#change-3213
Author: Carlos Vicente
Status: Resolved
Priority: High
Assignee: Carlos Vicente
Category: UserInterface
Target version: 1.0.7
Resolution: fixed
You need to pass a valid object or a table name Trace begun at
/usr/local/netdot/lib/Netdot.pm line 105
Netdot::throw_fatal('Netdot::UI=HASH(0x7f48caee29c0)', 'You need to pass a
valid object or a table name') called at /usr/local/netdot/lib/Netdot/UI.pm
line 330 Netdot::UI::form_field('Netdot::UI=HASH(0x7f48caee29c0)', 'object',
undef, 'column', 'number', 'edit', undef, 'linkPage', 'view.html',
'returnValOnly', 1) called at /usr/local/netdot/htdocs/management/device.html
line 1216 HTML::Mason::Commands::__ANON__('view', 'BGP', 'id', 14,
'showheader', 1, 'page', 'DEVICE') called at
/usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f489c555e50)',
'view', 'BGP', 'id', 14, 'showheader', 1, 'page', 'DEVICE') called at
/usr/share/perl5/HTML/Mason/Request.pm line 1302 eval {...} at
/usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'view', 'BGP', 'id', 14,
'showhead!
er', 1, 'page', 'DEVICE') called at /usr/share/perl5/HTML/Mason/Request.pm
line 955
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0x7f489c5da9d8)',
'page', 'DEVICE') called at /usr/local/netdot/htdocs/management/autohandler
line 81 HTML::Mason::Commands::__ANON__('view', 'BGP', 'id', 14, 'showheader',
1) called at /usr/share/perl5/HTML/Mason/Component.pm line 157
HTML::Mason::Component::run_dynamic_sub('HTML::Mason::Component::FileBased=HASH(0x7f489c0cbe88)',
'main', 'view', 'BGP', 'id', 14, 'showheader', 1) called at
/usr/share/perl5/HTML/Mason/Request.pm line 948
HTML::Mason::Request::call_dynamic('HTML::Mason::Request::ApacheHandler=HASH(0x7f489c5da9d8)',
'main', 'view', 'BGP', 'id', 14, 'showheader', 1) called at
/usr/local/netdot/htdocs/masondata/obj/1249759374/management/autohandler.obj
line 21 HTML::Mason::Commands::__ANON__('view', 'BGP', 'id', 14, 'showheader',
1) called at /usr/share/perl5/HTML/Mason/Component.pm line 135 HTML::Mason::C!
omponent::run('HTML::Mason::Component::FileBased=HASH(0x7f489c0cbe88)'
, 'view', 'BGP', 'id', 14, 'showheader', 1) called at
/usr/share/perl5/HTML/Mason/Request.pm line 1302 eval {...} at
/usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'view', 'BGP', 'id', 14,
'showheader', 1) called at /usr/share/perl5/HTML/Mason/Request.pm line 955
HTML::Mason::Request::call_next('HTML::Mason::Request::ApacheHandler=HASH(0x7f489c5da9d8)',
'showheader', 1) called at /usr/local/netdot/htdocs/autohandler line 76
HTML::Mason::Commands::__ANON__('view', 'BGP', 'id', 14) called at
/usr/share/perl5/HTML/Mason/Component.pm line 135
HTML::Mason::Component::run('HTML::Mason::Component::FileBased=HASH(0x7f489c0ec3f8)',
'view', 'BGP', 'id', 14) called at /usr/share/perl5/HTML/Mason/Request.pm line
1297 eval {...} at /usr/share/perl5/HTML/Mason/Request.pm line 1292
HTML::Mason::Request::comp(undef, undef, undef, 'view', 'BGP', 'id', 14) called
at /usr/share/perl5/HTML/Mason/Request.pm line 481 eval {...} at
/usr/share/perl5!
/HTML/Mason/Request.pm line 481 eval {...} at
/usr/share/perl5/HTML/Mason/Request.pm line 433
HTML::Mason::Request::exec('HTML::Mason::Request::ApacheHandler=HASH(0x7f489c5da9d8)')
called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 165
HTML::Mason::Request::ApacheHandler::exec('HTML::Mason::Request::ApacheHandler=HASH(0x7f489c5da9d8)')
called at /usr/share/perl5/HTML/Mason/ApacheHandler.pm line 831
HTML::Mason::ApacheHandler::handle_request('HTML::Mason::ApacheHandler=HASH(0x7f48cb052ca0)',
'Apache2::RequestRec=SCALAR(0x7f489c564050)') called at
/usr/local/netdot/lib/Netdot/Mason.pm line 59
Netdot::Mason::handler('Apache2::RequestRec=SCALAR(0x7f489c564050)') called at
-e line 0 eval {...} at -e line 0
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://osl.uoregon.edu/redmine/my/account
------------------------------
Message: 4
Date: Fri, 27 Jun 2014 12:57:10 -0700
From: [email protected]
Subject: [Netdot-devel] [SCM] Netdot branch netdot-1.0 updated.
netdot-1.0.6-26-g25130aa
To: [email protected]
Message-ID: <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Netdot".
The branch, netdot-1.0 has been updated
via 25130aa01e53cc4be7153de7c096ced3338d0226 (commit)
via c0f4d299b3718a6bc375fb24d4c30d74fdf52d98 (commit)
from 2c3925ce8fce1880c2a718e661380665a5332484 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 25130aa01e53cc4be7153de7c096ced3338d0226
Author: Carlos Vicente <[email protected]>
Date: Fri Jun 27 15:57:00 2014 -0400
Fix for #1809 (UI bug when viewing BGP peers)
diff --git a/htdocs/management/device.html b/htdocs/management/device.html
index 1be8d07..ef6bba1 100644
--- a/htdocs/management/device.html
+++ b/htdocs/management/device.html
@@ -1217,7 +1217,7 @@ if ( $editips || $add_ip ) {
% push( @cell_data, $ui->form_field(object=>$o->bgplocalas,
column=>"number", edit=>$editdevbgp,
% linkPage=>"view.html", returnValOnly=>1) );
% }else{
- push( @cell_data, "n/a")
+% push( @cell_data, "n/a")
% }
<div class="container">
diff --git a/lib/Netdot/Model/Device.pm b/lib/Netdot/Model/Device.pm
index 700d6dd..88846f0 100644
--- a/lib/Netdot/Model/Device.pm
+++ b/lib/Netdot/Model/Device.pm
@@ -3716,9 +3716,11 @@ sub get_bgp_peers {
@peers = grep { $_->asnumber eq $argv{as} } $self->bgppeers;
}elsif ( $argv{type} ){
if ( $argv{type} eq "internal" ){
- @peers = grep { defined $_->entity && $_->entity->asnumber ==
$self->bgplocalas->number } $self->bgppeers;
+ @peers = grep { defined $_->entity && defined $self->bgplocalas &&
+ $_->entity->asnumber == $self->bgplocalas->number
} $self->bgppeers;
}elsif ( $argv{type} eq "external" ){
- @peers = grep { defined $_->entity && $_->entity->asnumber !=
$self->bgplocalas->number } $self->bgppeers;
+ @peers = grep { defined $_->entity && defined $self->bgplocalas &&
+ $_->entity->asnumber != $self->bgplocalas->number
} $self->bgppeers;
}elsif ( $argv{type} eq "all" ){
@peers = $self->bgppeers();
}else{
commit c0f4d299b3718a6bc375fb24d4c30d74fdf52d98
Author: Carlos Vicente <[email protected]>
Date: Fri Jun 27 15:37:40 2014 -0400
Fix for #1809 (UI bug when viewing BGP peers)
diff --git a/htdocs/management/device.html b/htdocs/management/device.html
index 5f068fd..1be8d07 100644
--- a/htdocs/management/device.html
+++ b/htdocs/management/device.html
@@ -1213,8 +1213,12 @@ if ( $editips || $add_ip ) {
% push( @field_headers, "BGP ID: " );
% push( @cell_data, $ui->form_field(object=>$o, column=>"bgpid",
edit=>$editdevbgp, returnValOnly=>1) );
% push( @field_headers, "BGP Local AS: " );
-% push( @cell_data, $ui->form_field(object=>$o->bgplocalas, column=>"number",
edit=>$editdevbgp,
-% linkPage=>"view.html", returnValOnly=>1) );
+% if ( $o->bgplocalas ){
+% push( @cell_data, $ui->form_field(object=>$o->bgplocalas,
column=>"number", edit=>$editdevbgp,
+% linkPage=>"view.html", returnValOnly=>1) );
+% }else{
+ push( @cell_data, "n/a")
+% }
<div class="container">
<div class="containerheadleft">Device BGP Info</div>
-----------------------------------------------------------------------
Summary of changes:
htdocs/management/device.html | 8 ++++++--
lib/Netdot/Model/Device.pm | 6 ++++--
2 files changed, 10 insertions(+), 4 deletions(-)
hooks/post-receive
--
Netdot
------------------------------
Message: 5
Date: Fri, 27 Jun 2014 14:33:45 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1790] FATAL - Could not get a
valid iptree4 from cache
To: [email protected], [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1790 has been updated by Wim Vandersmissen.
What did you exactly do to get this message ?
If you tested it with the iptree.pl then you'll get this message because the
script doesn't use base64 decode on the raw data from the database
If so, try this patch for iptree.pl
<pre>
--- iptree.pl 2014-06-27 15:12:24.000000000 +0200
+++ iptreefixed.pl 2014-06-27 23:29:26.000000000 +0200
@@ -86,8 +86,8 @@
print "Get tree from DB\n";
my $db_cache = DataCache->search(name=>"iptree$version")->first;
-my $db_data = $db_cache->data;
-my $db_tree = thaw $db_cache->data;
+my $db_data = APR::Base64::decode($db_cache->data);
+my $db_tree = thaw $db_data;
print "DB tree: ";
print Dumper $db_tree;
print "DB tree frozen len: " . length($db_data) ."\n";
</pre>
----------------------------------------
Bug #1790: FATAL - Could not get a valid iptree4 from cache
https://osl.uoregon.edu/redmine/issues/1790#change-3214
Author: Alen F
Status: New
Priority: Urgent
Assignee: Alen F
Category: Netdot
Target version: 1.0.5
Resolution:
Hello,
since Upgrade to 1.5 this error is on add/delete etc.
IP Tree Update not solve the problem.
kind regards
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://osl.uoregon.edu/redmine/my/account
------------------------------
Message: 6
Date: Fri, 27 Jun 2014 19:18:18 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1790] FATAL - Could not get a
valid iptree4 from cache
To: [email protected], [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1790 has been updated by Carlos Vicente.
Wim Vandersmissen wrote:
> What did you exactly do to get this message ?
I inserted a /22 block under an existing container. I haven't looked into the
details of the error yet.
----------------------------------------
Bug #1790: FATAL - Could not get a valid iptree4 from cache
https://osl.uoregon.edu/redmine/issues/1790#change-3215
Author: Alen F
Status: New
Priority: Urgent
Assignee: Alen F
Category: Netdot
Target version: 1.0.5
Resolution:
Hello,
since Upgrade to 1.5 this error is on add/delete etc.
IP Tree Update not solve the problem.
kind regards
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://osl.uoregon.edu/redmine/my/account
------------------------------
Message: 7
Date: Sat, 28 Jun 2014 04:15:33 -0700
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1790] FATAL - Could not get a
valid iptree4 from cache
To: [email protected], [email protected]
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8
Issue #1790 has been updated by Wim Vandersmissen.
Did you rebuild the tree before inserting this block? It has to be rebuild so
it's base64-encoded in the database.
If you did this and still got that error, I've got no clue :)
----------------------------------------
Bug #1790: FATAL - Could not get a valid iptree4 from cache
https://osl.uoregon.edu/redmine/issues/1790#change-3216
Author: Alen F
Status: New
Priority: Urgent
Assignee: Alen F
Category: Netdot
Target version: 1.0.5
Resolution:
Hello,
since Upgrade to 1.5 this error is on add/delete etc.
IP Tree Update not solve the problem.
kind regards
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://osl.uoregon.edu/redmine/my/account
------------------------------
_______________________________________________
Netdot-devel mailing list
[email protected]
https://osl.uoregon.edu/mailman/listinfo/netdot-devel
End of Netdot-devel Digest, Vol 87, Issue 14
********************************************