Upgrading to Eucalyptus 1.5.1 from 1.4

These are instructions for those who would like to upgrade to Eucalyptus 1.5 from source-based or RPM-based 1.4 installation. If you're still running 1.3, please, follow the instructions for upgrading to 1.4 before following these instructions.

These upgrade instructions involve making a backup of the key state. The last section of this document explains how to roll back to the previous installation using the backup.

Commands below assume that your $EUCALYPTUS variable points to the root of the (old) 1.4 installation. The typical 1.4 installation is in /opt/eucalyptus. After moving the 1.4 installation away or backing it up, the same location will be re-used for the 1.5 installation. If you want to install 1.5 somewhere else, adjust the commands accordingly.

1. Clean up Eucalyptus running state

  • Write down the value of the "Walrus path" listed under the "Configuration" tab of the Web interface. (That is where all uploaded images and user buckets are located.)
  • Terminate all Eucalyptus instances
    ec2-terminate-instances ...      # (as admin)
    
  • Shut down Eucalyptus on all nodes.
    $EUCALYPTUS/etc/init.d/eucalyptus stop
    
  • Check for errant Eucalyptus processes on all nodes and kill them
    ps aux | grep euca
    kill -9 ...
    

2. Install Eucalyptus 1.5

Both source- and RPM-based installations can be upgraded:

  • Option A: Source-based installation upgrade:
    • Move away or back up the 1.4 installation:
      • Pick a backup location:
        export EUCALYPTUS_OLD=/opt/eucalyptus-1.4
        
      • If your 1.4 installation is in a separate directory, such as /opt/eucalyptus, you can just move it away on the head-node and all compute nodes. E.g.:
        mv $EUCALYPTUS $EUCALYPTUS_OLD
        
      • Else, if you installed 1.4 in a location shared with other software, such as / or /usr/local, you'll have to move away or tar up the following directories and files one-by-one:
        $EUCALYPTUS/etc/init.d/eucalyptus 
        $EUCALYPTUS/etc/eucalyptus 
        $EUCALYPTUS/usr/sbin/euca_* 
        $EUCALYPTUS/usr/share/eucalyptus 
        $EUCALYPTUS/var/eucalyptus/[^b]*      # (everything except the "bukkits" directory)
        
      • Also, if you'd like to clean up, you might want to remove the following two directories:
        $EUCALYPTUS/var/log/eucalyptus
        $EUCALYPTUS/var/run/eucalyptus
        
    • Follow the steps in the Source Code Installation section of the Administrator's Guide and, afterwards, return here.
    • Copy back the old database and keys (note that the location has changed slightly):
      cp $EUCALYPTUS_OLD/var/eucalyptus/db/eucalyptus.* $EUCALYPTUS/var/lib/eucalyptus/db/
      cp $EUCALYPTUS_OLD/var/eucalyptus/db/eucalyptus_volumes.* $EUCALYPTUS/var/lib/eucalyptus/db/
      rm -f $EUCALYPTUS/var/eucalyptus/db/*.lck
      cp $EUCALYPTUS_OLD/var/eucalyptus/keys/* $EUCALYPTUS/var/lib/eucalyptus/keys/
      
    • Since the "Walrus path" ($EUCALYPTUS/var/eucalyptus/bukkits by default) potentially contains a lot of data, we do not recommend copying it. If you were using the default location, just move it back:
      mv $EUCALYPTUS_OLD/var/eucalyptus/bukkits $EUCALYPTUS/var/eucalyptus
      
      (FYI: The official default Walrus path in 1.5 is $EUCALYPTUS/var/lib/eucalyptus. If you want to move the buckets there, for consistency with the official value, be sure to also change the Walrus Path setting under the Configuration tab of the Web interface.)
  • Option B: RPM-based installation upgrade:
    • Follow the steps in the CentOS Installation section of the Administrator's Guide and, afterwards, return here.
    • The upgrade should leave rollback archives in /root which could be used to revert to 1.4.

3. Update the configuration

  • We provide a way to upgrade the configuration file
    $EUCALYPTUS/usr/sbin/euca_conf -upgrade-conf <old_config> <new_config>
    
    after which we strongly advice to go and check the generated configuration file: if you upgraded from an older RPM the above command was executed automatically during the upgrade.
  • Edit $EUCALYPTUS_OLD/etc/eucalyptus/eucalyptus.conf file on head node. We suggest starting with the fresh one created during installation and copying over matching parts from the old one. (If you updated an RPM-based install, the new configuration is in eucalyptus.conf.rpmnew while eucalyptus.conf contains your old one.) Specifically, be sure to carry across the values of the following variables:
    • *_PORT
    • NODES
    • INSTANCE_PATH
    • VNET_*
  • Set HYPERVISOR="xen" since your 1.4 installation was Xen-based. You can later switch to a KVM-based installation.
  • Setting the EUCA_USER variable according to the type of installation that you performed in step 2 above (running as root is easier to configure, but it requires one to use a specially compiled Apache).
  • Network parameters from 1.4 should continue to work. To learn about the new network mode (MANAGED-NOVLAN) see the Network Configuration section of the Administrator's Guide..
  • On each compute node, go over the config file, comparing it with the old one, same as with the head-node file. (Naturally, you are free to create a new config file for compute-nodes and rsync it with all the nodes.)
  • Synchronize node keys
    $EUCALYPTUS/usr/sbin/euca_sync_key -c $EUCALYPTUS/etc/eucalyptus/eucalyptus.conf
    
  • Start NCs, the CC, and the CLC. Each one of those services has its own startup script in 1.5, so perform some combination of these on the appropriate machines:
    $EUCALYPTUS/etc/init.d/eucalyptus-nc start
    $EUCALYPTUS/etc/init.d/eucalyptus-cc start
    $EUCALYPTUS/etc/init.d/eucalyptus-clc start
    
  • In a Web browser, load https://headnode:8443/ and log in as before. Verify that the user accounts and the images are there.
  • Verify that the nodes are back up and that they can run your old instances (if not, see the Troubleshooting section.)
    ec2-describe-availability-zones verbose
    
    

4. Clean up old disk state

Once you are confident that the new installation is working, delete the old state on disk.

rm -rf $EUCALYPTUS_OLD 

If you upgraded using RPM packages, delete on all nodes the backup of old state that was created during the upgrade:

rm /root/eucalyptus-pre-1.5-rollback.tar

The upgrade moved some directories location (in order to comply to FHS) so you may have to remove by hand some directory in particular

rm -rf $EUCALYPTUS/var/eucalyptus

6. Rolling back to an earlier installation

  • Stop Eucalyptus 1.5 processes, if any, on all nodes
  • Option A: Rolling back source-based 1.5 upgrade:
    • Remove any files added during the failed upgrade. For example:
      rm -rf $EUCALYPTUS
      
    • Move back the old installation on all nodes:
      mv $EUCALYPTUS_OLD $EUCALYPTUS
      
  • Option B: Rolling back RPM-based 1.5 upgrade:
    • Remove the failed RPMs on all affected nodes (depending on the failure, you might have to use the --nopreun option)
      rpm -e eucalyptus-cloud eucalyptus-cc euca-httpd euca-axis2c euca-libvirt eucalyptus
      
    • Download and install the 1.4 RPMs on all nodes as discussed in the Administrator's Guide. For example, on the front-end you can use:
      rpm -ivh eucalyptus-1.4-2.i386.rpm eucalyptus-cloud-1.4-2.i386.rpm eucalyptus-cc-1.4-2.i386.rpm eucalyptus-gl-1.4-2.i386.rpm
      
    • Copy the old state saved during the upgrade process:
      cd $EUCALYPTUS
      tar xf /root/eucalyptus-pre-1.5-rollback.tar
      
    • Copy over the old configuration file
      cd $EUCALYPTUS
      cp etc/eucalyptus/eucalyptus.conf.old etc/eucalyptus/eucalyptus.conf
      
  • Start Eucalyptus, as before