Distribution upgrades

From Wikitech
Jump to: navigation, search

This page provides some advice and guidelines on how to upgrade distributions on servers.

First of all, decide whether you want to do a dist-upgrade or rather a reinstallation. Reinstallation is a better option where feasible, as the result is a more consistent system. Any system that is setup and configured completely automatically (e.g. using Puppet) should generally be reinstalled rather than upgraded.

Please only follow the supported Ubuntu upgrade paths, i.e. only upgrade between adjacent releases, or from one LTS release to the next.

Distribution upgrades should be done using

# do-release-upgrade -p

...after first upgrading all packages before you start.

During the upgrade some questions will come up about configuration files that need to be replaced (or not). In general, we want to stay as close to a fresh, new Ubuntu install as possible. This means that we should use the new configuration files whenever possible. Also, most of the changes that were made should be done in Puppet, so will be redone automatically after the upgrade. This should be examined carefully on a case by case basis.

Things to be aware of

  • do-release-upgrade will disable the Wikimedia APT repository, as it's unknown. This should be put back immediately after the upgrade, with the proper distribution name of course (e.g. "wikimedia-trusty")
  • if, on an internal host, do-release-upgrade stalls for a long time to check for a new release, it's not using the proxy server. Set the environment variable before you run it:
# export http_proxy=http://webproxy.eqiad.wmnet:8080  (replace 'eqiad' with codfw, ulsfo or esams if needed)

Distribution-specific notes

precise -> trusty

  • python-diamond has transitioned to diamond, after the trusty-wikimedia repo has been re-enabled upgrade with:
 apt-get update ; apt-get -y install diamond python-diamond

jessie -> stretch