Discussion:
[rancid] prefix-list random order bug
Christopher J. Umina
2014-12-15 13:19:07 UTC
Permalink
Hi,

Excuse me if somebody's solved this already, but I'm running into the same
issue as described here:

http://www.shrubbery.net/pipermail/rancid-discuss/2014-May/007630.html

Has this been fixed?

Thanks,
--
Christopher J. Umina
***@uminac.com
781 354 0535
Alan McKinnon
2014-12-15 14:48:57 UTC
Permalink
Post by Christopher J. Umina
Hi,
Excuse me if somebody's solved this already, but I'm running into the
http://www.shrubbery.net/pipermail/rancid-discuss/2014-May/007630.html
Has this been fixed?
If that's the one I think it is, I needed to do quite a few fixes to ACL
handling - Cisco changed something in the output format in some OSes.

The most common error is that the ACL ordering is still technically
correct, but the exact sequence is somewhat random because rancid can't
find the exact fields to sort on.

Patches exist, search the archives for threads where I posted,
especially threads I started. If you are running 2.3.8, try upgrading to
the latest point version (heasley may have applied the patches). If not,
apply them manually (they apply cleanly). I have changed jobs in the
interim and no longer have access to my patches there, but a well-worded
Google search will find them for you.
--
Alan McKinnon
***@gmail.com
heasley
2014-12-15 19:02:53 UTC
Permalink
Post by Alan McKinnon
Post by Christopher J. Umina
Hi,
Excuse me if somebody's solved this already, but I'm running into the
http://www.shrubbery.net/pipermail/rancid-discuss/2014-May/007630.html
Has this been fixed?
If that's the one I think it is, I needed to do quite a few fixes to ACL
handling - Cisco changed something in the output format in some OSes.
The most common error is that the ACL ordering is still technically
correct, but the exact sequence is somewhat random because rancid can't
find the exact fields to sort on.
Patches exist, search the archives for threads where I posted,
especially threads I started. If you are running 2.3.8, try upgrading to
the latest point version (heasley may have applied the patches). If not,
apply them manually (they apply cleanly). I have changed jobs in the
interim and no longer have access to my patches there, but a well-worded
Google search will find them for you.
there are problems with sorting v6; which I nearly have corrected. there is
a bug remaining, but i've had time due to travel. until that is available in
3.2, sorting can be disabled in rancid.conf.
Christopher J. Umina
2014-12-15 19:08:10 UTC
Permalink
Sorry, I should have clarified,

I'm using the 100% default rancid.conf (except LIST_OF_GROUPS, of course),
so ACLSORT is disabled.

# uname -a
FreeBSD test.box 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11
amd64
# pkg info perl\* rancid\*
perl5-5.18.4_10
rancid3-3.1_1
This issue didn't occur until I upgraded to FreeBSD 10.1 and all packages
were upgraded. Not sure what the original version of Perl was, but I have
a feeling that's what broke things.

Anything I can do to help here?
Post by Alan McKinnon
Post by Christopher J. Umina
Hi,
Excuse me if somebody's solved this already, but I'm running into the
http://www.shrubbery.net/pipermail/rancid-discuss/2014-May/007630.html
Has this been fixed?
If that's the one I think it is, I needed to do quite a few fixes to ACL
handling - Cisco changed something in the output format in some OSes.
The most common error is that the ACL ordering is still technically
correct, but the exact sequence is somewhat random because rancid can't
find the exact fields to sort on.
Patches exist, search the archives for threads where I posted,
especially threads I started. If you are running 2.3.8, try upgrading to
the latest point version (heasley may have applied the patches). If not,
apply them manually (they apply cleanly). I have changed jobs in the
interim and no longer have access to my patches there, but a well-worded
Google search will find them for you.
there are problems with sorting v6; which I nearly have corrected. there is
a bug remaining, but i've had time due to travel. until that is available in
3.2, sorting can be disabled in rancid.conf.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
--
Christopher J. Umina
***@uminac.com
781 354 0535
Alan McKinnon
2014-12-16 11:33:09 UTC
Permalink
Post by Christopher J. Umina
Sorry, I should have clarified,
I'm using the 100% default rancid.conf (except LIST_OF_GROUPS, of
course), so ACLSORT is disabled.
# uname -a
FreeBSD test.box 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue
Nov 11 21:02:49 UTC 2014
# pkg info perl\* rancid\*
perl5-5.18.4_10
rancid3-3.1_1
This issue didn't occur until I upgraded to FreeBSD 10.1 and all
packages were upgraded. Not sure what the original version of Perl was,
but I have a feeling that's what broke things.
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.
Post by Christopher J. Umina
Anything I can do to help here?
Post by Alan McKinnon
Post by Christopher J. Umina
Hi,
Excuse me if somebody's solved this already, but I'm running into the
http://www.shrubbery.net/pipermail/rancid-discuss/2014-May/007630.html
Has this been fixed?
If that's the one I think it is, I needed to do quite a few fixes to ACL
handling - Cisco changed something in the output format in some OSes.
The most common error is that the ACL ordering is still technically
correct, but the exact sequence is somewhat random because rancid can't
find the exact fields to sort on.
Patches exist, search the archives for threads where I posted,
especially threads I started. If you are running 2.3.8, try upgrading to
the latest point version (heasley may have applied the patches). If not,
apply them manually (they apply cleanly). I have changed jobs in the
interim and no longer have access to my patches there, but a well-worded
Google search will find them for you.
there are problems with sorting v6; which I nearly have corrected.
there is
a bug remaining, but i've had time due to travel. until that is available in
3.2, sorting can be disabled in rancid.conf.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
--
Christopher J. Umina
781 354 0535
--
Alan McKinnon
***@gmail.com
heasley
2014-12-16 21:56:17 UTC
Permalink
Post by Alan McKinnon
Post by Christopher J. Umina
Sorry, I should have clarified,
I'm using the 100% default rancid.conf (except LIST_OF_GROUPS, of
course), so ACLSORT is disabled.
It is not the default, unless fbsd changed it.
Post by Alan McKinnon
Post by Christopher J. Umina
# uname -a
FreeBSD test.box 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue
Nov 11 21:02:49 UTC 2014
# pkg info perl\* rancid\*
perl5-5.18.4_10
rancid3-3.1_1
This issue didn't occur until I upgraded to FreeBSD 10.1 and all
packages were upgraded. Not sure what the original version of Perl was,
but I have a feeling that's what broke things.
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.
perhaps; my test boxes are all 5.14 and I do not see the problem. I'll
investigate. thanks.
Christopher J. Umina
2014-12-16 22:11:33 UTC
Permalink
Ah, that was confusing. I assumed since it was commented it was not enabled
by default. It appears that explicitly setting it to NO has fixed the issue.

So, it appears that ACLSORT is broken by the new Perl, not the other way
around.

Sorry I missed that and thank you for the help.
Post by heasley
Post by Alan McKinnon
Post by Christopher J. Umina
Sorry, I should have clarified,
I'm using the 100% default rancid.conf (except LIST_OF_GROUPS, of
course), so ACLSORT is disabled.
It is not the default, unless fbsd changed it.
Post by Alan McKinnon
Post by Christopher J. Umina
# uname -a
FreeBSD test.box 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue
Nov 11 21:02:49 UTC 2014
# pkg info perl\* rancid\*
perl5-5.18.4_10
rancid3-3.1_1
This issue didn't occur until I upgraded to FreeBSD 10.1 and all
packages were upgraded. Not sure what the original version of Perl
was,
Post by Alan McKinnon
Post by Christopher J. Umina
but I have a feeling that's what broke things.
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.
perhaps; my test boxes are all 5.14 and I do not see the problem. I'll
investigate. thanks.
_______________________________________________
Rancid-discuss mailing list
http://www.shrubbery.net/mailman/listinfo/rancid-discuss
--
Christopher J. Umina
***@uminac.com
781 354 0535
heasley
2014-12-18 01:17:48 UTC
Permalink
Post by 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.

Loading...