Linux

Infoblox API Perl Modules

0

We recently migrated from Alcatel-Lucent’s VitalQIP to Infoblox for our IPAM (IP Address Management) solution. I hope to make a more detailed post reviewing Infoblox in the future, for now I’ll stick with the issue of integrating with the API interface. One of our goals for the past few years has been to enable MAC address registration essentially turning off the dynamic nature of DHCP. This would prevent someone from connecting any device to our internal network and getting a DHCP issued IP address. It certainly not a complete solution to the security dilemmas but it would be a good first step.

I do most of my work with CentOS and RedHat Linux because those are the distributions that my organization supports internally (even if I’m one of two people that support Linux across the entire organization). In this case I was working with a CentOS 5.7 server but I was having an issue compiling and installing the Infoblox Perl modules.

LWP::UserAgent version 5.813 required–this is only version 2.033

When I attempted to compile the Infoblox Perl modules I received the following errors;

LWP::UserAgent version 5.813 required--this is only version 2.033 at /usr/lib/perl5/site_perl/5.8.8/Infoblox/Agent.pm line 3.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/Infoblox/Agent.pm line 3.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.8/Infoblox/Session.pm line 19.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/Infoblox/Session.pm line 19.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.8/Infoblox.pm line 8.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/Infoblox.pm line 8.
Compilation failed in require at ./ibcli.pl line 78.
BEGIN failed--compilation aborted at ./ibcli.pl line 78.

This was with Perl 5.8.8 on CentOS 5.7 x64, unfortunately it seems this is a known issue with the version of LWP::UserAgent that is currently being distributed via the CentOS repository.

I was able to spin up a new CentOS 6.0 x86 server which was running Perl 5.10.1 and didn’t experience this problem.

The installation was pretty straight forward (except for the issue above) but the API reference manual does a very thorough job of detailing all the possible installation methods on both Windows and Unix/Linux. I just opened a browser to one of the Infoblox appliances and downloaded the Perl modules.

https://10.1.1.1/api/dist/CPAN/authors/id/INFOBLOX/

Just replace the IP address of 10.1.1. with the IP address of your Infoblox appliance. I’m not sure why Infoblox hides their manuals behind their support portal, I just don’t understand why companies do that.  You can find the manual right here, Infoblox_API_Documentation_6.1.0.pdf.

Cheers!

CentOS Linux – error updating rpm

1

I came across an interesting problem recently with the CentOS Linux server I use to host this blog. I encountered a problem when upgrading from CentOS 5.4 to 5.5. I had performed this upgrade on a fair number of physical servers without issue but this was the first time I was upgrading a XEN based VPS running CentOS.

Every package upgraded without an issue expect for rpm itself which error-ed out as detailed below;

[root@michaelfmcnamara sysconfig]# yum update rpm
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: yum.singlehop.com
* base: yum.singlehop.com
* extras: mirror.raystedman.net
* updates: mirror.skiplink.com
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package rpm.i386 0:4.4.2.3-18.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================
Package                 Arch                     Version                              Repository                Size
======================================================================================================================
Updating:
rpm                     i386                     4.4.2.3-18.el5                       base                     1.2 M

Transaction Summary
======================================================================================================================
Install       0 Package(s)
Upgrade       1 Package(s)

Total download size: 1.2 M
Is this ok [y/N]: y
Downloading Packages:
rpm-4.4.2.3-18.el5.i386.rpm                                                                    | 1.2 MB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating       :rpm                                                                    1/2
Error unpacking rpm package rpm-4.4.2.3-18.el5.i386
error: unpacking of archive failed on file /etc/cron.daily/rpm: cpio: rename

Failed:
rpm.i386 0:4.4.2.3-18.el5

Complete!

So what was wrong with /etc/cron.daily/rpm that the package was failing to install.

Wouldn’t you know that the immutable attribute had been set on the file?

[root@michaelfmcnamara ~]# lsattr /etc/cron.daily/rpm
----i-------- /etc/cron.daily/rpm

Let’s remove that attribute;

root@michaelfmcnamara ~]# chattr -i /etc/cron.daily/rpm

With that fixed let’s try running that update again;

[root@michaelfmcnamara cron.daily]# yum update rpm
Loaded plugins: fastestmirror
Determining fastest mirrors
* addons: yum.singlehop.com
* base: yum.singlehop.com
* extras: mirror.raystedman.net
* updates: mirrors.netdna.com
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package rpm.i386 0:4.4.2.3-18.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================
Package                 Arch                     Version                              Repository                Size
======================================================================================================================
Updating:
rpm                     i386                     4.4.2.3-18.el5                       base                     1.2 M

Transaction Summary
======================================================================================================================
Install       0 Package(s)
Upgrade       1 Package(s)

Total download size: 1.2 M
Is this ok [y/N]: y
Downloading Packages:
rpm-4.4.2.3-18.el5.i386.rpm                                                                    | 1.2 MB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating       : rpm                                                                                            1/2
Cleanup        : rpm                                                                                            2/2

Updated:
rpm.i386 0:4.4.2.3-18.el5

Complete!

Success!

CentOS v5.2 is available!

2

centos_logo The folks over at CentOS released v5.2 on Tuesday June 24, 2008. I’ve been running six different HP Proliant DL360s over the past 24 months acting as a public WiFi Hotspot portal servers. The solution has been met all my expectations and almost manages itself entirely (I still need to apply patches and security updates).  CentOS 5.2 adds the same functionality that RHEL 5.2 adds including the latest virtualization support. If you’re looking for a Linux distribution for that brand new server hardware and you don’t have the budget to afford RedHat then CentOS is for you. CentOS is essentially a clone of RedHat Enterprise Linux compiled from the RHEL source files provided under GPL licensing terms. If you’re looking for a Linux distribution to run on that brand new laptop/desktop then I don’t think CentOS if for you. I would probably suggest Ubuntu as a solution for any laptop/desktop.

Just visit the current Mirrors list to start downloading today.

Note: Just be warned that if your running CentOS v5.0 or v5.1 you will be upgraded to CentOS v5.2 if you issue a “yum update“. I believe the release notes indicate you need to issue a “yum upgrade” in order to upgrade but that wasn’t my experience.

Cheers!

Go to Top