Why the open source mindset can be crazy-making for IT professionals

This is the environment many IT managers are stuck working in. No wonder many sites run out-of-date software. The updates break too much.
Written by David Gewirtz, Senior Contributing Editor

All projects: DIY-IT Project Guide
This project: Migrating a massive legacy CMS system to WordPress

Okay, I'm just going to come out and say it. Microsoft would never pull this crap. There it is, the opening gambit for yet another rant about software built without professional product management.

See also: Why I've finally had it with my Linux server and I'm moving back to Windows

This time, the subject of my wrath isn't Linux, it's Apache. I like Apache. Well, I like Apache the way you like that particularly hot girlfriend who -- most of the time -- is completely normal. But once in a while, she goes completely and totally off the reservation, channeling a form of crazy you normally only see in movies.

I've had a very long relationship with Apache. I've run it on a wide variety of systems going back to 1996 or so. I know it's idiosyncratic, I know it's sometimes unnecessarily complex, but I also know it'll get the job done. Mostly, anyway.

It doesn't particularly like Windows as much as it likes Linux, so if you're going to run a production server with Apache, you probably want it to be on Linux. At various times over the years, Apache's own documentation has stated that it's somewhat less supported and somewhat less reliable on Windows.

That's why, even though I've reached thermonuclear levels of frustration with Linux over the years, I'm still running my production servers on Linux. To keep me marginally sane, I'm running Linux in a VM, and that VM is running on Windows Server 2008 R2. I know, you Linux kids think that's horrible, but being able to RDP into a real server environment, with a real GUI -- and not have to fight terrible documentation and inconsistent configurations for every single feature -- is a godsend.

Anyway, let's get back to today's Apache experience.

I develop on my Windows 7 laptop and upload my code to the server. To test my code locally, I run the XAMPP WAMP stack. It's run quite well for a few years now.

I'm porting a major CMS, and that requires rewriting almost a hundred thousand URLs on the fly. To do this, I've used the Apache mod_rewrite module with something called a RewriteMap. This allows me to run a Perl script that reads the incoming URL, does a database lookup, and redirects to the destination URL. The code for all this was developed and tested on my local XAMPP stack, before I uploaded it to the live server.

Last month, I bought a much faster laptop. It rocks. But I had to reinstall all my software on it, including XAMPP. Now, unbeknownst to me, XAMPP transitioned from version 1.7x to 1.8. The key difference is that 1.8 is using Apache 2.4 rather than 2.2 -- I know, lots of numbers, but stay with me for a moment.

I probably could have checked the versions, but Apache is Apache is Apache, right? Wrong!

Apparently, when Apache transitioned from 2.2 to 2.4, they changed how the Rewrite system works. They used to use a directive called RewriteLock with prn: rewrite code. Now, they use something completely different, a "mutex" system.

I know this all seems arcane, but here's the gist of it: the new version completely breaks the old version.

Yes, I just got "lock-blocked" by an Apache upgrade.

Mod_rewrite itself is relatively poorly documented, with a few good web sites and a lot of folklore. The programmable RewriteMap sub-feature has even less documentation. But all that documentation talks about the necessity of using RewriteLock. None of the documentation even knows of this "mutex" thing.

But today, when I installed the new XAMPP on my laptop and tried to start Apache with my old configuration files, it wouldn't start. Digging in resulted in my finding an error saying it didn't know anything about this "RewriteLock" thing.

An hour or so of Web searching found out that RewriteLock had been deprecated in favor of this mutex thingamajig. Did the error message for RewriteLock bother to say that? Of course not. Google is your friend, right?

It gets worse. Here's what the Apache site now says about using RewriteMap: This feature utilizes the rewrite-map mutex, which is required for reliable communication with the program. The mutex mechanism and lock file can be configured with the Mutex directive.

Fine. Here's the what the Upgrading to 2.4 from 2.2 document says: Directives AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex, and WatchdogMutexPath have been replaced with a single Mutex directive. You will need to evaluate any use of these removed directives in your 2.2 configuration to determine if they can just be deleted or will need to be replaced using Mutex.

That's it. "You will need to evaluate any use of these removed directives." Thanks a heck of a lot.

Do you think there might be some documentation that says, "Well, if you're using this old directive, code it this way"? No. Of course not. That's the open source mindset. Just figure it out.

Do you think there might be some transition feature, so the upgrade won't completely toast your server? No, of course not. That's the open source mindset. If you can't make it work, you shouldn't be using it.

This is what I've got against the open source mindset. In a commercial environment, each deprecated feature would have been considered, and each would have a clear upgrade path. In most cases, each deprecated feature would even be emulated with the newer technology, so the system wouldn't just stop working.

But with the open source mindset, there's no product management. If there's a better technology or a cooler way to implement something, they just do it. Even if that means killing a bunch of installations, that doesn't matter. Even if that means inconveniencing users or leaving them without direction, so what? After all, if you really want to know how it works, the source code is available. Go read it.

It's crazy. But this is the environment many IT managers are stuck working in. No wonder many sites run out-of-date software. The updates break too much.

Me, I'm going to download an older version of XAMPP and install it. For my development laptop it doesn't really matter. But I've just been served notice that I can't upgrade my production servers to Apache 2.4 without somehow figuring out how to make my very complex rewrite system work in an entirely new -- and almost completely undocumented -- way.

And people wonder why I'm cranky. Hours wasted just trying to stay even with what once worked.

P.S. The reason I'm not running IIS (I tried) is that WordPress and PHP don't run quite as well on it. Really, if you're running a supported, solid WordPress installation, you need LAMP. But that doesn't mean I have to be happy about it. Grrr.

See also: Mea culpa: coming clean about my n00b Linux mistakes

Editorial standards