doc/upgrade/AuthenticationServerUpgrade

Wifidog Authentication Server Upgrade

Basically, the recommended process to upgrade the authentication server of a production server in a secure manner is:

  1. Read the Changelog (seriously);
  2. Use sql/backup_database.sh before the upgrade;
  3. Testing (optional, but recommended);
    1. Checkout latest SVN on a development machine (not the same one as your server, unless you really know what you are doing: you need to modify config.php to point to a different DB, and you can't use the restore script directly;
    2. Restore your live database on the development machine. Check if everything seems in order (good tests are loging-in, viewing your most complicated portal and opening the Reusable content library). For a more complete test (especially if you didn't upgrade in months), plug a gateway to your development server and login, and try creating a new account;
  4. Run svn update on your live server;
  5. Go to your auth server home page to make sure the schema has been updated (it may already have been by a random user accessing the auth server);
  6. If the Changelog mentioned dependency changes (or if unsure), start the install script till the dependencies page.

Tested stable revision packs

Although everytime wifidog should be reverse compatible when it is upgraded, sometimes it is inevitable that an update breaks something. When the user installs the newest wifidog version, he's taking a risk. The updated version might be broken because of work in progress, or new untested functionalities or modifications. (Happened to me)

This section is for posting known and tested & working revision packs. Although newer packs may work while not being listed here, this is for people looking for a tested & working version because they don't want to go in the hassle of debugging their new version. The tester (or the person that upgraded to it successfully) should identify himself for backtracking purposes.

To know your current revision number, use that command: svn info. You need to be inside wifidog's folder.

Revision number: 1226 (Thu, 17 May 2007 at 16:25:43) - Tested by Wadz (wmaalouf -@at- fqccl d0t org)
Details: Well, I upgraded from version 1154 (Tue, 12 Dec 2006) to this version without problems. Just before, I tried to upgrade to the highest version (1250) but it crashed and I spent a couple of hours restoring and re-installing until I find a working version. The new database schema upgrade always failed, even when I installed from the scratch. So I finally got to version 1226, and it installed okay. (which is pretty new at the time we talk).
Tested on PHP 5.2.0-8 and PostgreSQL 7.4.17 on my Debian etch server.
--> To install from scratch: svn -r 1226 checkout https://dev.wifidog.org/svn/trunk/wifidog-auth
--> To upgrade to: svn update -r 1226

Feel free to contribute to this list with your own upgrade story. Tell us your old version, the new version you upgraded to, and how it went.

Important note (benoitg 2007-07-21)

While I definitely salute the effort above, I must point out the following

  • Schema updates to installed servers Every developer that commits a schema update by definition "tested" the update (and any who doesn't is immediately and violently chastised. So saying that a revision is "tested" is totally useless unless you include the php version (php --version) and more importantly the postgresql version (pgsql --version, can vary by distribution)
  • Schema install from scratch Those aren't tested quite as often by developers. Furthermore, the code paths to update and to install from scratch are totally different. Make sure you point out if you UPGRADED to revision X, or installed using revision X.
    • If you submit a bug report about a failed NEW install, please do the following:
      cd YOUR_WIFIDOG_AUTH_CHECKOUT/sql
      sudo su postgres
      dropdb wifidog (Make SURE this is a new install, this will promptly and irremediably destroy an existing install)
      psql -f wifidog-postgres-schema.sql
      --The wifidog developers need the ENTIRE output of that command.
      dropdb wifidog
      
  • Postgresql 7.4: While we try to keep is working, it's definitely not "supported" unless you are willing to work with the developers to fix schema update problems. The supported versions are 8.0 and later (8.0 was released in January of 2005, none of the developers use 7.4 anymore)