         Upgrading from Sun Grid Engine 5.2 and 5.2.2 to version 5.2.3
         -------------------------------------------------------------

                   Copyright  2001 Sun Microsystems, Inc.
                      Use is subject to license terms

Content
-------

1) Overview
2) Preparing to upgrade
   2.1) Upgrading from 5.2
   2.2) Upgrading from 5.2.2
   2.3) Shutting down Sun Grid Engine
   2.4) Backing up your 5.2.x Grid Engine cluster
3) Installing the new files for 5.2.3
   3.1) Installing a Solaris patch
   3.2) Replacing a 5.2.x Solaris package with 5.2.3 packages
   3.3) Installing a 5.2.3 'tar.gz' distribution  
   3.4) New startup script
   3.5) New template script for rotating 'messages' files
4) Starting Sun Grid Engine 5.2.3
5) Copyright


1) Overview
-----------

   This document describes how to upgrade your compute farm from Sun Grid
   Engine 5.2 (September 2000) and Sun Grid Engine 5.2.2 (January 2001).

   You don't need to read the following directions of you are planning to
   perform a new installation of Sun Grid Engine. If you are performing a
   new installation, please see the following installation application note
   at our support page, at:

      http://supportforum.Sun.COM/gridengine/appnote_install.html

   The following instructions describe how to upgrade your Sun Grid Engine
   compute farm. You can upgrade the cluster through one of the following
   methods:

      - installing a patch (Solaris only and upgrade from 5.2.2 only)
      - installing the 5.2.3 package in pkgadd format (Solaris only)
      - installing the 5.2.3 package in 'tar.gz' format

   All three methods will give you the same results.

   Your existing compute farm configuration will be preserved.


2) Preparing to upgrade
-----------------------

   Please visit our home page at

      http://www.sun.com/gridware 

   to obtain Sun Grid Engine 5.2.3 in one of the three available
   distribution formats.

   Before you install the new version (binaries and other files such as
   documentation, utility files etc.) you need to shutdown your Sun Grid
   Engine compute farm.


   2.1 Upgrading from 5.2
   ----------------------

   If you are upgrading from Sun Grid Engine 5.2, there must be no pending
   and no running jobs in your cluster! You can drain your running cluster
   by disabling all queues:

      # qmod -d '*'

   You can create an access list which contains only the name of one (non)
   existing user and add it to the 'user_lists' of your global cluster
   configuration. So Sun Grid Engine will not accept any new jobs.

   When all running jobs are finished you can shutdown all daemons and then
   you should manually delete all still pending jobs and job scripts from
   the qmaster spool directory:

        # rm -f <qmaster_spool_dir>/jobs/*
        # rm -f <qmaster_spool_dir>/job_scripts/*


   2.2 Upgrading from 5.2.2
   ------------------------

   You can upgrade from 5.2.2 with pending jobs. So you just need to drain
   your cluster of running jobs by disabling all queues:

      # qmod -d '*'


   2.3 Shutting down Sun Grid Engine
   ---------------------------------
 
   Shutdown your cluster with the following commands:

      # qconf -kej            (shutdown execd and kill running jobs)
      (wait 1-2 minutes)
      # qstat -f              (verify the status of the cluster)
      # qconf -ks             (kill scheduler) 
      # qconf -km             (kill qmaster)
      # $CODINE_ROOT/util/shutdown_commd.sh -all    (kill cod_commd's)
      (kill all cod_shadowd's)

   Now verify that all Sun Grid Engine daemons (cod_qmaster, cod_schedd,
   cod_execd, cod_commd, cod_shepherd, cod_shadowd) on all hosts are
   finished. If not, terminate them with the 'kill' command.


   2.3 Remove your execd spool directories
   ---------------------------------------

   This is a safe method to make sure that no hung jobs can cause any
   problems after the upgrade. The execd spool directory is configured
   through the global cluster configuration and has the unqualified host
   name appended. By default it is located in

        $CODINE_ROOT/default/spool/<hostname>

   You can recursively delete all these directories but please make sure NOT
   to delete the qmaster spool directory which is, by default:

       $CODINE_ROOT/default/spool/qmaster


   2.4 Backing up your 5.2.x Grid Engine cluster
   ---------------------------------------------

   It is recommended to make a backup of your cluster configuration. You
   should backup:

      - the qmaster spool directory

         # tar cvf sge_qmaster.tar <qmaster_spool_dir>

      - the 'common' directory

         # tar cvf sge_common_tar <codine_root>/default/common

      - the $CODINE_ROOT directory (not mandatory)

         # tar cvf sge_root.tar 3rd_party LICENSE* VERSION* bin catman \
                   ckpt doc examples inst_codine install_execd \
                   install_qmaster locale man mpi pvm qmon qsi util utilbin
   
   You should not make a backup of your execution daemon spool directories.


3) Installing the new files for 5.2.3
-------------------------------------

   Depending in the install method you can now install the Sun Grid Engine
   5.2.3 distribution

   3.1 Installing a Solaris patch
   ------------------------------

      Follow the directions you received with the patch

   3.2 Replacing a 5.2.x Solaris package with 5.2.3 packages
   ---------------------------------------------------------

      - remove the old Sun Grid Engine Packages 

         # pkgrm SDRMcomm
         # pkgrm SDRMdoc
         # pkgrm SDRMsp64          (Solaris 64-bit binaries)
         # pkgrm SDRMsp32          (Solaris 64-bit binaries)
           
      - install the new packages with 'pkgadd'

         Please make sure that you choose the same base directory and same
         admin user (the suggested default has changed in 5.2.3)

   3.3 Installing a 5.2.3 'tar.gz' distribution
   --------------------------------------------

      - delete your old distribution:

         # cd $CODINE_ROOT
         # rm -rf 3rd_party LICENSE* VERSION* bin catman ckpt doc examples
         # rm -rf inst_codine install_execd install_qmaster locale man mpi
         # rm -rf pvm qmon qsi util utilbin


       - unpack the new distribution and set file permissions

     
         # cd $CODINE_ROOT
         # gzip -dc sge-5_2_3-common.tar.gz | tar xvpf -
         # gzip -dc sge-5_2_3-doc.tar.gz | tar xvpf -
         # gzip -dc sge-5_2_3-bin-glinux.tar.gz | tar xvpf -
         # gzip -dc sge-5_2_3-bin-solsparc64.tar.gz | tar xvpf -
         # gzip -dc sge-5_2_3-bin-solsparc32.tar.gz | tar xvpf -


         # util/setfileperm.sh <adminuser> <group> <codine_root>

   3.4 New startup script
   ----------------------

      The startup script 'codine5' which is installed in

         $CODINE_ROOT/default/common/codine5
         
      and in 

         /etc/init.d/codine5        (Solaris)
         /etc/rc.d/init.d/codine5   (Linux)

      had a small error in version 5.2 and 5.2.2. This causes the '-migrate'
      option to fail when your system was running under an admin user
      account and not as root and user root was mapped to user 'nobody'.

      You can create a new startup script with the utility script

         <codine_root>/util/create-rcstartup.sh

      This script expects the following arguments

      $1 = <path_to_your_$CODINE_ROOT_directory>
      $2 = <0> if you are using the service codine_commd
               or
           <portnumber> if you use the variable $COMMD_PROT instead
      $3 = <default> 
               or
           the name of your $COD_CELL variable if you have chose one
      $4 = path to the template script $CODINE_ROOT/util/startup_template


      The script will write its output to stdout, so you can redirect it to
      any filename you want. If the result is ok, then you can copy the
      script to '$CODINE_ROOT/default/common/' and to the system wide
      startup script on all of your hosts.

      Examples (in sh-syntax):
   
      Using service 'codine_commd' in 'default' cell:
         
      # . <your_codine_root>/default/common/settings.sh
      # cd $CODINE_ROOT/util
      # create_rcstartup.sh  $CODINE_ROOT 0 default startup_template


      Using variable $COMMD_PORT in 'default' cell:

      # . <your_codine_root>/default/common/settings.sh
      # cd $CODINE_ROOT/util                 
      # create_rcstartup.sh  $CODINE_ROOT $COMMD_PORT default startup_template


   3.5 New template script for rotating 'messages' files
   ----------------------------------------------------- 

      See the file 'doc/logfile-trimming.asc' and the script
      'util/logchecker.sh' for information about this new utility script for
      rotating and deleting old 'messages' files.


4) Starting Sun Grid Engine 5.2.3
---------------------------------

   You may now start your updated Sun Grid Engine 5.2.3 version.

   First login to your qmaster machine and enter as user root

      # <your_codine_root>/default/common/codine5

   Repeat this step on all your execution hosts.


5) Copyright
------------

Copyright  2001 Sun Microsystems, Inc. All rights reserved. Use is subject
to license terms. Third-party software, including font technology, is
copyrighted and licensed from Sun suppliers. Portions may be derived from
Berkeley BSD systems, licensed from U. of CA. Sun, Sun Microsystems and the
Sun logo are trademarks or registered trademarks of Sun Microsystems, Inc.
in the U.S. and other countries. All SPARC trademarks are used under license
and are trademarks or registered trademarks of SPARC International, Inc. in
the U.S. and other countries. Federal Acquisitions: Commercial Software -
Government Users Subject to Standard License Terms and Conditions.

Copyright  2001 Sun Microsystems, Inc. Tous droits rservs. Distribu par
des licences qui en restreignent l'utilisation. Le logiciel dtenu par des
tiers, et qui comprend la technologie relative aux polices de caractres,
est protg par un copyright et licenci par des fournisseurs de Sun. Des
parties de ce produit pourront tre drives des systmes Berkeley BSD
licencis par l'Universit de Californie. Sun, Sun Microsystems et le logo
Sun sont des marques de fabrique ou des marques dposes de Sun
Microsystems, Inc. aux Etats-Unis et dans d'autres pays. Toutes les marques
SPARC sont utilises sous licence et sont des marques de fabrique ou des
marques dposes de SPARC International, Inc. aux Etats-Unis et dans
d'autres pays.
