Testing Upgrades in Eucalyptus


Eucalyptus Versions:  3.0 - 3.4

Testing Upgrades

This guide explains how to test an upgrade to your Eucalyptus CLC, specifically a database schema upgrade.

WARNING:  You MUST ensure that your test platform for upgrades does not have access to your REAL environment.  Introducing a restored CLC into the same environment WILL break your cloud.

Install the Packages

Follow the installation guide[1] to install the version of Eucalyptus you would like to upgrade FROM.  Don't start the Eucalyptus CLC services yet.  Instead, go ahead and start the database manually:

su eucalyptus -c "/usr/pgsql-9.1/bin/pg_ctl start -w -s -D/var/lib/eucalyptus/db/data -o '-h0.0.0.0/0 -p8777 -i'"

Backup the current configuration

Next, use the Eucalyptus Sosreports plugin to take a snapshot of your current configuration on the CLC, including database dumps.

You'll also need to grab the keys, so make sure you copy out /var/lib/eucalyptus/keys from the CLC.

Restore the database on your test platform

Open up the sosreport you captured in the previous step and locate the database files in sos_commands/eucadb.  Take these files and restore the respective dumps:

cat eucalyptus_cloud.sql | psql -U root --port 8777 -h /var/lib/eucalyptus/db/data -d eucalyptus_cloud

Replace the database name and file with that of the relevant dump.

Next, restore the contents of /var/lib/eucalyptus/keys/ but keep the euca.12 file from your pre-prepared cloud.
Then, flush existing connection records from the database with this script:
for i in `psql -h /var/lib/eucalyptus/db/data -p 8777 -l | awk '{print $1}' | grep ^euca`; do psql -h /var/lib/eucalyptus/db/data -p 8777 $i << EOF
 select pg_terminate_backend(procpid) from pg_state_activity where datname='$i' EOF; done
Once complete, stop the database manually:

/usr/pgsql-9.1/bin/pg_ctl stop -D/var/lib/eucalyptus/db/data


Next, go ahead and upgrade the eucalyptus-cloud packages and start the Eucalyptus cloud service.


Have more questions? Submit a request


Powered by Zendesk