[rancid] prefix-list random order bug

heasley heas at shrubbery.net
Thu Dec 18 01:17:48 UTC 2014


> Tue, Dec 16, 2014 at 01:33:09PM +0200, Alan McKinnon:
> > You might be right. Somewhere around perl 5.14 or 5.16 the
> > implementation of associative arrays (hashes) was changed. The order of
> > keys for a given hash were randomly distributed but consistent from one
> > run to the next. The change made keys always come out in a random order.
> > I had to fix a few in-house apps at the time.
> > 
> > It's possible your version of rancid relies on the old behaviour. I
> > don't have a working install handy to investigate, but thought it worth
> > mentioning.

FWIW, I've looked at the code and tested it with perl 5.18 to be sure, I
do not think there is a problem due to the way rancid handles the hashes.
Any issues are likely due to the ip sorting problem, which i expect to
either be ipv6 related or a problem that existed with using the right key
with IOS-XR.  But, LMK if anyone finds an issue.

Also, the previous behavior seems be attainable by setting the environment
variables PERL_PERTURB_KEYS=0 and PERL_HASH_SEED=0.  Which could be done
in rancid.conf.


More information about the Rancid-discuss mailing list