<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FritzSqueezeUpgrade</title><revhistory><revision><revnumber>10</revnumber><date>2011-07-18 02:25:47</date><authorinitials>ClintonEbadi</authorinitials><revremark>upgrade done!</revremark></revision><revision><revnumber>9</revnumber><date>2011-07-13 19:48:55</date><authorinitials>ClintonEbadi</authorinitials><revremark>update upgrade notes on completed tasks</revremark></revision><revision><revnumber>8</revnumber><date>2011-03-05 10:04:02</date><authorinitials>ClintonEbadi</authorinitials><revremark>make sure another login method works for fritz</revremark></revision><revision><revnumber>7</revnumber><date>2011-03-05 09:56:12</date><authorinitials>ClintonEbadi</authorinitials><revremark>no local packages to report!</revremark></revision><revision><revnumber>6</revnumber><date>2011-03-05 09:48:40</date><authorinitials>ClintonEbadi</authorinitials><revremark>upgrade ejabberd before upgrading fritz</revremark></revision><revision><revnumber>5</revnumber><date>2011-03-02 08:48:10</date><authorinitials>ClintonEbadi</authorinitials><revremark>pam stuff</revremark></revision><revision><revnumber>4</revnumber><date>2011-03-02 08:41:12</date><authorinitials>ClintonEbadi</authorinitials><revremark>Fixi the NSS setup on fritz before upgrade</revremark></revision><revision><revnumber>3</revnumber><date>2011-02-28 21:44:32</date><authorinitials>ClintonEbadi</authorinitials><revremark>preventing full /afs/hcoop.net outage during upgrade</revremark></revision><revision><revnumber>2</revnumber><date>2011-02-25 10:30:29</date><authorinitials>ClintonEbadi</authorinitials></revision><revision><revnumber>1</revnumber><date>2011-02-25 10:22:05</date><authorinitials>ClintonEbadi</authorinitials><revremark>very basic notes on fritz lenny -&gt; squeeze upgrade</revremark></revision></revhistory></articleinfo><para>Plans for upgrading Fritz to Debian Squeeze </para><para><emphasis role="strong">Upgrade was completed 2011-07-17</emphasis> </para><section><title>Preliminaries</title><para><ulink url="http://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html">Release Note Information of Upgrading From Lenny</ulink>. </para><section><title>Pre-Install Cleanup Tasks</title><section><title>Sanitize NSS Configuration</title><para><emphasis role="strong">DONE</emphasis> </para><itemizedlist><listitem><para>Synchronize the UIDs of locally created users with their counterparts in AFS </para><itemizedlist><listitem><para>Affected users </para><itemizedlist><listitem><para><code>docelic_admin</code> </para></listitem><listitem><para><code>rkd_admin</code> </para></listitem><listitem><para><code>clinton_admin</code> </para></listitem><listitem><para><code>adamc_admin</code> </para></listitem><listitem><para><code>shadowfax_admin</code> </para></listitem></itemizedlist></listitem><listitem><para>Ensure ssh and console login for <code>root</code> works and keep the password handy in case all <code>_admin</code> accounts are locked out because of the UID changes. </para></listitem></itemizedlist></listitem><listitem><para>Locate and update any files owned by an obsolete UID to the new UID </para></listitem><listitem><para>Setup <code>libnss-afs</code> (<code>afs files</code>) </para></listitem></itemizedlist></section><section><title>Reconfigure PAM</title><para>This may be better to do after the installation. </para><para>Configure <code>sshd</code> and <code>login</code> to use <code>pam_localuser</code> instead of <code>pam_unix</code> to ensure only local users can login ignoring the NSS configuration (right now non-local users can't login using just <code>pam_unix</code>, but this is an accident of the implementation of <code>libnss-afs</code> and not something that should be relied upon). </para></section></section><section><title>Pre-Install Software Upgrades</title><section><title>Jabber</title><para>The same version of <code>ejabberd</code> must be used across a cluster, and the easiest way to migrate the installation to another machine is to do it with a running cluster. Luckily, <code>deleuze</code> is running the version from <code>etch-backports</code> which is the same version in <code>lenny</code>. </para><section><title>DONE</title><orderedlist numeration="arabic"><listitem><para>Install <code>ejabberd</code> from <code>lenny</code> on <code>fritz</code> </para></listitem><listitem><para>Add firewall rules to permit connects to/from <code>deleuze</code> on port 4369<code> (check </code>deleuze` as well) </para></listitem><listitem><para>Add <code>fritz</code> to the mnesia cluster </para></listitem><listitem><para>Add XMPP SRV records to provide both <code>deleuze</code> and <code>fritz</code> </para></listitem><listitem><para>Ensure everything works ~24 hours </para></listitem><listitem><para>Remove XMPP SRV records pointing to <code>deleuze</code> </para></listitem><listitem><para>Ensure everything continues to work for ~72 hours (DNS propagation &amp;c) </para></listitem><listitem><para>Disable <code>ejabberd</code> on <code>deleuze</code> </para></listitem></orderedlist><para>After upgrading <code>fritz</code> to <code>squeeze</code> the <ulink url="http://www.process-one.net/docs/ejabberd/guide_en.html#htoc18">ejabberd guide</ulink> says it will automatically handle updating the <code>mnesia</code> tables. Once this is all done it may be a good idea to add <code>hopper</code> to the <code>ejabberd</code> cluster for a bit of fault tolerance. </para></section></section></section></section><section><title>Installation environment</title><para><emphasis role="strong">On All Machines</emphasis> </para><orderedlist numeration="arabic"><listitem><para><code>su</code> to root, start a <code>screen</code> session (preventing partial upgrade issues if the network connection drops) </para></listitem><listitem><para>Open a physical console root login just in case </para></listitem></orderedlist><para>After the upgrade remember to log out of the kvm root console on the other machines. </para></section><section><title>Installation Steps</title><section><title>Early Preparations</title><itemizedlist><listitem><para><code>dpkg --audit</code> </para></listitem><listitem><para>Remove <code>lenny</code> and <code>lenny-backports</code> from <code>sources.list</code> </para></listitem><listitem><para><code>apt-get update</code> </para></listitem><listitem><para>Run <code>apt-get upgrade</code> and ensure no essential packages conflict (e.g. <code>postgresql-8.1</code>) </para></listitem></itemizedlist></section><section><title>Backup Important Data</title><itemizedlist><listitem><para><code>ejabberd</code> mnesia database </para></listitem><listitem><para>Debian stuff (package lists, ..., ?) </para></listitem></itemizedlist></section><section><title>Upgrade Kernel and udev</title><orderedlist numeration="arabic"><listitem><para>Install new kernel image and <code>openafs-module-dkms</code> </para></listitem><listitem><para>Install <code>udev</code> </para></listitem><listitem><para>Reboot </para></listitem></orderedlist></section><section><title>Basic Upgrade</title><orderedlist numeration="arabic"><listitem><para><code>apt-get upgrade</code> </para></listitem><listitem><para>Reboot? </para></listitem></orderedlist></section><section><title>Full Upgrade</title><orderedlist numeration="arabic"><listitem><para><code>apt-get dist-upgrade</code> </para></listitem><listitem><para>Reboot? </para></listitem></orderedlist></section><section><title>Clean Up</title><orderedlist numeration="arabic"><listitem><para>Make sure the other machines are still sane after losing volume access for a while. </para></listitem></orderedlist></section></section><section><title>Caveats</title><section><title>pam_unix_session locking all login access</title><para><emphasis role="strong">Not an issue</emphasis> </para><para>This bit us on hopper. <ulink url="https://wiki.hcoop.net/FritzSqueezeUpgrade/ClintonEbadi#">ClintonEbadi</ulink> has confirmed this is not in use--it appears <code>hopper</code>'s PAM configuration was copied from another machine that had been running <code>etch</code> earlier and used deprecated modules. </para></section><section><title>Locally built packages</title><para><emphasis role="strong">Not an issue</emphasis> </para><para><ulink url="https://wiki.hcoop.net/FritzSqueezeUpgrade/ClintonEbadi#">ClintonEbadi</ulink> scanned the currently installed packages and we are using the backports versions of afs and kerberos with nothing else locally built. </para></section></section><section><title>Service Interruption Mitigation</title><section><title>Read Only Volumes on Deleuze</title><para><emphasis>Not Doing This</emphasis> (the time required is not worth a few minutes of afs downtime at this point) </para><para>Since we have openafs we may as well take advantage of it by adding deleuze's <code>vicepa</code> as a site for <code>user.$USER</code> volumes. There does not appear to be enough room for <code>mail.$USER</code> volumes so we won't worry about those (mail will still be queued and having a read only copy of mail volumes is of dubious value). </para><section><title>Preparation</title><para>A few days before the upgrade: </para><itemizedlist><listitem><para>Prevent backup from running (uncomment <code>exit 0</code> in <code>hcoop-backup-wrapper</code>) before scheduled upgrade date </para></listitem><listitem><para>Purge last backup data </para></listitem><listitem><para>Purge <code>db.$USER</code> volumes </para></listitem><listitem><para>Purge <code>{user,mail}.$USER.d</code> volumes for members who departed more than (tentatively) 90 ago </para></listitem><listitem><para>For all active <code>user.$USER</code> volumes: <code>vos addsite deleuze vicepa user.$USER</code> </para></listitem></itemizedlist><para>Immediately before upgrading: </para><itemizedlist><listitem><para>For all active <code>user.$USER</code> volumes: <code>vos release user.$USER</code> </para></listitem></itemizedlist></section><section><title>Clean Up</title><para>For all user volumes <code>vos remsite deleuze vicepa user.$USER</code> to free space for the backup. Alternatively, since the backup will be moved to fritz anyway, leave them in place. There seems to be little benefit to doing so since deleuze does not have much space compared to fritz and we have nothing in place to regularly <code>vos release</code> volumes making them effectively useless. </para></section></section></section></article>