just wasting bandwidth...

Upgrading Bugzilla

From version 2.22 to 4.2

Published on 07 March 2012


I happen to be responsible for administering and maintaining the Bugzilla instance we use at work. Bugzilla is one of the most widely known and used bug tracking systems, and we use it to track bugs and feature requests for all the software projects in our division.

A few time ago, one of my colleagues came up to me and said: “Hey, why don’t we upgrade Bugzilla to the latest version? I have seen that the version we are using is quite outdated… and the latest one has a lot of new useful features”. Actually by “we” he meant “you” and he didn’t have the faintest idea of what new features were added to the new release. He was only attracted by the new user interface, which looked much nicer and modern than the one we were using.

We’ve been using Bugzilla for several years now and it has become a fundamental tool in our development process. On 2006 I installed Bugzilla 2.22 on an Ubuntu Edgy (6.10) server box and migrated there our previous installation. That was the last time I had to maintain Bugzilla and since then we have happily used it without troubles. It just does what we need and I do believe that fixing things that work is always a bad idea. But for several (and actually weak) reasons, a few days ago I finally decided to upgrade it to the last version available (Bugzilla 4.2 as of today).

The first problem I had to face was the outdated version of the operating system running on our server (Ubuntu 6.10 is very old, its support ended on 2008, and I didn’t mean to upgrade it). To be able to use its built in apt-get tool to install or upgrade software, I first had to update the /etc/apt/sources.list file as described here. Then I went through the Bugzilla release notes to check what prerequisites had changed since 2.22: in my case I had to upgrade MySQL and upgrade or install most of the required perl modules. By the way, upgrading perl modules on such an old linux release was a non-trivial task and it took me a considerable amount of time.

Then I just followed the upgrade guide that is shipped with the product. Here’s what I did in detail:

  • fixed the bugs database using a few SQL updates, just to make the Sanity Check happy
  • shut down the old Bugzilla instance (see the shutdownhtml parameter in the Parameters page)
  • backed up the database; /usr/bin/mysqldump --user xxx --password=xxx bugs | gzip > bugs.gz does the job for MySQL
  • downloaded the Bugzilla 4.2 tarball from the download page
  • extracted the tarball to /var/www and copied here the localconfig file and the data directory from the previous Bugzilla installation (see the upgrade guide for more details)
  • checked if all the required perl modules were correctly installed; Bugzilla comes with a useful perl script that tells you if everything is fine:./ --check-modules
  • updated the Apache configuration to make the virtual host point to the new installation (the AllowOverride option has changed since 2.22, see release notes for more details)
  • enabled the mod_headers and mod_expires Apache modules (mod_env module was already compiled into my Apache installation); the a2enmod command is an easy way to enable an Apache module: sudo a2enmod headers
  • run again to make sure everything was fine

That’s it. After this, our Bugzilla 4.2 instance was running and apparently everything was ok. But -of course- during the first tests a problem came up: confirming the creation of a new bug took a very long time (almost one minute). After further investigation, I found that this was due to the very old version of Sendmail present on our linux box: Bugzilla uses the system’s MTA to send emails to users, and this very old version of Sendmail was really slow in delivering emails. Bugzilla 2.22 had a specific configuration parameter (sendmailnow) which should be turned off when using Sendmail older than 8.12 (like mine), but this parameter has been removed in Bugzilla 4.2. So to solve this problem I’ve replaced Sendmail with Postfix 2.3.3 (which is a Sendmail-compatible MTA and is reasonably fast in sending mails).

In my opinion Bugzilla is a great software: it’s stable, simple to use and essential (quite uncommon features for most software nowadays). But as far as I can say at this time, the most relevant improvement brought by the upgrade was the nicer user interface. The first impression is that version 4.2 does nothing more than version 2.22, at least not for our specific needs. So I’ll stick with my claim: fixing things that work is always a bad idea.

Fabrizio Fantini 07 March 2012

blog comments powered by Disqus