In Praise of Preupgrade

Posted on July 29, 2009. Filed under: Geek Out |

Where I work, we’re pretty fortunate to have a fairly open outlook on our software stack and personal platforms. This means we run open source software on our servers, and thus also on most of our backend development machines (although there is choice available). However, since we’re a geographically diverse company, support for the physical OS installs has in the past been ad-hoc. For example, when I joined the technical team in the UK two years ago, I was given a machine running Fedora Core 3, a Linux distribution that had been unsupported for 2 years.

Not only did this mean that there were known security holes (most worringly in ssh), but the growing and evolving jungle of OS software was out of my automatically updated grasp. For example the popular multi-protocal IM client gaim made its long-running naming battle with AOL public around this time  and was renamed pidgin. This release brought with it a large number of updates that had been held back until the dispute was resolved (although they were available in beta), including more stable operation with Yahoo’s own IM network (which we were using at the time).

So, being the paranoid type of person that I am, and wanting to ensure better compatibility with Office documents and Windows IM clients, I worked some spare hours around Christmas to update all the Linux desktop boxes in the office to the latest Fedora release – which was 8. This was a tedious process, because the release I was starting from in each case was so old. I took a full full backup of the relevant data directories on each machine, including a dump of all the installed RPMs and wiped the disc down. And that was just the beginning.

Then onto did a clean install of Fedora 8, re-importing all the backed up data, checking that the new versions of all the old RPMs were installed, and then had to do some custom package installs. And ensure mails were re-imported properly. Over and over again. This was compounded by the fact that I didn’t have a CD writer, nor enough space on a network share to create a local install host. Instead, I had to go with the media-less network boot solution, writing a new grub line each time.

Fedora operates a steady update policy, providing security updates for the current release and the previous release. So clearly, I had until Fedora 10 came out to figure out a better method of getting the machines upgraded. Because the machines were still in cycle (ie upgrades from Fedora 8->10 were expected), I was confident I would at least have some options when doing this. I ended up using a Fedora-specific tool I had never heard of before:  preupgrade.

The major problem I have with the upgrades is making sure I don’t interrupt the work flow of my fellow developers, and since some come into work before me and others after me, this is a bit tricky. Preupgrade is ideal in this regard.

The package itself (which you can install through the simplicity of yum) is a bunch of script wrappers around Fedora’s Anaconda installer, and because of this allows the update process to start while you’re still working. Fire it up, it will analyse all the RPMs on your system, determine what you need to have installed to perform the upgrade you choose (for example, Fedora 10), and then download the appropriate RPMs. You can stop it mid flow if you like, and when you restart it will carry on from where it left off. Once the downloads are done, it’ll let you know that on the next reboot it’ll do the reinstall. It’s obviously worked well, as the project has continued to update the software in recent releases.

I am a big fan of it, but I have hit some problems when upgrading. I had a hell of a time with SELinux going from  8 to 10, and had to play around with levels and permissions and we hit some problems with mail (Evolution) compatibility as well. My most recent experience (10 -> 11 and 9->11) has shown up some problems with Firefox as well (although again this might be partially due to the 3->3.5 update. The only other problem with it is if you update out of cycle, you only get the packages that were deployed at release. So, if you preupgrade 6 months into a release, you’ll then have to yum update after the install, and wait around for everything to update – keeping track of any errors that might not have been picked up by the community with steady updating. This slightly reduces the usefulness of the time saving.

So, not perfect then, but a damn site better than other regular-release distributions that I have tried in terms of upgrading. If you have need of it, I strongly recommend giving it a whirl on a test system.

As an afterthough, I do wonder whether it might be a good idea to do a clean install/upgrade every few releases to try and clean up incompatibilities, but am only going from a gut feeling. Does anyone have any opinions on this?


Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

  • What is this?

    Unfocused scattershot: music, rugby, code and the mythical purple
  • Previously on Imaginary Colour…

    July 2009
    S M T W T F S
    « Apr   Aug »
  • Flickr Photos

  • What's in my bookmarks?

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: