FOSS

Blogs about Free and Open Source Software

aptitude bug in specific version handling

Aptitude has an annoying bug, which will probably never be fixed upstream :( - but aptitude is the only tool that supports downgrading of package versions (with correct --force options) none-interactively (as done by f.ex. puppet).

If you want to install a package in a specific version (f.ex. for releasing site code in a specific version) - like this:

expect: send many commands to routers and such

A neat script I pieced together - to send many commands (f.ex. deletion of objects etc.) to a box (using ssh) - input from a file (remember to atleast use a proper random name for the file etc. :)

Grave PHP bug segfaults drupal sites

I just hit a grave bug, while performance testing a customers drupal site - the apache segfaulted each and every time, after a few 100 requests at the most. The setup had long been plagued by random segmentation faults / complaints about canary problems from suhosin, which wasn't reproducible (or we hadn't spent the time to try), but this time it died consistently.

New linuxpusher.com site

Ever since I redid Linuxpusher.dk (as it were - not it's .com) in oscommerce, I've sorely missed some CMS functionality and I only switched because the shop part of the CMS systems I had found were sorely lacking in this, primary part.

I finally found a system that, while not perfect, was good enough to be a considerable improvement to the functionality of the linuxpusher.com site, and also I finally found the time to do it.

Among the new features are:

EU VAT and Drupal+Ubercart 2

I finally got some time to start working on a new homepage for linuxpusher.com and choose to use Drupal and Ubercart (among two shop-modules for drupal) for this job.

I need to be able to sell items without VAT to none-EU citizens, and the builtin taxes support didn't handle this, and the uc_vat module that improves upon the built-in support, didn't do the job either.

I have just fixed the code, with some tips from the author of uc_vat (longwave) so we were sure as how it should be done, so I hope he'll accept my code as an improvement for uc_vat.

extlookup - a puppet extension you can't live without

I've been using puppet for a while now, and have had to, grudgingly, add an if $hostname == "somehostname" several places in modules and in my general templates.pp.

Until now I could find no other option to properly control things, without having to have a subclass for each special case - which is too much in some situations.

I was recently informed about extlookup (from Volcane (ircname) - the author) - a one-stop solution to removing all those annoying dependencies on specific hostnames.

http://nephilim.ml.org/~rip/puppet/extlookup.rb

do you use sh or bash for scripts?

I've often heard people say that you should use #!/bin/sh in your shell scripts to ensure they run everywhere.

I always use /bin/bash - because I like the bash-specific features and wouldn't like to live without, and I don't have a list in hand that shows me which "features" I can't use if using /bin/sh - so I can't be sure my script actually works on generic /bin/sh - without testing.

Why I enjoy puppet

Having to configure 17 servers that have to be absolute alike and other such details, made me setup puppet to do the job. I've used cfengine before, so I was looking forward to using puppet for a larger project and see if it made me as happy as I'd hoped (compared to using cfengine which can be a bit tedious :)

The general goal is that everything is setup up by puppet, so that the restore plan is as simple as possible:

Nagios: checking for .lock files age

I wanted to check for age of certain .lock files from scripts, so I can catch if a certain script has been running for too long (or has died without removing the .lock file). In this instance it was a script that runs drupal cronjobs and to be sure that it doesn't run multiple times, the script throws a lock file while it is running.

It turns out that check_file_age in standard nagios-plugins worked beautifully, except for one little annoying detail - it returns CRITICAL if the file does not exist :(

san multipath on Ubuntu 8.04 - just don't

I have been working with a client on setting up multipath for some Linux database hosts, with a NetApp FC Backend. They wanted to use Ubuntu 8.04 and after mucking a bit with the official config from NetApp (had to change path_checker to directio as readsector0 does not work on Ubuntu, and disable priority check as this doesn't work either :( )

Ubuntu then saw the 4 paths, but as we soon discovered, it returned IO errors if just 1 path failed, which made the kernel remount read-only :(