Bug 1224143 - Rancid 3.2 not compatible with EL6 Perl (5.10)
Summary: Rancid 3.2 not compatible with EL6 Perl (5.10)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: rancid
Version: el6
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: David Brown
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-22 09:11 UTC by Thomas Bellman
Modified: 2015-10-21 16:57 UTC (History)
7 users (show)

Fixed In Version: rancid-3.1-4.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-25 23:57:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to rancid.pm for using inet_pton from the Socket6 module (396 bytes, patch)
2015-05-22 09:11 UTC, Thomas Bellman
no flags Details | Diff

Description Thomas Bellman 2015-05-22 09:11:41 UTC
Created attachment 1028651 [details]
Patch to rancid.pm for using inet_pton from the Socket6 module

Description of problem:

The new Rancid version (3.2-1) that was released into EPEL-6 on May 20th,
is not compatible with the Perl version (5.10) in EL-6.  It tries to use
the inet_pton() function from the Socket module, but that function does
not exist in perl-5.10.1-136.el6_6.1.

The result is the following log messages in /var/log/rancid:

    "inet_pton" is not exported by the Socket module
    Can't continue after import errors at /usr/share/perl5/vendor_perl/rancid/rancid.pm line 51
    BEGIN failed--compilation aborted at /usr/share/perl5/vendor_perl/rancid/rancid.pm line 51.
    Compilation failed in require at /usr/libexec/rancid/rancid line 61.
    BEGIN failed--compilation aborted at /usr/libexec/rancid/rancid line 61.

and Rancid is (of course) then unable to actually fetch the configurations
of our routers and switches.


Version-Release number of selected component (if applicable):

3.2-1


How reproducible:

Very.


Steps to Reproduce:
1. Upgrade to rancid-3.2-1.el6 on a CentOS 6.6 machine
2. Wait for Rancid to run
3. Check the logs in /var/log/rancid


Additional info:

Changing rancid.pm to use inet_pton() from the Socket6 module seems
to work.  Attaching patch for the installed rancid.pm.  I don't have
time today to write a patch to apply to the source RPM (the spec file
needs to require the perl-Socket6 package as well).

Comment 1 Thomas Bellman 2015-05-22 09:20:20 UTC
I should perhaps also note that rancid.pm declares that it is satisfied
with Perl 5.10, via the line "use 5.010;".  That seems to be an upstream
bug; as it wants to use inet_pton(), it probably ought to require some
higher version.

Comment 2 David Brown 2015-05-24 14:53:59 UTC
Looks like this functionality is under the Socket6 perl mod.

use Socket6 qw(AF_INET6 inet_pton);
use Socket qw(AF_INET);

At least this gets past the import error, not sure if inet_pton will take AF_INET and an IPv4 address and do the sort, have to make a script and test.

Comment 3 Thomas Bellman 2015-05-25 08:22:46 UTC
> not sure if inet_pton will take AF_INET and an IPv4 address and do the sort

Yes, it does work:

$ perl -e 'use Socket qw(AF_INET); use Socket6 qw(AF_INET6 inet_pton); print inet_pton(AF_INET, "130.236.101.9");' | od -tx1
0000000 82 ec 65 09
0000004

I have been running with my patch (which does exactly that) since Friday
without any problems.  It just needs to be packaged into the RPM, and a
dependency on perl-Socket6 added.

(I don't think that change is needed for EL-7, by the way; that Perl
version seems to have integrated inet_pton() into the normal Socket
module.)

Comment 4 Anand Buddhdev 2015-05-26 09:38:21 UTC
Hey guys. We've just been bitten by this bug. Our rancid is now broken completely. Could you please raise the severity of this to "urgent" and provide a fix ASAP? This has broken rancid installations everywhere!!

Comment 5 Dario Landazuri 2015-05-26 16:59:01 UTC
This problem has bitten me too.  I've worked around it for the time being by downgrading back to rancid 3.1 and excluding it in yum.conf, but it would be nice to see a (relatively) prompt fix for this.  Especially if the correct answer is as simple as Thomas Bellman's proposed patch.

Also, probably a severity of "High" might be more appropriate, but ymmv.

Comment 6 Anand Buddhdev 2015-05-28 11:19:34 UTC
Could the maintainer of this package please update us on the status? Our rancid is still failing, and this is a critical bug, because this updated has broken existing system. It needs more attention.

Comment 7 David Brown 2015-05-28 15:47:36 UTC
I'm currently working through this issue, please make sure that upstream knows about your issues. rancid

There is a simple patch to get you working as stated in the first couple of posts.

Seems like there are more issues than this with 3.2 so I'll be packing them together into a single update soon.

Comment 8 Dario Landazuri 2015-05-28 16:16:54 UTC
Alternatively, Anand, to get up and running, you can also just do a yum --downgrade rancid while waiting for David to get this fixed.  Don't forget to put an exclude line in /etc/yum.conf for the time being as well.

Comment 9 Fedora Update System 2015-05-30 18:20:58 UTC
rancid-3.1-4.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/rancid-3.1-4.el6

Comment 10 Fedora Update System 2015-06-01 17:05:20 UTC
Package rancid-3.1-4.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing rancid-3.1-4.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-6501/rancid-3.1-4.el6
then log in and leave karma (feedback).

Comment 11 Anand Buddhdev 2015-06-02 19:39:10 UTC
I "updated" from 3.2-1 to 3.1-4, and it works for me now. Thank you!

Comment 12 David Brown 2015-06-04 22:59:59 UTC
I did post to the rancid mailing list about this issue. The response was long and reasonable. So it looks like this version of rancid will be the last for EPEL 6, just fyi for people who care.

Comment 13 Stefan Neufeind 2015-06-20 20:47:15 UTC
The (still pending) update 3.1-4 works for me. Downgraded from 3.2-1. I've also added my karma for the package. Anand voted as well but anonymous (without karma). Could you please push the package through and make sure the 3.2-1 gets pulled from the mirrors?

Comment 14 Fedora Update System 2015-06-25 23:57:51 UTC
rancid-3.1-4.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 15 Tommy McNeely 2015-10-21 16:57:45 UTC
Hi all,

I realize this is already "closed" but I wondered why the fairly simple workaround (patch) attached wasn't used to maintain EL6 compatibility instead of downgrading to 3.1. We would really like 3.2 with its integrated "git" capabilities in the EPEL repo rather than building our own or using some other (GhettoForge Plus) repo. For what its worth, I have tried the GhettoForge package on a test system and had to apply the patch attached here (they are working on that and rev'ing theirs to match the epoch change in EPEL), and it seems to work fine in EL6. We are not doing anything that requires IPv6 in our management VLAN though.

Thanks in advance,
Tommy


Note You need to log in before you can comment on or make changes to this bug.