I recently ran into a problem with NSS-MySQL – or rather I ran into a number of problems with NSS-MySQL.

  • The first was that there are two libraries with almost identical names (libnss-mysql and nss-mysql) hosted in two different locations (sourceforge.net and savannah.gnu.org respectively) which do exactly the same thing (lookup users from a MySQL database).
  • The second was that all our legacy servers that use this method of authentication had been installed from source, however the key text that told me which version to use (sourceforge or gnu) had been removed from the build documents so I didn’t know which one I was meant to be installing.
  • The third issue (and this isn’t the final issue unfortunately) was that when I realised that the version we were using was the gnu.org one, I also discovered that the only one for which maintained packages were available was the sourceforce.net version.
  • The fourth (and last for the time being) was that the configuration file formats were completely different

At this point, it wasn’t looking too good…

Working closely with a Colleague, we also identified that although the users in the MySQL database were completely different to those found in /etc/passwd, many of the uids and gids matched entries in both.  This was because although all the account names for users start at 2001 as far as the system is concerned, the database userId field starts at 1.  I love legacy systems…

After three days trying to solve this, we were starting to wonder if it would be any quicker to redesign the database and just reassign the permissions across the 25TB of data that we hold for various accounts, then, we hit the solution.

libnss-mysql (the package available from EPEL and the version that is hosted on SourceForge) has to be the version of choice going forwards as we must be able to deploy this server without any human intervention in order for the build systems based upon cucumber-vhosts/hudson that I’ve discussed elsewhere on this blog to work correctly.  This is how we fixed the queries…

(more…)

Table of contents for Cucumber Vhost

  1. Announcing “Cucumber-VHost” – Cucumber, Cobbler and Virtual Hosting all in one package
  2. cucumber-vhost goes for release 0.1!

I’ve noticed that some people have shown an interest in my cucumber-vhost project.

I’ve just made a few commits that now mean you have steps to tear down virtual servers as well as create them and, as a result, I’m calling this version 0.1 and releasing it for general usage.

There are still a few caveats – I’ve not tested it with any backend systems for libvirt other than kvm/qemu and I’ve not written the steps to confirm a server is up/responding to a give port – but it works and I have it successfully building and destroying VMs under Hudson using the rake plugin.

Please file all bugs on the github bug tracker so I can try and fix them.

(Special thanks go to clalance in #virt on irc.oftc.net for help with sorting out the storage stuff!)

Just a quick post – if you want to get Cucumber-Nagios up and running under Centos 5.4 make sure you’ve got the libxml2-devel and libxslt-devel packages installed otherwise when you run “gem install cucumber-nagios” it doesn’t work! :)

I’m heading towards being able to create a Continuous Integration system for setting up and testing my config files.

This post consists of a few notes I’ve observed as I’ve been configuring KVM, Cobbler, Koan and Puppet in order to achieve this.

(more…)

Switch to our mobile site