The Pain and Fury of vmware-cli on CentOS 7, Part 3

So a bit of followup since my last post; I’ve begun reinstalling icinga and my other plugins and have already ran into some resistance- perl-net-SNMP is required by morgnagplug, and has a dependency on perl-Socket6, which conflicts with the vmware-cli rpm.

The Plan

I’m going to do the following:

snapshot my current “production-run” version of the server

jump back to my “package-created” snapshot

add modules listed below to the exclude list

rebuild the RPM

save newest RPM locally

revert to the raw snapshot

upload the newest version of the RPM

install it

test vmware-cmd

If I get an error, install corresponding RPM, then repeat until it runs properly.

If this doesn’t work, revert back to the package-created snapshot

exclude all EXCEPT the troublesome module

rebuild RPM and repeat test.

In addition to Socket6, I will attempt to replace at the same time:

Class::MethodMaker with perl-Class-MethodMaker

Compress::Raw::Bzip2 with perl-Compress-Raw-Bzip2

Devel::CheckLib with perl-Devel-CheckLib

Encode::Locale with perl-Encode-Locale

Env with perl-Env

IO::HTML with perl-IO-HTML

Import::Into with perl-Import-Into

IO::Socket::INET6 with perl-IO-Socket-INET6.noarch

Locale::Maketext::Simple with perl-Locale-Maketext-Simple and perl-Locale-Maketext

Mozilla::CA with perl-Mozilla-CA

Net::SSLeay with perl-Net-SSLeay

Perl::OSType with perl-Perl-OSType

Params::Check with perl-Params-Check

Path::CLass with perl-Path-Class

Socket6 with perl-Socket6

Sub::Uplevel with perl-Sub-Uplevel

Task::Weaken with perl-Task-Weaken

Test::Warn with perl-Test-Warn

autodie with perl-autodie

version with perl-version

Once I’ve reached a stable point where I can install the newest RPM and it’s dependencies:

I’ll rebuild the module with the proper excludes and add the new dependence

copy it locally

revert to my “production-run” snapshot

uninstall the old RPM

install the new RPM

verify the new dependencies install

verify vmware-cmd works as well as check_vmware_esx.pl

It’s also worth nothing that I’ll be updating FPM to use –iteration 2 since this is such a big departure from the last one.

That sloppy regex got rid of /opt/vmwarecli/lib/vmware-vcli/apps/general/viversion.pl, which I did NOT want.

Inserting a slash into that wildcart to change it to -x “**/version**” seemed to do the trick, but it made me curious what else I’d missed. I decided to remove ALL of the excludes and package it as iteration 0, then compare it to my new iteration 2 (with **/version**):

The first thing I noticed was that while I excluded Locale/Maketext/Simple, it did not remove the Local/Maketext directory, leaving it empty. I dislike including empty directories, but it’s relatively minor. Perhaps I’ll explicitly remove them in a future iteration.

By some miracle, it works! This means that all of the packages we’ve excluded are not actually needed (at least for vmware-cmd). Our final test is to bounce back to our “production run” snapshot and swap out the iteration1 RPM for iteration2.

Whoops. Remember that vmlinker.sh script we made? It didn’t clean up after itself on uninstall. Yes, that’s sloppy on my part; I should include a pre-uninstall script to remove those symlinks. It turns out the links were broken anyways (damnit). If I have to repackage this RPM, I’ll include the uninstaller and fix the symlinks. For now, at least the package is installed. (I’ve also changed the example in the last article to function properly.)

The important thing is vmware-cmd is functional, as is check_vmware_esx.pl. Now to get all of my other checks functional.

One thing I am bothered by though. Despite not requiring that third round of dependencies, I still have a bunch from the first and second rounds: