[rancid] Repetitive RANCID Checks

Alan McKinnon alan.mckinnon at gmail.com
Thu May 15 14:44:46 UTC 2014


On 13/05/2014 22:04, Mark Tinka wrote:
> Hi all.
> 
> We upgraded to Perl-5.18 today on FreeBSD-10, and rebuilt 
> all ports that depend on Perl, including RANCID.
> 
> Since then, RANCID has been continuously e-mailing the same  
> changes at every interval, even though those changes have 
> not been actually effected.
> 
> The changes are essentially re-ordered prefix list entries 
> for Cisco IOS-based systems.
> 
> Anyone know what this is, before I go hacking at this?
> 
> RANCID version is 2.3.8. Thanks.



I see what the bug is here, the solution probably needs list discussion
first.

With rancid-2.3.8 and perl-5.18, ipv6 prefix-lists are always output in
random order if ACLSORT=yes

The cause is twofold:

1. "sub ipaddrval" is ipv4-specific and cannot deal with ipv6 addresses
properly, so sortbyipaddr() doesn't work as intended. I believe that
%history in ProcessHistory() is not being sorted at all

2. A recent perl version re-implemented hashes to guarantee that keys
are randomly ordered internally and different between runs of the same
script. The previous implementation would order the same data
consistently between invocations.

So ipv6 prefix-list ordering just happened to work with <perl-5.18
because %history just happened to be consistently ordered.

Solutions:

1. Implement ipv6 sorting in sortbyipaddr(). I really want to find an
excuse not to do this (being essentially a lazy bum at heart)

2. Why are we sorting these lists by ip address? Surely sorting 1) by
prefix name then 2) by seq makes more sense? This is what my NetOps
colleagues would like to see happen.


-- 
Alan McKinnon
alan.mckinnon at gmail.com



More information about the Rancid-discuss mailing list