Instant Puppet 3 Starter book is now available

By on March 30, 2013 - Geekery, News Tags:


I’ve been so busy this week with things mortal, I didn’t even notice that my book was published on Tuesday!

I wrote Instant Puppet 3 Starter specifically to help new users get up and running at a good pace. I explicitly focused on helping avoid common problems during installation. I walk you through building a custom puppet module. I go well beyond a basic installation to show you how to use some of the most powerful features in Puppet, including a working Hiera setup.

You can purchase the ebook directly from Packt Publishing or you can purchase the trade paperback from Amazon. I’ll be updating the book page with more locations to buy the book as they become available.

There is now a Homepage for the Puppet 3 Starter book and a FAQ and Errata page to go with it as well.


Segfaults when using postfix with MariaDB or Percona

By on January 15, 2013 - Geekery

I ran into a weird problem where postfix suddenly started segfaulting on me just after upgrading it to the latest version.

Jan 15 03:28:41 geode kernel: smtpd[8569]: segfault at c9 ip 00007fcff5fa8469 sp 00007fffe88163d0 error 4 in libcrypto.so.1.0.0[7fcff5ec8000+174000]

Debugging with strace showed me that the segfault happened just after attempting a MySQL query. Google tells me that people are having the same problem with Percona libraries too, although they didn’t figure out the answer. I’ll save you the story of all the debugging, but it turns out that if you install MariaDB-devel, then you must also install MariaDB-shared or programs that you compile will segfault. It is likely the same answer for Percona.

No, I don’t know why. It’s a bit late for debugging.

$ sudo yum install MariaDB-shared --enablerepo=mariadb
....
Running Transaction
  Installing : MariaDB-shared-5.5.28a-1.x86_64                                                       1/1 
  Verifying  : MariaDB-shared-5.5.28a-1.x86_64                                                       1/1 

Installed:
  MariaDB-shared.x86_64 0:5.5.28a-1                                                                                                                 

Complete!

Broken path /usr/lib6464 on CentOS 6

By on January 15, 2013 - Geekery

If you are getting compilation errors from things which include openssl, there is a simple fix. Redhat shipped three broken rpm package includes in openssl-1.0.0. For some reason unclear to me, CentOS hasn’t pushed out this fix. So you have to do it yourself.

Details are here: https://bugzilla.redhat.com/show_bug.cgi?id=593723

The fix is really simple:

$ sudo sed -i -e 's/lib6464/lib64/' /usr/lib64/pkgconfig/libcrypto.pc
$ sudo sed -i -e 's/lib6464/lib64/' /usr/lib64/pkgconfig/libssl.pc
$ sudo sed -i -e 's/lib6464/lib64/' /usr/lib64/pkgconfig/openssl.pc

Howto build Apache 2.4 for CentOS 6 or RHEL6 (patch)

By on January 9, 2013 - Geekery Tags: , , ,

Apache has started including a specfile in their builds, such that you should be able to just invoke rpmbuild against it. If you’ve tried it, you’ve probably bumped into a distcache dependency.

$ rpmbuild -tb httpd-2.4.3.tar.bz2 
error: Failed build dependencies:
	distcache-devel is needed by httpd-2.4.3-1.x86_64

If you google around you’ll notice that there’s no distcache library easily available for EL6 systems. If you solve that problem, you’ll slam into a very weird dependency problem with an undefined/unused Epoch in the specfile.

ERROR with rpm_check_debug vs depsolve:
httpd = %{epoch}:2.4.3-1 is needed by mod_ssl-2.4.3-1.x86_64
httpd = %{epoch}:2.4.3-1 is needed by httpd-devel-2.4.3-1.x86_64

I’ve created a patch for httpd on rhel6 / centos 6 systems. It disables the (totally unnecessary) socache_distcache plugin, and fixes the use of the undefined epoch in the specfile. Apply it like this:

$ tar xjf httpd-2.4.3.tar.bz2 
$ patch -p0 < httpd-2.4.3.rhel6.patch
$ tar cjf httpd-2.4.3.rhel6.tbz2 httpd-2.4.3
$ rpmbuild -tb httpd-2.4.3.rhel6.tbz2