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 #1790] (New) FATAL - Could not get a        valid
      iptree4 from cache ([email protected])
   2. [Netdot - Bug #1790] FATAL - Could not get a valid        iptree4
      from cache ([email protected])
   3. [Netdot - Bug #1790] FATAL - Could not get a valid        iptree4
      from cache ([email protected])
   4. [Netdot - Bug #1790] FATAL - Could not get a valid        iptree4
      from cache ([email protected])


----------------------------------------------------------------------

Message: 1
Date: Mon, 3 Feb 2014 05:16:22 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1790] (New) FATAL - Could not
        get a   valid iptree4 from cache
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1790 has been reported by Alen F.

----------------------------------------
Bug #1790: FATAL - Could not get a valid iptree4 from cache
https://osl.uoregon.edu/redmine/issues/1790

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: 2
Date: Mon, 3 Feb 2014 06:02:59 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1790] FATAL - Could not get a
        valid   iptree4 from cache
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1790 has been updated by Matej Vadnjal.


I think I can add some info on this issue.

I had the same problem with iptree6 for a while. I think I tracked this bug 
down, but I haven't tested the fix, cause the problem disappeared and I forgot 
to file a bug report.

iptree is a Net::Patricia object. This object gets serialized by 
Storable::nfreeze and cached in the netdot database by the DataCache model. 
Sometimes when a tree is frozen the last byte of the frozen object can be 0x20 
in hex or Space in ASCII table. This gets written to the database fine. When 
this DataCache record gets retrieved from the DB however it is missing the 
trailing 0x20 byte. In this case the Storable::thaw method fails and the tree 
cannot be used.

Rebuilding the tree will again result in the same data when frozen since no 
Ipblock changes cannot be preformed. 

I believe the issue is that Class::DBI trims data when read from the database. 
When I was looking at the database record it looked like the data was written 
properly - IE the trailing space was there.

Now, looking at lib/Netdot/Model/DataCache.pm it is my understanding that the 
frozen tree data should be encoded into base64 before saved into the database 
and decoded. But as I was investigating it looked like the data is base64 
encoded in the DataCache object attribute, but the data written to the DB is 
not. Probably again an issue in Class::DBI I imagine.

All my tests were done on netdot 1.0.4 with Mysql 5.1.71 and Class::DBI 3.0.17 
(which seems to be the latest available).

In all likelihood this is the same problem as Alen has.




----------------------------------------
Bug #1790: FATAL - Could not get a valid iptree4 from cache
https://osl.uoregon.edu/redmine/issues/1790#change-3150

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: Mon, 3 Feb 2014 06:13:13 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1790] FATAL - Could not get a
        valid   iptree4 from cache
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1790 has been updated by Matej Vadnjal.

File iptree.pl added

Alen: Here is a script to check if your issue is the same as mine was. Copy the 
script into your netdot folder (probably /usr/local/netdot) and run it like 
this:

perl iptree.pl 4 <netdot_db_username> <netdot_db_password>

All the binary data in last chars lines should be the same. If it is not you 
probably encountered the same bug as me.


----------------------------------------
Bug #1790: FATAL - Could not get a valid iptree4 from cache
https://osl.uoregon.edu/redmine/issues/1790#change-3151

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: 4
Date: Mon, 3 Feb 2014 06:25:37 -0800
From: [email protected]
Subject: [Netdot-devel] [Netdot - Bug #1790] FATAL - Could not get a
        valid   iptree4 from cache
To: [email protected], [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8


Issue #1790 has been updated by Alen F.


Hello Matej,

here the output 

Build tree and save to DB

Bulding tree in mem
Tree built in mem
Get tree via netdot lib

Message from syslogd@netdot at Feb  3 15:34:30 ...
 netdot: FATAL - Could not get a valid iptree4 from cache
Could not get tree via netdot lib. Error:
Could not get a valid iptree4 from cache

Trace begun at /usr/local/netdot/lib/Netdot.pm line 105
Netdot::throw_fatal('Ipblock', 'Could not get a valid iptree4 from cache') 
called at /usr/local/netdot/lib/Netdot/Model/Ipblock.pm line 3554
Netdot::Model::Ipblock::_tree_get('Ipblock', 4) called at iptree.pl line 71
eval {...} at iptree.pl line 70
Get tree from DB, no netdot:

Get tree from DB
DB tree: $VAR1 = undef;
DB tree frozen len: 2293
DB tree last chars: 
00011100.00000000.00000000.00000000.00011101.00000000.00000000.00000000.00011110.00000000.00000000.00000000.00011111.00000000.00000000.00000000

mem tree:$VAR1 = bless( do{\(my $o = 75991760)}, 'Net::Patricia::AF_INET' );
mem tree frozen len: 2294
mem tree frozen last chars: 
00000000.00000000.00000000.00011101.00000000.00000000.00000000.00011110.00000000.00000000.00000000.00011111.00000000.00000000.00000000.00100000

mem thawed tree:$VAR1 = bless( do{\(my $o = 76201872)}, 
'Net::Patricia::AF_INET' );
mem tree decoded len: 2294
mem tree decoded last chars: 
00000000.00000000.00000000.00011101.00000000.00000000.00000000.00011110.00000000.00000000.00000000.00011111.00000000.00000000.00000000.00100000

db tree encoded length: 2293
db tree encoded last chars: 
00011100.00000000.00000000.00000000.00011101.00000000.00000000.00000000.00011110.00000000.00000000.00000000.00011111.00000000.00000000.00000000

mem tree encoded length: 3060
mem tree encoded last chars: AAAeAAAAHwAAACA=

kind regards

----------------------------------------
Bug #1790: FATAL - Could not get a valid iptree4 from cache
https://osl.uoregon.edu/redmine/issues/1790#change-3152

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 83, Issue 2
*******************************************

Reply via email to