Archive for January, 2008

Quick solve package dependency with rpm –aid

Tuesday, January 22nd, 2008

This is relevant for Redhat EL 3 and 4, and any other compatible system not using “yum”. RHEL5 uses “yum”, and its RPM system does not include the “–aid” flag, which we require so much.

1. Place all the available RPMS (I assume these are the installation medias, combined) in a single directory – for example: /mnt

2. Install manually the “rpmdb” package

3. Edit /etc/rpm/macros.solve and change two lines:

%_solve_pkgsdir /mnt

%_solve_name_fmt /mnt/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

-Notice: I have used /mnt. Replace it your preferred directory

Following these steps, any encounter with RedHat’s infamous “dependency hell” can be solved by using the flag “–aid” for the RPM command

New version of Cacti, and using spine

Monday, January 21st, 2008

A while ago, a newer version of Cacti became available through Dag’s RPM repository. An upgrade went without any special events, and was nothing to write home about.

A failure in one of my customer’s Cacti system lead me to test the system using “spine” – the “cactid” new generation.

I felt as if it acts faster and better, but had no measurable results (as the broken Cacti system did not work at all). I have decided to propagate the change to a local system I have, which is running Cacti locally. This is a virtual machine, dedicated only to this task.

Almost a day later I can see the results. Not only the measurements are continuous, but the load on the system dropped, and the load on the VM server dropped in accordance. Check the graphs below!

MySQL CPU load reduces at around midnight
as well as the amount of MySQL locks
and innoDB I/O
A small increase in the amount of table locks
A graph which didn’t function starts working
System load average reduces dramatically
Also comparing to a longer period of time
And the virtual host (the carrier), which runs several other guests in addition to this one, without any other change, shows a great improvement in CPU consumption

These measures talk for themselves. From now on (unless it’s realy vital), spine is my perfered engine.

“Pinning” a package using “YUM”

Sunday, January 6th, 2008

YUM is a nice (and useful, when used correctly) tool to manage packages, using RPM as its engine. APT, the Debian alternative, has this ability, and so does YUM.

YUM does not pin a specific version of a package, but rather avoids upgrading it as soon as it was marked. It remains installed, but never will it be upgraded, even if other packages require a specific, newer, version of this package.

This “upgrade prevention” can be done using the directive “exclude=” inside /etc/yum.conf, where the values are the names of the packages (wildcards can be used!), space limited.

And a big “thank you” to Omer, who have pointed out my mistake. Too much NIS lately…

mime_decode-1 FAILED: Can’t locate object method “seek” via package “File::Temp ” at /usr/lib/perl5/vendor_perl/5.8.5/MIME/ line 816

Sunday, January 6th, 2008

This is the error message I have seen in my Linux+Postfix+Amavisd-new system. Not only that, but Amavis has kept a copy of each message in its tmp directory, which reduced my /var size to nothing quite rapidly.

amavis[21189]: (21189-01) (!)PRESERVING EVIDENCE in /var/amavis/tmp/amavis-200

Doesn’t sound too good.

Partial search in google has produced the following mailing list compressed archive, which pointed me onwards. It could either be a problem with Amavis, or with Perl.

After some further investigation, it appears that RpmForge has released a non-compatible version of perl-MIME-tools – from 5.420 to 5.425-1-test. It was quite disappointing, but I had to downgrade the perl package to its origin (the latest which worked), and to force yum never to upgrade that specific package.

This one will be on a different post (for the sake of order and search ability).