Merge "use ext4 for guest default ephemeral"
diff --git a/.gitignore b/.gitignore
index 4365202..1840352 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,8 +7,10 @@
 localrc
 local.sh
 files/*.gz
+files/*.qcow2
 files/images
 files/pip-*
+files/get-pip.py
 stack-screenrc
 *.pem
 accrc
diff --git a/clean.sh b/clean.sh
index 480a812..e16bdb7 100755
--- a/clean.sh
+++ b/clean.sh
@@ -30,13 +30,17 @@
 # and ``DISTRO``
 GetDistro
 
+# Import apache functions
+source $TOP_DIR/lib/apache
+source $TOP_DIR/lib/ldap
 
 # Import database library
 source $TOP_DIR/lib/database
 source $TOP_DIR/lib/rpc_backend
 
-source $TOP_DIR/lib/oslo
 source $TOP_DIR/lib/tls
+
+source $TOP_DIR/lib/oslo
 source $TOP_DIR/lib/horizon
 source $TOP_DIR/lib/keystone
 source $TOP_DIR/lib/glance
@@ -47,7 +51,9 @@
 source $TOP_DIR/lib/heat
 source $TOP_DIR/lib/neutron
 source $TOP_DIR/lib/baremetal
-source $TOP_DIR/lib/ldap
+source $TOP_DIR/lib/ironic
+source $TOP_DIR/lib/trove
+
 
 # Extras Source
 # --------------
@@ -95,13 +101,6 @@
     cleanup_nova_hypervisor
 fi
 
-# cinder doesn't always clean up the volume group as it might be used elsewhere...
-# clean it up if it is a loop device
-VG_DEV=$(sudo losetup -j $DATA_DIR/${VOLUME_GROUP}-backing-file | awk -F':' '/backing-file/ { print $1}')
-if [[ -n "$VG_DEV" ]]; then
-    sudo losetup -d $VG_DEV
-fi
-
 #if mount | grep $DATA_DIR/swift/drives; then
 #  sudo umount $DATA_DIR/swift/drives/sdb1
 #fi
@@ -111,12 +110,19 @@
 sudo rm -rf /etc/keystone /etc/glance /etc/nova /etc/cinder /etc/swift
 
 # Clean out tgt
-sudo rm /etc/tgt/conf.d/*
+sudo rm -f /etc/tgt/conf.d/*
 
 # Clean up the message queue
 cleanup_rpc_backend
 cleanup_database
 
+# Clean out data, logs and status
+LOGDIR=$(dirname "$LOGFILE")
+sudo rm -rf $DATA_DIR $LOGDIR $DEST/status
+if [[ -n "$SCREEN_LOGDIR" ]] && [[ -d "$SCREEN_LOGDIR" ]]; then
+    sudo rm -rf $SCREEN_LOGDIR
+fi
+
 # Clean up networking...
 # should this be in nova?
 # FIXED_IP_ADDR in br100
diff --git a/driver_certs/cinder_driver_cert.sh b/driver_certs/cinder_driver_cert.sh
index 18bef8b..edcc6d4 100755
--- a/driver_certs/cinder_driver_cert.sh
+++ b/driver_certs/cinder_driver_cert.sh
@@ -2,6 +2,22 @@
 
 # **cinder_cert.sh**
 
+# This script is a simple wrapper around the tempest volume api tests
+# It requires that you have a working and functional devstack install
+# and that you've enabled your device driver by making the necessary
+# modifications to /etc/cinder/cinder.conf
+
+# This script will refresh your openstack repo's and restart the cinder
+# services to pick up your driver changes.
+# please NOTE; this script assumes your devstack install is functional
+# and includes tempest. A good first step is to make sure you can
+# create volumes on your device before you even try and run this script.
+
+# It also assumes default install location (/opt/stack/xxx)
+# to aid in debug, you should also verify that you've added
+# an output directory for screen logs:
+#     SCREEN_LOGDIR=/opt/stack/screen-logs
+
 CERT_DIR=$(cd $(dirname "$0") && pwd)
 TOP_DIR=$(cd $CERT_DIR/..; pwd)
 
@@ -73,9 +89,9 @@
 sleep 5
 
 # run tempest api/volume/test_*
-log_message "Run the actual tempest volume tests (run_tests.sh -N tempest.api.volume.test_*)...", True
+log_message "Run the actual tempest volume tests (./tools/pretty_tox.sh api.volume_*)...", True
 exec 2> >(tee -a $TEMPFILE)
-`./run_tests.sh -N tempest.api.volume.test_*`
+`./tools/pretty_tox.sh api.volume`
 if [[ $? = 0 ]]; then
     log_message "CONGRATULATIONS!!!  Device driver PASSED!", True
     log_message "Submit output: ($TEMPFILE)"
diff --git a/extras.d/70-gantt.sh b/extras.d/70-gantt.sh
new file mode 100644
index 0000000..ac1efba
--- /dev/null
+++ b/extras.d/70-gantt.sh
@@ -0,0 +1,31 @@
+# gantt.sh - Devstack extras script to install Gantt
+
+if is_service_enabled n-sch; then
+    disable_service gantt
+fi
+
+if is_service_enabled gantt; then
+    if [[ "$1" == "source" ]]; then
+        # Initial source
+        source $TOP_DIR/lib/gantt
+    elif [[ "$1" == "stack" && "$2" == "install" ]]; then
+        echo_summary "Installing Gantt"
+        install_gantt
+        cleanup_gantt
+    elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
+        echo_summary "Configuring Gantt"
+        configure_gantt
+
+    elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
+        # Initialize gantt
+        init_gantt
+
+        # Start gantt
+        echo_summary "Starting Gantt"
+        start_gantt
+    fi
+
+    if [[ "$1" == "unstack" ]]; then
+        stop_gantt
+    fi
+fi
diff --git a/extras.d/70-trove.sh b/extras.d/70-trove.sh
new file mode 100644
index 0000000..a4dc7fb
--- /dev/null
+++ b/extras.d/70-trove.sh
@@ -0,0 +1,33 @@
+# trove.sh - Devstack extras script to install Trove
+
+if is_service_enabled trove; then
+    if [[ "$1" == "source" ]]; then
+        # Initial source
+        source $TOP_DIR/lib/trove
+    elif [[ "$1" == "stack" && "$2" == "install" ]]; then
+        echo_summary "Installing Trove"
+        install_trove
+        install_troveclient
+        cleanup_trove
+    elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
+        echo_summary "Configuring Trove"
+        configure_troveclient
+        configure_trove
+
+        if is_service_enabled key; then
+            create_trove_accounts
+        fi
+
+    elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
+        # Initialize trove
+        init_trove
+
+        # Start the trove API and trove taskmgr components
+        echo_summary "Starting Trove"
+        start_trove
+    fi
+
+    if [[ "$1" == "unstack" ]]; then
+        stop_trove
+    fi
+fi
diff --git a/files/apts/general b/files/apts/general
index aff687f..32d31f0 100644
--- a/files/apts/general
+++ b/files/apts/general
@@ -21,3 +21,4 @@
 tar
 python-cmd2 # dist:precise
 python2.7
+bc
diff --git a/files/apts/n-cpu b/files/apts/n-cpu
index 29e3760..b287107 100644
--- a/files/apts/n-cpu
+++ b/files/apts/n-cpu
@@ -1,8 +1,8 @@
 # Stuff for diablo volumes
-nbd-client
 lvm2
 open-iscsi
 open-iscsi-utils # Deprecated since quantal dist:precise
 genisoimage
 sysfsutils
 sg3-utils
+python-guestfs
diff --git a/files/keystone_data.sh b/files/keystone_data.sh
index 07b6b60..d477c42 100755
--- a/files/keystone_data.sh
+++ b/files/keystone_data.sh
@@ -6,7 +6,6 @@
 # ------------------------------------------------------------------
 # service              glance     admin
 # service              heat       service        # if enabled
-# service              ceilometer admin          # if enabled
 # Tempest Only:
 # alt_demo             alt_demo  Member
 #
@@ -113,30 +112,11 @@
 fi
 
 # Ceilometer
-if [[ "$ENABLED_SERVICES" =~ "ceilometer" ]]; then
-    keystone user-create --name=ceilometer \
-        --pass="$SERVICE_PASSWORD" \
-        --tenant $SERVICE_TENANT_NAME \
-        --email=ceilometer@example.com
-    keystone user-role-add --tenant $SERVICE_TENANT_NAME \
-        --user ceilometer \
-        --role admin
+if [[ "$ENABLED_SERVICES" =~ "ceilometer" ]] && [[ "$ENABLED_SERVICES" =~ "s-proxy" || "$ENABLED_SERVICES" =~ "swift" ]]; then
     # Ceilometer needs ResellerAdmin role to access swift account stats.
     keystone user-role-add --tenant $SERVICE_TENANT_NAME \
         --user ceilometer \
         --role ResellerAdmin
-    if [[ "$KEYSTONE_CATALOG_BACKEND" = 'sql' ]]; then
-        keystone service-create \
-            --name=ceilometer \
-            --type=metering \
-            --description="Ceilometer Service"
-        keystone endpoint-create \
-            --region RegionOne \
-            --service ceilometer \
-            --publicurl "http://$SERVICE_HOST:8777" \
-            --adminurl "http://$SERVICE_HOST:8777" \
-            --internalurl "http://$SERVICE_HOST:8777"
-    fi
 fi
 
 # EC2
diff --git a/files/ldap/manager.ldif.in b/files/ldap/manager.ldif.in
index de3b69d..2f1f139 100644
--- a/files/ldap/manager.ldif.in
+++ b/files/ldap/manager.ldif.in
@@ -12,4 +12,4 @@
 replace: olcDbIndex
 olcDbIndex: objectClass eq
 olcDbIndex: default pres,eq
-olcDbIndex: cn,sn,givenName,co
+olcDbIndex: cn,sn,givenName
diff --git a/files/rpms-suse/general b/files/rpms-suse/general
index 98c2795..704947e 100644
--- a/files/rpms-suse/general
+++ b/files/rpms-suse/general
@@ -17,6 +17,7 @@
 unzip
 vim-enhanced
 wget
+bc
 
 findutils-locate # useful when debugging
 lsof # useful when debugging
diff --git a/files/rpms/ceilometer-collector b/files/rpms/ceilometer-collector
index d7b7ea8..c91bac3 100644
--- a/files/rpms/ceilometer-collector
+++ b/files/rpms/ceilometer-collector
@@ -1,3 +1,4 @@
 selinux-policy-targeted
 mongodb-server
 pymongo
+mongodb # NOPRIME
diff --git a/files/rpms/general b/files/rpms/general
index 40246ea..6cfe31e 100644
--- a/files/rpms/general
+++ b/files/rpms/general
@@ -21,6 +21,7 @@
 unzip
 wget
 which
+bc
 
 # [1] : some of installed tools have unversioned dependencies on this,
 # but others have versioned (<=0.7).  So if a later version (0.7.1)
diff --git a/functions b/functions
index 92b61ed..73d65ce 100644
--- a/functions
+++ b/functions
@@ -1150,6 +1150,9 @@
 
 
 # Stop a service in screen
+# If a PID is available use it, kill the whole process group via TERM
+# If screen is being used kill the screen window; this will catch processes
+# that did not leave a PID behind
 # screen_stop service
 function screen_stop() {
     SCREEN_NAME=${SCREEN_NAME:-stack}
@@ -1159,7 +1162,7 @@
     if is_service_enabled $1; then
         # Kill via pid if we have one available
         if [[ -r $SERVICE_DIR/$SCREEN_NAME/$1.pid ]]; then
-            pkill -TERM -P $(cat $SERVICE_DIR/$SCREEN_NAME/$1.pid)
+            pkill -TERM -P -$(cat $SERVICE_DIR/$SCREEN_NAME/$1.pid)
             rm $SERVICE_DIR/$SCREEN_NAME/$1.pid
         fi
         if [[ "$USE_SCREEN" = "True" ]]; then
@@ -1301,7 +1304,8 @@
     echo "cd $REQUIREMENTS_DIR; $SUDO_CMD python update.py $project_dir"
 
     # Don't update repo if local changes exist
-    (cd $project_dir && git diff --quiet)
+    # Don't use buggy "git diff --quiet"
+    (cd $project_dir && git diff --exit-code >/dev/null)
     local update_requirements=$?
 
     if [ $update_requirements -eq 0 ]; then
@@ -1539,7 +1543,7 @@
         # NOTE: For backwards compatibility reasons, colons may be used in place
         # of semi-colons for property delimiters but they are not permitted
         # characters in NTFS filesystems.
-        property_string=`echo "$IMAGE_NAME" | grep -oP '(?<=-)(?!.*-).+[:;].+[:;].+$'`
+        property_string=`echo "$IMAGE_NAME" | grep -oP '(?<=-)(?!.*-).*[:;].*[:;].*$'`
         IFS=':;' read -a props <<< "$property_string"
         vmdk_disktype="${props[0]:-$vmdk_disktype}"
         vmdk_adapter_type="${props[1]:-$vmdk_adapter_type}"
diff --git a/lib/ceilometer b/lib/ceilometer
index 75058c0..30bf3ae 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -52,7 +52,10 @@
 CEILOMETER_SERVICE_PROTOCOL=http
 CEILOMETER_SERVICE_HOST=$SERVICE_HOST
 CEILOMETER_SERVICE_PORT=${CEILOMETER_SERVICE_PORT:-8777}
-#
+
+# Tell Tempest this project is present
+TEMPEST_SERVICES+=,ceilometer
+
 
 # Functions
 # ---------
@@ -85,9 +88,9 @@
             keystone endpoint-create \
                 --region RegionOne \
                 --service_id $CEILOMETER_SERVICE \
-                --publicurl "$CEILOMETER_SERVICE_PROTOCOL://$CEILOMETER_SERVICE_HOST:$CEILOMETER_SERVICE_PORT/" \
-                --adminurl "$CEILOMETER_SERVICE_PROTOCOL://$CEILOMETER_SERVICE_HOST:$CEILOMETER_SERVICE_PORT/" \
-                --internalurl "$CEILOMETER_SERVICE_PROTOCOL://$CEILOMETER_SERVICE_HOST:$CEILOMETER_SERVICE_PORT/"
+                --publicurl "$CEILOMETER_SERVICE_PROTOCOL://$CEILOMETER_SERVICE_HOST:$CEILOMETER_SERVICE_PORT" \
+                --adminurl "$CEILOMETER_SERVICE_PROTOCOL://$CEILOMETER_SERVICE_HOST:$CEILOMETER_SERVICE_PORT" \
+                --internalurl "$CEILOMETER_SERVICE_PROTOCOL://$CEILOMETER_SERVICE_HOST:$CEILOMETER_SERVICE_PORT"
         fi
     fi
 }
@@ -151,6 +154,8 @@
 
 function configure_mongodb() {
     if is_fedora; then
+        # install mongodb client
+        install_package mongodb
         # ensure smallfiles selected to minimize freespace requirements
         sudo sed -i '/--smallfiles/!s/OPTIONS=\"/OPTIONS=\"--smallfiles /' /etc/sysconfig/mongod
 
diff --git a/lib/cinder b/lib/cinder
index 5397308..9f70b2a 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -79,6 +79,9 @@
 
 VOLUME_NAME_PREFIX=${VOLUME_NAME_PREFIX:-volume-}
 
+# Tell Tempest this project is present
+TEMPEST_SERVICES+=,cinder
+
 
 # Functions
 # ---------
@@ -109,8 +112,8 @@
     # of the backing file
     if [ -z "`sudo lvs --noheadings -o lv_name $vg`" ]; then
         # if the backing physical device is a loop device, it was probably setup by devstack
-        VG_DEV=$(sudo losetup -j $DATA_DIR/${vg}-backing-file | awk -F':' '/backing-file/ { print $1}')
-        if [[ -n "$VG_DEV" ]]; then
+        if [[ -n "$VG_DEV" ]] && [[ -e "$VG_DEV" ]]; then
+            VG_DEV=$(sudo losetup -j $DATA_DIR/${vg}-backing-file | awk -F':' '/backing-file/ { print $1}')
             sudo losetup -d $VG_DEV
             rm -f $DATA_DIR/${vg}-backing-file
         fi
diff --git a/lib/databases/mysql b/lib/databases/mysql
index 0eb8fdd..476b4b9 100644
--- a/lib/databases/mysql
+++ b/lib/databases/mysql
@@ -87,20 +87,25 @@
 default-storage-engine = InnoDB" $MY_CONF
     fi
 
-    # Turn on slow query log
-    sudo sed -i '/log.slow.queries/d' $MY_CONF
-    sudo sed -i -e "/^\[mysqld\]/ a \
-log-slow-queries = /var/log/mysql/mysql-slow.log" $MY_CONF
+    if [[ "$DATABASE_QUERY_LOGGING" == "True" ]]; then
+        echo_summary "Enabling MySQL query logging"
 
-    # Log all queries (any query taking longer than 0 seconds)
-    sudo sed -i '/long.query.time/d' $MY_CONF
-    sudo sed -i -e "/^\[mysqld\]/ a \
-long-query-time = 0" $MY_CONF
+        # Turn on slow query log
+        sudo sed -i '/log.slow.queries/d' $MY_CONF
+        sudo sed -i -e "/^\[mysqld\]/ a \
+            log-slow-queries = /var/log/mysql/mysql-slow.log" $MY_CONF
 
-    # Log all non-indexed queries
-    sudo sed -i '/log.queries.not.using.indexes/d' $MY_CONF
-    sudo sed -i -e "/^\[mysqld\]/ a \
-log-queries-not-using-indexes" $MY_CONF
+        # Log all queries (any query taking longer than 0 seconds)
+        sudo sed -i '/long.query.time/d' $MY_CONF
+        sudo sed -i -e "/^\[mysqld\]/ a \
+            long-query-time = 0" $MY_CONF
+
+        # Log all non-indexed queries
+        sudo sed -i '/log.queries.not.using.indexes/d' $MY_CONF
+        sudo sed -i -e "/^\[mysqld\]/ a \
+            log-queries-not-using-indexes" $MY_CONF
+
+    fi
 
     restart_service $MYSQL
 }
diff --git a/lib/databases/postgresql b/lib/databases/postgresql
index 60e5a33..c459feb 100644
--- a/lib/databases/postgresql
+++ b/lib/databases/postgresql
@@ -43,7 +43,13 @@
     if is_fedora; then
         PG_HBA=/var/lib/pgsql/data/pg_hba.conf
         PG_CONF=/var/lib/pgsql/data/postgresql.conf
-        sudo [ -e $PG_HBA ] || sudo postgresql-setup initdb
+        if ! sudo [ -e $PG_HBA ]; then
+            if ! [[ $DISTRO =~ (rhel6) ]]; then
+                sudo postgresql-setup initdb
+            else
+                sudo service postgresql initdb
+            fi
+        fi
     elif is_ubuntu; then
         PG_DIR=`find /etc/postgresql -name pg_hba.conf|xargs dirname`
         PG_HBA=$PG_DIR/pg_hba.conf
diff --git a/lib/gantt b/lib/gantt
new file mode 100644
index 0000000..832d759
--- /dev/null
+++ b/lib/gantt
@@ -0,0 +1,96 @@
+# lib/gantt
+# Install and start **Gantt** scheduler service
+
+# Dependencies:
+#
+# - functions
+# - DEST, DATA_DIR, STACK_USER must be defined
+
+# stack.sh
+# ---------
+# - install_gantt
+# - configure_gantt
+# - init_gantt
+# - start_gantt
+# - stop_gantt
+# - cleanup_gantt
+
+# Save trace setting
+XTRACE=$(set +o | grep xtrace)
+set +o xtrace
+
+# Defaults
+# --------
+
+# set up default directories
+GANTT_DIR=$DEST/gantt
+GANTT_STATE_PATH=${GANTT_STATE_PATH:=$DATA_DIR/gantt}
+GANTT_REPO=${GANTT_REPO:-${GIT_BASE}/openstack/gantt.git}
+GANTT_BRANCH=${GANTT_BRANCH:-master}
+
+GANTTCLIENT_DIR=$DEST/python-ganttclient
+GANTTCLIENT_REPO=${GANTT_REPO:-${GIT_BASE}/openstack/python-ganttclient.git}
+GANTTCLIENT_BRANCH=${GANTT_BRANCH:-master}
+
+# eventually we will have a separate gantt config
+# file but for compatibility reasone stick with
+# nova.conf for now
+GANTT_CONF_DIR=${GANTT_CONF_DIR:-/etc/nova}
+GANTT_CONF=$GANTT_CONF_DIR/nova.conf
+
+# Support entry points installation of console scripts
+GANTT_BIN_DIR=$(get_python_exec_prefix)
+
+
+# Functions
+# ---------
+
+# cleanup_gantt() - Remove residual data files, anything left over from previous
+# runs that a clean run would need to clean up
+function cleanup_gantt() {
+    echo "Cleanup Gantt"
+}
+
+# configure_gantt() - Set config files, create data dirs, etc
+function configure_gantt() {
+    echo "Configure Gantt"
+}
+
+# init_gantt() - Initialize database and volume group
+function init_gantt() {
+    echo "Initialize Gantt"
+}
+
+# install_gantt() - Collect source and prepare
+function install_gantt() {
+    git_clone $GANTT_REPO $GANTT_DIR $GANTT_BRANCH
+    setup_develop $GANTT_DIR
+}
+
+# install_ganttclient() - Collect source and prepare
+function install_ganttclient() {
+    echo "Install Gantt Client"
+#    git_clone $GANTTCLIENT_REPO $GANTTCLIENT_DIR $GANTTCLIENT_BRANCH
+#    setup_develop $GANTTCLIENT_DIR
+}
+
+# start_gantt() - Start running processes, including screen
+function start_gantt() {
+    if is_service_enabled gantt; then
+        screen_it gantt "cd $GANTT_DIR && $GANTT_BIN_DIR/gantt-scheduler --config-file $GANTT_CONF"
+    fi
+}
+
+# stop_gantt() - Stop running processes
+function stop_gantt() {
+    echo "Stop Gantt"
+    screen_stop gantt
+}
+
+# Restore xtrace
+$XTRACE
+
+# Tell emacs to use shell-script-mode
+## Local variables:
+## mode: shell-script
+## End:
diff --git a/lib/glance b/lib/glance
index 21c1fa5..2d41ea4 100644
--- a/lib/glance
+++ b/lib/glance
@@ -52,6 +52,9 @@
 # Glance connection info.  Note the port must be specified.
 GLANCE_HOSTPORT=${GLANCE_HOSTPORT:-$SERVICE_HOST:9292}
 
+# Tell Tempest this project is present
+TEMPEST_SERVICES+=,glance
+
 
 # Functions
 # ---------
@@ -125,7 +128,7 @@
         iniset $GLANCE_API_CONF DEFAULT swift_store_key $SERVICE_PASSWORD
         iniset $GLANCE_API_CONF DEFAULT swift_store_create_container_on_put True
 
-        iniset_multiline DEFAULT known_stores glance.store.filesystem.Store glance.store.http.Store glance.store.swift.Store
+        iniset $GLANCE_API_CONF DEFAULT known_stores "glance.store.filesystem.Store, glance.store.http.Store, glance.store.swift.Store"
     fi
 
     cp -p $GLANCE_DIR/etc/glance-registry-paste.ini $GLANCE_REGISTRY_PASTE_INI
diff --git a/lib/heat b/lib/heat
index e35305b..467619f 100644
--- a/lib/heat
+++ b/lib/heat
@@ -38,6 +38,10 @@
 HEAT_ENV_DIR=$HEAT_CONF_DIR/environment.d
 HEAT_TEMPLATES_DIR=$HEAT_CONF_DIR/templates
 
+# Tell Tempest this project is present
+TEMPEST_SERVICES+=,heat
+
+
 # Functions
 # ---------
 
@@ -60,13 +64,13 @@
     # remove old config files
     rm -f $HEAT_CONF_DIR/heat-*.conf
 
-    HEAT_API_CFN_HOST=${HEAT_API_CFN_HOST:-$SERVICE_HOST}
+    HEAT_API_CFN_HOST=${HEAT_API_CFN_HOST:-$HOST_IP}
     HEAT_API_CFN_PORT=${HEAT_API_CFN_PORT:-8000}
     HEAT_ENGINE_HOST=${HEAT_ENGINE_HOST:-$SERVICE_HOST}
     HEAT_ENGINE_PORT=${HEAT_ENGINE_PORT:-8001}
-    HEAT_API_CW_HOST=${HEAT_API_CW_HOST:-$SERVICE_HOST}
+    HEAT_API_CW_HOST=${HEAT_API_CW_HOST:-$HOST_IP}
     HEAT_API_CW_PORT=${HEAT_API_CW_PORT:-8003}
-    HEAT_API_HOST=${HEAT_API_HOST:-$SERVICE_HOST}
+    HEAT_API_HOST=${HEAT_API_HOST:-$HOST_IP}
     HEAT_API_PORT=${HEAT_API_PORT:-8004}
     HEAT_API_PASTE_FILE=$HEAT_CONF_DIR/api-paste.ini
     HEAT_POLICY_FILE=$HEAT_CONF_DIR/policy.json
@@ -110,15 +114,12 @@
     [[ "$HEAT_STANDALONE" = "True" ]] && iniset $HEAT_CONF paste_deploy flavor standalone
 
     # OpenStack API
-    iniset $HEAT_CONF heat_api bind_host $HEAT_API_HOST
     iniset $HEAT_CONF heat_api bind_port $HEAT_API_PORT
 
     # Cloudformation API
-    iniset $HEAT_CONF heat_api_cfn bind_host $HEAT_API_CFN_HOST
     iniset $HEAT_CONF heat_api_cfn bind_port $HEAT_API_CFN_PORT
 
     # Cloudwatch API
-    iniset $HEAT_CONF heat_api_cloudwatch bind_host $HEAT_API_CW_HOST
     iniset $HEAT_CONF heat_api_cloudwatch bind_port $HEAT_API_CW_PORT
 
     # heat environment
diff --git a/lib/horizon b/lib/horizon
index 5bff712..c64d850 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -31,6 +31,9 @@
 # The example file in Horizon repo is used by default.
 HORIZON_SETTINGS=${HORIZON_SETTINGS:-$HORIZON_DIR/openstack_dashboard/local/local_settings.py.example}
 
+# Tell Tempest this project is present
+TEMPEST_SERVICES+=,horizon
+
 
 # Functions
 # ---------
diff --git a/lib/ironic b/lib/ironic
index 1ff3c81..b8838f5 100644
--- a/lib/ironic
+++ b/lib/ironic
@@ -33,7 +33,6 @@
 IRONIC_CONF_DIR=${IRONIC_CONF_DIR:-/etc/ironic}
 IRONIC_CONF_FILE=$IRONIC_CONF_DIR/ironic.conf
 IRONIC_ROOTWRAP_CONF=$IRONIC_CONF_DIR/rootwrap.conf
-IRONIC_ROOTWRAP_FILTERS=$IRONIC_CONF_DIR/rootwrap.d
 IRONIC_POLICY_JSON=$IRONIC_CONF_DIR/policy.json
 
 # Support entry points installation of console scripts
@@ -43,6 +42,9 @@
 IRONIC_SERVICE_PROTOCOL=http
 IRONIC_HOSTPORT=${IRONIC_HOSTPORT:-$SERVICE_HOST:6385}
 
+# Tell Tempest this project is present
+TEMPEST_SERVICES+=,ironic
+
 
 # Functions
 # ---------
@@ -118,7 +120,7 @@
 # Sets conductor specific settings.
 function configure_ironic_conductor() {
     cp $IRONIC_DIR/etc/ironic/rootwrap.conf $IRONIC_ROOTWRAP_CONF
-    cp -r $IRONIC_DIR/etc/ironic/rootwrap.d $IRONIC_ROOTWRAP_FILTERS
+    cp -r $IRONIC_DIR/etc/ironic/rootwrap.d $IRONIC_CONF_DIR
 
     iniset $IRONIC_CONF DEFAULT rootwrap_config $IRONIC_ROOTWRAP_CONF
 }
diff --git a/lib/keystone b/lib/keystone
index ceefe6a..4f7f68b 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -28,8 +28,6 @@
 XTRACE=$(set +o | grep xtrace)
 set +o xtrace
 
-source $TOP_DIR/lib/tls
-
 # Defaults
 # --------
 
@@ -180,6 +178,7 @@
     # Set the URL advertised in the ``versions`` structure returned by the '/' route
     iniset $KEYSTONE_CONF DEFAULT public_endpoint "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:%(public_port)s/"
     iniset $KEYSTONE_CONF DEFAULT admin_endpoint "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:%(admin_port)s/"
+    iniset $KEYSTONE_CONF DEFAULT admin_bind_host "$KEYSTONE_SERVICE_HOST"
 
     # Register SSL certificates if provided
     if is_ssl_enabled_service key; then
@@ -247,14 +246,14 @@
     fi
 
     # Set up logging
-    LOGGING_ROOT="devel"
     if [ "$SYSLOG" != "False" ]; then
-        LOGGING_ROOT="$LOGGING_ROOT,production"
+        iniset $KEYSTONE_CONF DEFAULT use_syslog "True"
     fi
-    KEYSTONE_LOG_CONFIG="--log-config $KEYSTONE_CONF_DIR/logging.conf"
-    cp $KEYSTONE_DIR/etc/logging.conf.sample $KEYSTONE_CONF_DIR/logging.conf
-    iniset $KEYSTONE_CONF_DIR/logging.conf logger_root level "DEBUG"
-    iniset $KEYSTONE_CONF_DIR/logging.conf logger_root handlers "devel,production"
+
+    # Format logging
+    if [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ]; then
+        setup_colorized_logging $KEYSTONE_CONF DEFAULT
+    fi
 
     if is_apache_enabled_service key; then
         _config_keystone_apache_wsgi
@@ -412,7 +411,7 @@
         screen_it key "cd $KEYSTONE_DIR && sudo tail -f /var/log/$APACHE_NAME/keystone"
     else
         # Start Keystone in a screen window
-        screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF $KEYSTONE_LOG_CONFIG --debug"
+        screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF --debug"
     fi
 
     echo "Waiting for keystone to start..."
diff --git a/lib/marconi b/lib/marconi
index 6b9ffdc..1eaebbd 100644
--- a/lib/marconi
+++ b/lib/marconi
@@ -51,6 +51,10 @@
 MARCONICLIENT_REPO=${MARCONICLIENT_REPO:-${GIT_BASE}/openstack/python-marconiclient.git}
 MARCONICLIENT_BRANCH=${MARCONICLIENT_BRANCH:-master}
 
+# Tell Tempest this project is present
+TEMPEST_SERVICES+=,marconi
+
+
 # Functions
 # ---------
 
diff --git a/lib/neutron b/lib/neutron
index 465b57c..81db2a7 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -1,5 +1,5 @@
 # lib/neutron
-# functions - funstions specific to neutron
+# functions - functions specific to neutron
 
 # Dependencies:
 # ``functions`` file
@@ -237,6 +237,10 @@
     Q_USE_SECGROUP=False
 fi
 
+# Tell Tempest this project is present
+TEMPEST_SERVICES+=,neutron
+
+
 # Functions
 # ---------
 
@@ -505,7 +509,7 @@
         [ ! -z "$pid" ] && sudo kill -9 $pid
     fi
     if is_service_enabled q-meta; then
-        pkill -9 -f neutron-ns-metadata-proxy
+        sudo pkill -9 -f neutron-ns-metadata-proxy || :
     fi
 
     if is_service_enabled q-lbaas; then
@@ -610,9 +614,6 @@
     iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT verbose False
     iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT debug False
     iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
-    iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT root_helper "$Q_RR_COMMAND"
-    # Intermediate fix until Neutron patch lands and then line above will
-    # be cleaned.
     iniset $NEUTRON_TEST_CONFIG_FILE agent root_helper "$Q_RR_COMMAND"
 
     _neutron_setup_interface_driver $NEUTRON_TEST_CONFIG_FILE
diff --git a/lib/neutron_thirdparty/vmware_nsx b/lib/neutron_thirdparty/vmware_nsx
index 7c62027..4eb177a 100644
--- a/lib/neutron_thirdparty/vmware_nsx
+++ b/lib/neutron_thirdparty/vmware_nsx
@@ -79,7 +79,7 @@
 }
 
 function check_vmware_nsx() {
-    :
+    neutron-check-nsx-config $NEUTRON_CONF_DIR/plugins/vmware/nsx.ini
 }
 
 # Restore xtrace
diff --git a/lib/nova b/lib/nova
index a4edb53..d5f7514 100644
--- a/lib/nova
+++ b/lib/nova
@@ -122,6 +122,9 @@
 TEST_FLOATING_POOL=${TEST_FLOATING_POOL:-test}
 TEST_FLOATING_RANGE=${TEST_FLOATING_RANGE:-192.168.253.0/29}
 
+# Tell Tempest this project is present
+TEMPEST_SERVICES+=,nova
+
 
 # Functions
 # ---------
@@ -237,8 +240,10 @@
         sudo sysctl -w net.ipv4.ip_forward=1
 
         if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
-            # Attempt to load modules: network block device - used to manage qcow images
-            sudo modprobe nbd || true
+            # When libguestfs is available for file injection, enable using
+            # libguestfs to inspect the image and figure out the proper
+            # partition to inject into.
+            iniset $NOVA_CONF libvirt inject_partition '-1'
 
             # Check for kvm (hardware based virtualization).  If unable to initialize
             # kvm, we drop back to the slower emulation mode (qemu).  Note: many systems
@@ -379,7 +384,6 @@
     iniset $NOVA_CONF DEFAULT metadata_workers "4"
     iniset $NOVA_CONF conductor workers "4"
     iniset $NOVA_CONF DEFAULT sql_connection `database_connection_url nova`
-    iniset $NOVA_CONF DEFAULT fatal_deprecations "True"
     iniset $NOVA_CONF DEFAULT instance_name_template "${INSTANCE_NAME_PREFIX}%08x"
     iniset $NOVA_CONF osapi_v3 enabled "True"
 
@@ -653,8 +657,12 @@
         local log_filters="1:libvirt 1:qemu 1:conf 1:security 3:event 3:json 3:file 1:util"
         local log_outputs="1:file:/var/log/libvirt/libvirtd.log"
         # Enable server side traces for libvirtd
-        echo "log_filters=\"$log_filters\"" | sudo tee -a /etc/libvirt/libvirtd.conf
-        echo "log_outputs=\"$log_outputs\"" | sudo tee -a /etc/libvirt/libvirtd.conf
+        if ! grep -q "log_filters=\"$log_filters\"" /etc/libvirt/libvirtd.conf; then
+            echo "log_filters=\"$log_filters\"" | sudo tee -a /etc/libvirt/libvirtd.conf
+        fi
+        if ! grep -q "log_outputs=\"$log_outputs\"" /etc/libvirt/libvirtd.conf; then
+            echo "log_outputs=\"$log_outputs\"" | sudo tee -a /etc/libvirt/libvirtd.conf
+        fi
 
         # The group **$LIBVIRT_GROUP** is added to the current user in this script.
         # Use 'sg' to execute nova-compute as a member of the **$LIBVIRT_GROUP** group.
diff --git a/lib/rpc_backend b/lib/rpc_backend
index f59c800..3651bc0 100644
--- a/lib/rpc_backend
+++ b/lib/rpc_backend
@@ -139,12 +139,18 @@
     if is_service_enabled rabbit; then
         # Start rabbitmq-server
         echo_summary "Starting RabbitMQ"
-        if is_fedora || is_suse; then
-            # service is not started by default
-            restart_service rabbitmq-server
-        fi
-        # change the rabbit password since the default is "guest"
-        sudo rabbitmqctl change_password guest $RABBIT_PASSWORD
+        # NOTE(bnemec): Retry initial rabbitmq configuration to deal with
+        # the fact that sometimes it fails to start properly.
+        # Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1059028
+        for i in `seq 10`; do
+            if is_fedora || is_suse; then
+                # service is not started by default
+                restart_service rabbitmq-server
+            fi
+            # change the rabbit password since the default is "guest"
+            sudo rabbitmqctl change_password guest $RABBIT_PASSWORD && break
+            [[ $i -eq "10" ]] && die $LINENO "Failed to set rabbitmq password"
+        done
         if is_service_enabled n-cell; then
             # Add partitioned access for the child cell
             if [ -z `sudo rabbitmqctl list_vhosts | grep child_cell` ]; then
diff --git a/lib/savanna b/lib/savanna
index bb4dfe6..6f42311 100644
--- a/lib/savanna
+++ b/lib/savanna
@@ -26,7 +26,7 @@
 # Set up default directories
 SAVANNA_DIR=$DEST/savanna
 SAVANNA_CONF_DIR=${SAVANNA_CONF_DIR:-/etc/savanna}
-SAVANNA_CONF_FILE=savanna.conf
+SAVANNA_CONF_FILE=${SAVANNA_CONF_DIR}/savanna.conf
 SAVANNA_DEBUG=${SAVANNA_DEBUG:-True}
 
 SAVANNA_SERVICE_HOST=${SAVANNA_SERVICE_HOST:-$SERVICE_HOST}
@@ -40,6 +40,10 @@
     SAVANNA_BIN_DIR=$(get_python_exec_prefix)
 fi
 
+# Tell Tempest this project is present
+TEMPEST_SERVICES+=,savanna
+
+
 # Functions
 # ---------
 
@@ -88,23 +92,24 @@
     sudo chown $STACK_USER $SAVANNA_CONF_DIR
 
     # Copy over savanna configuration file and configure common parameters.
-    cp $SAVANNA_DIR/etc/savanna/savanna.conf.sample $SAVANNA_CONF_DIR/$SAVANNA_CONF_FILE
+    cp $SAVANNA_DIR/etc/savanna/savanna.conf.sample $SAVANNA_CONF_FILE
 
-    iniset $SAVANNA_CONF_DIR/$SAVANNA_CONF_FILE DEFAULT os_admin_password $SERVICE_PASSWORD
-    iniset $SAVANNA_CONF_DIR/$SAVANNA_CONF_FILE DEFAULT os_admin_username savanna
-    iniset $SAVANNA_CONF_DIR/$SAVANNA_CONF_FILE DEFAULT os_admin_tenant_name $SERVICE_TENANT_NAME
-    iniset $SAVANNA_CONF_DIR/$SAVANNA_CONF_FILE DEFAULT debug $SAVANNA_DEBUG
+    iniset $SAVANNA_CONF_FILE DEFAULT os_admin_password $SERVICE_PASSWORD
+    iniset $SAVANNA_CONF_FILE DEFAULT os_admin_username savanna
+    iniset $SAVANNA_CONF_FILE DEFAULT os_admin_tenant_name $SERVICE_TENANT_NAME
+    iniset $SAVANNA_CONF_FILE DEFAULT debug $SAVANNA_DEBUG
 
-    recreate_database savanna utf8
-    iniset $SAVANNA_CONF_DIR/$SAVANNA_CONF_FILE database sql_connection `database_connection_url savanna`
-    inicomment $SAVANNA_CONF_DIR/$SAVANNA_CONF_FILE database connection
+    iniset $SAVANNA_CONF_FILE database connection `database_connection_url savanna`
 
     if is_service_enabled neutron; then
-        iniset $SAVANNA_CONF_DIR/$SAVANNA_CONF_FILE DEFAULT use_neutron true
-        iniset $SAVANNA_CONF_DIR/$SAVANNA_CONF_FILE DEFAULT use_floating_ips true
+        iniset $SAVANNA_CONF_FILE DEFAULT use_neutron true
+        iniset $SAVANNA_CONF_FILE DEFAULT use_floating_ips true
     fi
 
-    iniset $SAVANNA_CONF_DIR/$SAVANNA_CONF_FILE DEFAULT use_syslog $SYSLOG
+    iniset $SAVANNA_CONF_FILE DEFAULT use_syslog $SYSLOG
+
+    recreate_database savanna utf8
+    $SAVANNA_BIN_DIR/savanna-db-manage --config-file $SAVANNA_CONF_FILE upgrade head
 }
 
 # install_savanna() - Collect source and prepare
@@ -115,7 +120,7 @@
 
 # start_savanna() - Start running processes, including screen
 function start_savanna() {
-    screen_it savanna "cd $SAVANNA_DIR && $SAVANNA_BIN_DIR/savanna-api --config-file $SAVANNA_CONF_DIR/$SAVANNA_CONF_FILE"
+    screen_it savanna "cd $SAVANNA_DIR && $SAVANNA_BIN_DIR/savanna-api --config-file $SAVANNA_CONF_FILE"
 }
 
 # stop_savanna() - Stop running processes
diff --git a/lib/swift b/lib/swift
index 44c230b..54d6f1c 100644
--- a/lib/swift
+++ b/lib/swift
@@ -111,6 +111,9 @@
 CONTAINER_PORT_BASE=${CONTAINER_PORT_BASE:-6011}
 ACCOUNT_PORT_BASE=${ACCOUNT_PORT_BASE:-6012}
 
+# Tell Tempest this project is present
+TEMPEST_SERVICES+=,swift
+
 
 # Functions
 # ---------
@@ -258,6 +261,8 @@
     SWIFT_CONFIG_PROXY_SERVER=${SWIFT_CONF_DIR}/proxy-server.conf
     cp ${SWIFT_DIR}/etc/proxy-server.conf-sample ${SWIFT_CONFIG_PROXY_SERVER}
 
+    cp ${SWIFT_DIR}/etc/container-sync-realms.conf-sample ${SWIFT_CONF_DIR}/container-sync-realms.conf
+
     iniuncomment ${SWIFT_CONFIG_PROXY_SERVER} DEFAULT user
     iniset ${SWIFT_CONFIG_PROXY_SERVER} DEFAULT user ${STACK_USER}
 
@@ -652,8 +657,10 @@
     if type -p swift-init >/dev/null; then
         swift-init --run-dir=${SWIFT_DATA_DIR}/run all stop || true
     fi
-    # Dump the proxy server
-    sudo pkill -f swift-proxy-server
+    for type in proxy object container account; do
+        # Dump all of the servers
+        pkill -f swift-
+    done
 }
 
 # Restore xtrace
diff --git a/lib/tempest b/lib/tempest
index ef9dfe2..06183b1 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -46,8 +46,8 @@
 
 # Set up default directories
 TEMPEST_DIR=$DEST/tempest
-TEMPEST_CONF_DIR=$TEMPEST_DIR/etc
-TEMPEST_CONF=$TEMPEST_CONF_DIR/tempest.conf
+TEMPEST_CONFIG_DIR=${TEMPEST_CONFIG_DIR:-$TEMPEST_DIR/etc}
+TEMPEST_CONFIG=$TEMPEST_CONFIG_DIR/tempest.conf
 TEMPEST_STATE_PATH=${TEMPEST_STATE_PATH:=$DATA_DIR/tempest}
 
 NOVA_SOURCE_DIR=$DEST/nova
@@ -58,6 +58,10 @@
 
 BOTO_MATERIALS_PATH="$FILES/images/s3-materials/cirros-0.3.1"
 
+# Cinder/Volume variables
+TEMPEST_VOLUME_DRIVER=${TEMPEST_VOLUME_DRIVER:-default}
+TEMPEST_VOLUME_VENDOR=${TEMPEST_VOLUME_VENDOR:-"Open Source"}
+TEMPEST_STORAGE_PROTOCOL=${TEMPEST_STORAGE_PROTOCOL:-iSCSI}
 
 # Functions
 # ---------
@@ -83,6 +87,11 @@
     local boto_instance_type="m1.tiny"
     local ssh_connect_method="fixed"
 
+    if [[ ! -d $TEMPEST_CONFIG_DIR ]]; then
+        sudo mkdir -p $TEMPEST_CONFIG_DIR
+    fi
+    sudo chown $STACK_USER $TEMPEST_CONFIG_DIR
+
     # TODO(afazekas):
     # sudo python setup.py deploy
 
@@ -133,7 +142,8 @@
 
     # Create tempest.conf from tempest.conf.sample
     # copy every time, because the image UUIDS are going to change
-    cp $TEMPEST_CONF.sample $TEMPEST_CONF
+    sudo cp $TEMPEST_DIR/etc/tempest.conf.sample $TEMPEST_CONFIG
+    sudo chmod 644 $TEMPEST_CONFIG
 
     password=${ADMIN_PASSWORD:-secrete}
 
@@ -224,121 +234,126 @@
     fi
 
     # Oslo
-    iniset $TEMPEST_CONF DEFAULT lock_path $TEMPEST_STATE_PATH
+    iniset $TEMPEST_CONFIG DEFAULT lock_path $TEMPEST_STATE_PATH
     mkdir -p $TEMPEST_STATE_PATH
-    iniset $TEMPEST_CONF DEFAULT use_stderr False
-    iniset $TEMPEST_CONF DEFAULT log_file tempest.log
-    iniset $TEMPEST_CONF DEFAULT debug True
+    iniset $TEMPEST_CONFIG DEFAULT use_stderr False
+    iniset $TEMPEST_CONFIG DEFAULT log_file tempest.log
+    iniset $TEMPEST_CONFIG DEFAULT debug True
 
     # Timeouts
-    iniset $TEMPEST_CONF compute build_timeout $BUILD_TIMEOUT
-    iniset $TEMPEST_CONF volume build_timeout $BUILD_TIMEOUT
-    iniset $TEMPEST_CONF boto build_timeout $BUILD_TIMEOUT
-    iniset $TEMPEST_CONF compute build_interval $BUILD_INTERVAL
-    iniset $TEMPEST_CONF volume build_interval $BUILD_INTERVAL
-    iniset $TEMPEST_CONF boto build_interval $BUILD_INTERVAL
-    iniset $TEMPEST_CONF boto http_socket_timeout 5
+    iniset $TEMPEST_CONFIG compute build_timeout $BUILD_TIMEOUT
+    iniset $TEMPEST_CONFIG volume build_timeout $BUILD_TIMEOUT
+    iniset $TEMPEST_CONFIG boto build_timeout $BUILD_TIMEOUT
+    iniset $TEMPEST_CONFIG compute build_interval $BUILD_INTERVAL
+    iniset $TEMPEST_CONFIG volume build_interval $BUILD_INTERVAL
+    iniset $TEMPEST_CONFIG boto build_interval $BUILD_INTERVAL
+    iniset $TEMPEST_CONFIG boto http_socket_timeout 5
 
     # Identity
-    iniset $TEMPEST_CONF identity uri "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:5000/v2.0/"
-    iniset $TEMPEST_CONF identity password "$password"
-    iniset $TEMPEST_CONF identity alt_username $ALT_USERNAME
-    iniset $TEMPEST_CONF identity alt_password "$password"
-    iniset $TEMPEST_CONF identity alt_tenant_name $ALT_TENANT_NAME
-    iniset $TEMPEST_CONF identity admin_password "$password"
+    iniset $TEMPEST_CONFIG identity uri "$KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:5000/v2.0/"
+    iniset $TEMPEST_CONFIG identity password "$password"
+    iniset $TEMPEST_CONFIG identity alt_username $ALT_USERNAME
+    iniset $TEMPEST_CONFIG identity alt_password "$password"
+    iniset $TEMPEST_CONFIG identity alt_tenant_name $ALT_TENANT_NAME
+    iniset $TEMPEST_CONFIG identity admin_password "$password"
 
     # Image
     # for the gate we want to be able to override this variable so we aren't
     # doing an HTTP fetch over the wide internet for this test
     if [[ ! -z "$TEMPEST_HTTP_IMAGE" ]]; then
-        iniset $TEMPEST_CONF image http_image $TEMPEST_HTTP_IMAGE
+        iniset $TEMPEST_CONFIG image http_image $TEMPEST_HTTP_IMAGE
     fi
 
     # Compute
-    iniset $TEMPEST_CONF compute change_password_available False
+    iniset $TEMPEST_CONFIG compute change_password_available False
     # Note(nati) current tempest don't create network for each tenant
     # so reuse same tenant for now
     if is_service_enabled neutron; then
         TEMPEST_ALLOW_TENANT_ISOLATION=${TEMPEST_ALLOW_TENANT_ISOLATION:-False}
     fi
-    iniset $TEMPEST_CONF compute allow_tenant_isolation ${TEMPEST_ALLOW_TENANT_ISOLATION:-True}
-    iniset $TEMPEST_CONF compute ssh_user ${DEFAULT_INSTANCE_USER:-cirros} # DEPRECATED
-    iniset $TEMPEST_CONF compute network_for_ssh $PRIVATE_NETWORK_NAME
-    iniset $TEMPEST_CONF compute ip_version_for_ssh 4
-    iniset $TEMPEST_CONF compute ssh_timeout $BUILD_TIMEOUT
-    iniset $TEMPEST_CONF compute image_ref $image_uuid
-    iniset $TEMPEST_CONF compute image_ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
-    iniset $TEMPEST_CONF compute image_ref_alt $image_uuid_alt
-    iniset $TEMPEST_CONF compute image_alt_ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
-    iniset $TEMPEST_CONF compute flavor_ref $flavor_ref
-    iniset $TEMPEST_CONF compute flavor_ref_alt $flavor_ref_alt
-    iniset $TEMPEST_CONF compute live_migration_available ${LIVE_MIGRATION_AVAILABLE:-False}
-    iniset $TEMPEST_CONF compute use_block_migration_for_live_migration ${USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION:-False}
-    iniset $TEMPEST_CONF compute ssh_connect_method $ssh_connect_method
+    iniset $TEMPEST_CONFIG compute allow_tenant_isolation ${TEMPEST_ALLOW_TENANT_ISOLATION:-True}
+    iniset $TEMPEST_CONFIG compute ssh_user ${DEFAULT_INSTANCE_USER:-cirros} # DEPRECATED
+    iniset $TEMPEST_CONFIG compute network_for_ssh $PRIVATE_NETWORK_NAME
+    iniset $TEMPEST_CONFIG compute ip_version_for_ssh 4
+    iniset $TEMPEST_CONFIG compute ssh_timeout $BUILD_TIMEOUT
+    iniset $TEMPEST_CONFIG compute image_ref $image_uuid
+    iniset $TEMPEST_CONFIG compute image_ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
+    iniset $TEMPEST_CONFIG compute image_ref_alt $image_uuid_alt
+    iniset $TEMPEST_CONFIG compute image_alt_ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
+    iniset $TEMPEST_CONFIG compute flavor_ref $flavor_ref
+    iniset $TEMPEST_CONFIG compute flavor_ref_alt $flavor_ref_alt
+    iniset $TEMPEST_CONFIG compute live_migration_available ${LIVE_MIGRATION_AVAILABLE:-False}
+    iniset $TEMPEST_CONFIG compute use_block_migration_for_live_migration ${USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION:-False}
+    iniset $TEMPEST_CONFIG compute ssh_connect_method $ssh_connect_method
 
     # Compute admin
-    iniset $TEMPEST_CONF "compute-admin" password "$password" # DEPRECATED
+    iniset $TEMPEST_CONFIG "compute-admin" password "$password" # DEPRECATED
 
-    iniset $TEMPEST_CONF network api_version 2.0
-    iniset $TEMPEST_CONF network tenant_networks_reachable "$tenant_networks_reachable"
-    iniset $TEMPEST_CONF network public_network_id "$public_network_id"
-    iniset $TEMPEST_CONF network public_router_id "$public_router_id"
-    iniset $TEMPEST_CONF network default_network "$FIXED_RANGE"
+    iniset $TEMPEST_CONFIG network api_version 2.0
+    iniset $TEMPEST_CONFIG network tenant_networks_reachable "$tenant_networks_reachable"
+    iniset $TEMPEST_CONFIG network public_network_id "$public_network_id"
+    iniset $TEMPEST_CONFIG network public_router_id "$public_router_id"
+    iniset $TEMPEST_CONFIG network default_network "$FIXED_RANGE"
 
     # boto
-    iniset $TEMPEST_CONF boto ec2_url "http://$SERVICE_HOST:8773/services/Cloud"
-    iniset $TEMPEST_CONF boto s3_url "http://$SERVICE_HOST:${S3_SERVICE_PORT:-3333}"
-    iniset $TEMPEST_CONF boto s3_materials_path "$BOTO_MATERIALS_PATH"
-    iniset $TEMPEST_CONF boto instance_type "$boto_instance_type"
-    iniset $TEMPEST_CONF boto http_socket_timeout 30
-    iniset $TEMPEST_CONF boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
+    iniset $TEMPEST_CONFIG boto ec2_url "http://$SERVICE_HOST:8773/services/Cloud"
+    iniset $TEMPEST_CONFIG boto s3_url "http://$SERVICE_HOST:${S3_SERVICE_PORT:-3333}"
+    iniset $TEMPEST_CONFIG boto s3_materials_path "$BOTO_MATERIALS_PATH"
+    iniset $TEMPEST_CONFIG boto instance_type "$boto_instance_type"
+    iniset $TEMPEST_CONFIG boto http_socket_timeout 30
+    iniset $TEMPEST_CONFIG boto ssh_user ${DEFAULT_INSTANCE_USER:-cirros}
 
     # Orchestration test image
     if [[ ! -z "$HEAT_FETCHED_TEST_IMAGE" ]]; then
-        iniset $TEMPEST_CONF orchestration image_ref "$HEAT_FETCHED_TEST_IMAGE"
+        iniset $TEMPEST_CONFIG orchestration image_ref "$HEAT_FETCHED_TEST_IMAGE"
     elif [[ "$HEAT_CREATE_TEST_IMAGE" = "True" ]]; then
         disk_image_create /usr/share/tripleo-image-elements "vm fedora heat-cfntools" "i386" "fedora-vm-heat-cfntools-tempest"
-        iniset $TEMPEST_CONF orchestration image_ref "fedora-vm-heat-cfntools-tempest"
+        iniset $TEMPEST_CONFIG orchestration image_ref "fedora-vm-heat-cfntools-tempest"
     fi
 
     # Scenario
-    iniset $TEMPEST_CONF scenario img_dir "$FILES/images/cirros-0.3.1-x86_64-uec"
+    iniset $TEMPEST_CONFIG scenario img_dir "$FILES/images/cirros-0.3.1-x86_64-uec"
 
     # Large Ops Number
-    iniset $TEMPEST_CONF scenario large_ops_number ${TEMPEST_LARGE_OPS_NUMBER:-0}
+    iniset $TEMPEST_CONFIG scenario large_ops_number ${TEMPEST_LARGE_OPS_NUMBER:-0}
 
     # Volume
     if is_service_enabled c-bak; then
-        iniset $TEMPEST_CONF volume volume_backup_enabled "True"
+        iniset $TEMPEST_CONFIG volume volume_backup_enabled "True"
     fi
     CINDER_MULTI_LVM_BACKEND=$(trueorfalse False $CINDER_MULTI_LVM_BACKEND)
     if [ $CINDER_MULTI_LVM_BACKEND == "True" ]; then
-        iniset $TEMPEST_CONF volume multi_backend_enabled "True"
-        iniset $TEMPEST_CONF volume backend1_name "LVM_iSCSI"
-        iniset $TEMPEST_CONF volume backend2_name "LVM_iSCSI_2"
+        iniset $TEMPEST_CONFIG volume multi_backend_enabled "True"
+        iniset $TEMPEST_CONFIG volume backend1_name "LVM_iSCSI"
+        iniset $TEMPEST_CONFIG volume backend2_name "LVM_iSCSI_2"
+    fi
+
+    if [ $TEMPEST_VOLUME_DRIVER != "default" ]; then
+        iniset $TEMPEST_CONFIG volume vendor_name $TEMPEST_VOLUME_VENDOR
+        iniset $TEMPEST_CONFIG volume storage_protocol $TEMPEST_STORAGE_PROTOCOL
     fi
 
     # Dashboard
-    iniset $TEMPEST_CONF dashboard dashboard_url "http://$SERVICE_HOST/"
-    iniset $TEMPEST_CONF dashboard login_url "http://$SERVICE_HOST/auth/login/"
+    iniset $TEMPEST_CONFIG dashboard dashboard_url "http://$SERVICE_HOST/"
+    iniset $TEMPEST_CONFIG dashboard login_url "http://$SERVICE_HOST/auth/login/"
 
     # cli
-    iniset $TEMPEST_CONF cli cli_dir $NOVA_BIN_DIR
+    iniset $TEMPEST_CONFIG cli cli_dir $NOVA_BIN_DIR
 
     # Networking
-    iniset $TEMPEST_CONF network-feature-enabled api_extensions "${NETWORK_API_EXTENSIONS:-all}"
+    iniset $TEMPEST_CONFIG network-feature-enabled api_extensions "${NETWORK_API_EXTENSIONS:-all}"
 
     # service_available
-    for service in nova cinder glance neutron swift heat horizon ceilometer ironic savanna trove marconi; do
+    for service in ${TEMPEST_SERVICES//,/ }; do
         if is_service_enabled $service ; then
-            iniset $TEMPEST_CONF service_available $service "True"
+            iniset $TEMPEST_CONFIG service_available $service "True"
         else
-            iniset $TEMPEST_CONF service_available $service "False"
+            iniset $TEMPEST_CONFIG service_available $service "False"
         fi
     done
 
     echo "Created tempest configuration file:"
-    cat $TEMPEST_CONF
+    cat $TEMPEST_CONFIG
 
     # Restore IFS
     IFS=$ifs
diff --git a/lib/trove b/lib/trove
index 8e817f5..2000446 100644
--- a/lib/trove
+++ b/lib/trove
@@ -38,6 +38,20 @@
     TROVE_BIN_DIR=$(get_python_exec_prefix)
 fi
 
+# Tell Tempest this project is present
+TEMPEST_SERVICES+=,trove
+
+
+# Functions
+# ---------
+
+# Test if any Trove services are enabled
+# is_trove_enabled
+function is_trove_enabled {
+    [[ ,${ENABLED_SERVICES} =~ ,"tr-" ]] && return 0
+    return 1
+}
+
 # setup_trove_logging() - Adds logging configuration to conf files
 function setup_trove_logging() {
     local CONF=$1
@@ -115,14 +129,14 @@
     # Copy api-paste file over to the trove conf dir and configure it
     cp $TROVE_LOCAL_CONF_DIR/api-paste.ini $TROVE_CONF_DIR/api-paste.ini
     TROVE_API_PASTE_INI=$TROVE_CONF_DIR/api-paste.ini
-    iniset $TROVE_API_PASTE_INI filter:tokenauth auth_host $KEYSTONE_AUTH_HOST
-    iniset $TROVE_API_PASTE_INI filter:tokenauth auth_port $KEYSTONE_AUTH_PORT
-    iniset $TROVE_API_PASTE_INI filter:tokenauth auth_protocol $KEYSTONE_AUTH_PROTOCOL
-    iniset $TROVE_API_PASTE_INI filter:tokenauth cafile $KEYSTONE_SSL_CA
-    iniset $TROVE_API_PASTE_INI filter:tokenauth admin_tenant_name $SERVICE_TENANT_NAME
-    iniset $TROVE_API_PASTE_INI filter:tokenauth admin_user trove
-    iniset $TROVE_API_PASTE_INI filter:tokenauth admin_password $SERVICE_PASSWORD
-    iniset $TROVE_API_PASTE_INI filter:tokenauth signing_dir $TROVE_AUTH_CACHE_DIR
+    iniset $TROVE_API_PASTE_INI filter:authtoken auth_host $KEYSTONE_AUTH_HOST
+    iniset $TROVE_API_PASTE_INI filter:authtoken auth_port $KEYSTONE_AUTH_PORT
+    iniset $TROVE_API_PASTE_INI filter:authtoken auth_protocol $KEYSTONE_AUTH_PROTOCOL
+    iniset $TROVE_API_PASTE_INI filter:authtoken cafile $KEYSTONE_SSL_CA
+    iniset $TROVE_API_PASTE_INI filter:authtoken admin_tenant_name $SERVICE_TENANT_NAME
+    iniset $TROVE_API_PASTE_INI filter:authtoken admin_user trove
+    iniset $TROVE_API_PASTE_INI filter:authtoken admin_password $SERVICE_PASSWORD
+    iniset $TROVE_API_PASTE_INI filter:authtoken signing_dir $TROVE_AUTH_CACHE_DIR
 
     # (Re)create trove conf files
     rm -f $TROVE_CONF_DIR/trove.conf
diff --git a/samples/localrc b/samples/local.conf
similarity index 86%
rename from samples/localrc
rename to samples/local.conf
index 80cf0e7..c8126c2 100644
--- a/samples/localrc
+++ b/samples/local.conf
@@ -1,19 +1,22 @@
-# Sample ``localrc`` for user-configurable variables in ``stack.sh``
+# Sample ``local.conf`` for user-configurable variables in ``stack.sh``
 
 # NOTE: Copy this file to the root ``devstack`` directory for it to
 # work properly.
 
-# ``localrc`` is a user-maintained setings file that is sourced from ``stackrc``.
+# ``local.conf`` is a user-maintained setings file that is sourced from ``stackrc``.
 # This gives it the ability to override any variables set in ``stackrc``.
 # Also, most of the settings in ``stack.sh`` are written to only be set if no
-# value has already been set; this lets ``localrc`` effectively override the
+# value has already been set; this lets ``local.conf`` effectively override the
 # default values.
 
 # This is a collection of some of the settings we have found to be useful
 # in our DevStack development environments. Additional settings are described
-# in http://devstack.org/localrc.html
+# in http://devstack.org/local.conf.html
 # These should be considered as samples and are unsupported DevStack code.
 
+# The ``localrc`` section replaces the old ``localrc`` configuration file.
+# Note that if ``localrc`` is present it will be used in favor of this section.
+[[local|localrc]]
 
 # Minimal Contents
 # ----------------
@@ -22,7 +25,7 @@
 # there are a few minimal variables set:
 
 # If the ``*_PASSWORD`` variables are not set here you will be prompted to enter
-# values for them by ``stack.sh`` and they will be added to ``localrc``.
+# values for them by ``stack.sh`` and they will be added to ``local.conf``.
 ADMIN_PASSWORD=nomoresecrete
 MYSQL_PASSWORD=stackdb
 RABBIT_PASSWORD=stackqueue
diff --git a/samples/local.sh b/samples/local.sh
index 970cbb9..664cb66 100755
--- a/samples/local.sh
+++ b/samples/local.sh
@@ -23,45 +23,47 @@
 # Destination path for installation ``DEST``
 DEST=${DEST:-/opt/stack}
 
+if is_service_enabled nova; then
 
-# Import ssh keys
-# ---------------
+    # Import ssh keys
+    # ---------------
 
-# Import keys from the current user into the default OpenStack user (usually
-# ``demo``)
+    # Import keys from the current user into the default OpenStack user (usually
+    # ``demo``)
 
-# Get OpenStack auth
-source $TOP_DIR/openrc
+    # Get OpenStack user auth
+    source $TOP_DIR/openrc
 
-# Add first keypair found in localhost:$HOME/.ssh
-for i in $HOME/.ssh/id_rsa.pub $HOME/.ssh/id_dsa.pub; do
-    if [[ -r $i ]]; then
-        nova keypair-add --pub_key=$i `hostname`
-        break
+    # Add first keypair found in localhost:$HOME/.ssh
+    for i in $HOME/.ssh/id_rsa.pub $HOME/.ssh/id_dsa.pub; do
+        if [[ -r $i ]]; then
+            nova keypair-add --pub_key=$i `hostname`
+            break
+        fi
+    done
+
+
+    # Create A Flavor
+    # ---------------
+
+    # Get OpenStack admin auth
+    source $TOP_DIR/openrc admin admin
+
+    # Name of new flavor
+    # set in ``localrc`` with ``DEFAULT_INSTANCE_TYPE=m1.micro``
+    MI_NAME=m1.micro
+
+    # Create micro flavor if not present
+    if [[ -z $(nova flavor-list | grep $MI_NAME) ]]; then
+        nova flavor-create $MI_NAME 6 128 0 1
     fi
-done
 
 
-# Create A Flavor
-# ---------------
+    # Other Uses
+    # ----------
 
-# Get OpenStack admin auth
-source $TOP_DIR/openrc admin admin
+    # Add tcp/22 and icmp to default security group
+    nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
+    nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
 
-# Name of new flavor
-# set in ``localrc`` with ``DEFAULT_INSTANCE_TYPE=m1.micro``
-MI_NAME=m1.micro
-
-# Create micro flavor if not present
-if [[ -z $(nova flavor-list | grep $MI_NAME) ]]; then
-    nova flavor-create $MI_NAME 6 128 0 1
 fi
-
-
-# Other Uses
-# ----------
-
-# Add tcp/22 and icmp to default security group
-nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
-nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
-
diff --git a/stack.sh b/stack.sh
index efdee64..45d47c8 100755
--- a/stack.sh
+++ b/stack.sh
@@ -3,7 +3,7 @@
 # ``stack.sh`` is an opinionated OpenStack developer installation.  It
 # installs and configures various combinations of **Ceilometer**, **Cinder**,
 # **Glance**, **Heat**, **Horizon**, **Keystone**, **Nova**, **Neutron**,
-# **Swift**, and **Trove**
+# and **Swift**
 
 # This script allows you to specify configuration options of what git
 # repositories to use, enabled services, network configuration and various
@@ -23,6 +23,13 @@
 # Make sure custom grep options don't get in the way
 unset GREP_OPTIONS
 
+# Sanitize language settings to avoid commands bailing out
+# with "unsupported locale setting" errors.
+unset LANG
+unset LANGUAGE
+LC_ALL=C
+export LC_ALL
+
 # Keep track of the devstack directory
 TOP_DIR=$(cd $(dirname "$0") && pwd)
 
@@ -291,6 +298,9 @@
 SYSSTAT_FILE=${SYSSTAT_FILE:-"sysstat.dat"}
 SYSSTAT_INTERVAL=${SYSSTAT_INTERVAL:-"1"}
 
+PIDSTAT_FILE=${PIDSTAT_FILE:-"pidstat.txt"}
+PIDSTAT_INTERVAL=${PIDSTAT_INTERVAL:-"5"}
+
 # Use color for logging output (only available if syslog is not used)
 LOG_COLOR=`trueorfalse True $LOG_COLOR`
 
@@ -305,9 +315,13 @@
 # Configure Projects
 # ==================
 
-# Source project function libraries
+# Import apache functions
 source $TOP_DIR/lib/apache
+
+# Import TLS functions
 source $TOP_DIR/lib/tls
+
+# Source project function libraries
 source $TOP_DIR/lib/infra
 source $TOP_DIR/lib/oslo
 source $TOP_DIR/lib/stackforge
@@ -323,7 +337,6 @@
 source $TOP_DIR/lib/baremetal
 source $TOP_DIR/lib/ldap
 source $TOP_DIR/lib/ironic
-source $TOP_DIR/lib/trove
 
 # Extras Source
 # --------------
@@ -725,12 +738,6 @@
     configure_heat
 fi
 
-if is_service_enabled trove; then
-    install_trove
-    install_troveclient
-    cleanup_trove
-fi
-
 if is_service_enabled tls-proxy; then
     configure_CA
     init_CA
@@ -874,6 +881,16 @@
     fi
 fi
 
+if is_service_enabled pidstat; then
+    # Per-process stats
+    PIDSTAT_OPTS="-l -p ALL -T ALL"
+    if [[ -n ${SCREEN_LOGDIR} ]]; then
+        screen_it pidstat "cd $TOP_DIR; pidstat $PIDSTAT_OPTS $PIDSTAT_INTERVAL > $SCREEN_LOGDIR/$PIDSTAT_FILE"
+    else
+        screen_it pidstat "pidstat $PIDSTAT_OPTS $PIDSTAT_INTERVAL"
+    fi
+fi
+
 
 # Start Services
 # ==============
@@ -903,10 +920,6 @@
     create_cinder_accounts
     create_neutron_accounts
 
-    if is_service_enabled trove; then
-        create_trove_accounts
-    fi
-
     if is_service_enabled ceilometer; then
         create_ceilometer_accounts
     fi
@@ -1108,6 +1121,15 @@
     iniset $NOVA_CONF DEFAULT s3_affix_tenant "True"
 fi
 
+# Create a randomized default value for the keymgr's fixed_key
+if is_service_enabled nova; then
+    FIXED_KEY=""
+    for i in $(seq 1 64);
+        do FIXED_KEY+=$(echo "obase=16; $(($RANDOM % 16))" | bc);
+    done;
+    iniset $NOVA_CONF keymgr fixed_key "$FIXED_KEY"
+fi
+
 if is_service_enabled zeromq; then
     echo_summary "Starting zermomq receiver"
     screen_it zeromq "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-rpc-zmq-receiver"
@@ -1171,19 +1193,6 @@
     start_heat
 fi
 
-# Configure and launch the trove service api, and taskmanager
-if is_service_enabled trove; then
-    # Initialize trove
-    echo_summary "Configuring Trove"
-    configure_troveclient
-    configure_trove
-    init_trove
-
-    # Start the trove API and trove taskmgr components
-    echo_summary "Starting Trove"
-    start_trove
-fi
-
 
 # Create account rc files
 # =======================
diff --git a/stackrc b/stackrc
index 49fb26b..e89d25e 100644
--- a/stackrc
+++ b/stackrc
@@ -37,6 +37,12 @@
 #  enable_service tempest
 ENABLED_SERVICES=g-api,g-reg,key,n-api,n-crt,n-obj,n-cpu,n-net,n-cond,cinder,c-sch,c-api,c-vol,n-sch,n-novnc,n-xvnc,n-cauth,horizon,rabbit,tempest,mysql
 
+# Tell Tempest which services are available.  The default is set here as
+# Tempest falls late in the configuration sequence.  This differs from
+# ``ENABLED_SERVICES`` in that the project names are used here rather than
+# the service names, i.e.: TEMPEST_SERVICES="key,glance,nova"
+TEMPEST_SERVICES=""
+
 # Set the default Nova APIs to enable
 NOVA_ENABLED_APIS=ec2,osapi_compute,metadata
 
@@ -59,6 +65,9 @@
     source $RC_DIR/.localrc.auto
 fi
 
+# This can be used to turn database query logging on and off
+# (currently only implemented for MySQL backend)
+DATABASE_QUERY_LOGGING=$(trueorfalse True $DATABASE_QUERY_LOGGING)
 
 # Repositories
 # ------------
@@ -284,6 +293,9 @@
     vsphere)
         DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-debian-2.6.32-i686}
         IMAGE_URLS=${IMAGE_URLS:-"http://partnerweb.vmware.com/programs/vmdkimage/debian-2.6.32-i686.vmdk"};;
+    xenserver)
+        DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.0-x86_64-disk}
+        IMAGE_URLS=${IMAGE_URLS:-"https://github.com/downloads/citrix-openstack/warehouse/cirros-0.3.0-x86_64-disk.vhd.tgz"};;
     *) # Default to Cirros with kernel, ramdisk and disk image
         DEFAULT_IMAGE_NAME=${DEFAULT_IMAGE_NAME:-cirros-0.3.1-x86_64-uec}
         IMAGE_URLS=${IMAGE_URLS:-"http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz"};;
diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh
index 5fb47dc..a28e10e 100755
--- a/tools/fixup_stuff.sh
+++ b/tools/fixup_stuff.sh
@@ -69,6 +69,22 @@
     sudo chmod +r $dir/*
 fi
 
+# Ubuntu 12.04
+# -----
+# We can regularly get kernel crashes on the 12.04 default kernel, so attempt
+# to install a new kernel
+if [[ ${DISTRO} =~ (precise) ]]; then
+    # Finally, because we suspect the Precise kernel is problematic, install a new kernel
+    UPGRADE_KERNEL=$(trueorfalse False $UPGRADE_KERNEL)
+    if [[ $UPGRADE_KERNEL == "True" ]]; then
+        if [[ ! `uname -r` =~ (^3\.11) ]]; then
+            apt_get install linux-generic-lts-saucy
+            echo "Installing Saucy LTS kernel, please reboot before proceeding"
+            exit 1
+        fi
+    fi
+fi
+
 
 # RHEL6
 # -----
diff --git a/tools/info.sh b/tools/info.sh
index 14ab8f6..3ab7966 100755
--- a/tools/info.sh
+++ b/tools/info.sh
@@ -85,8 +85,8 @@
 # Packages
 # --------
 
-# - We are going to check packages only for the services needed.
-# - We are parsing the packages files and detecting metadatas.
+# - Only check packages for the services enabled
+# - Parse version info from the package metadata, not the package/file names
 
 for p in $(get_packages $ENABLED_SERVICES); do
     if [[ "$os_PACKAGE" = "deb" ]]; then
@@ -141,9 +141,15 @@
 
 # Dump localrc with 'localrc|' prepended and comments and passwords left out
 if [[ -r $TOP_DIR/localrc ]]; then
+    RC=$TOP_DIR/localrc
+elif [[ -f $RC_DIR/.localrc.auto ]]; then
+    RC=$TOP_DIR/.localrc.auto
+fi
+if [[ -n $RC ]]; then
     sed -e '
-        /PASSWORD/d;
+        /^[ \t]*$/d;
+        /PASSWORD/s/=.*$/=\<password\>/;
         /^#/d;
         s/^/localrc\|/;
-    ' $TOP_DIR/localrc
+    ' $RC
 fi
diff --git a/tools/sar_filter.py b/tools/sar_filter.py
index ed8c196..24ef0e4 100755
--- a/tools/sar_filter.py
+++ b/tools/sar_filter.py
@@ -25,10 +25,10 @@
 
 
 def parse_line(line):
-    m = re.search('(\d\d:\d\d:\d\d \w\w)(\s+((\S+)\s*)+)', line)
+    m = re.search('(\d\d:\d\d:\d\d( \w\w)?)(\s+((\S+)\s*)+)', line)
     if m:
         date = m.group(1)
-        data = m.group(2).rstrip()
+        data = m.group(3).rstrip()
         return date, data
     else:
         return None, None
@@ -47,6 +47,10 @@
 data_line = ""
 printed_header = False
 current_ts = None
+
+# print out the first sysstat line regardless
+print process.stdout.readline()
+
 while True:
     nextline = process.stdout.readline()
     if nextline == '' and process.poll() is not None:
diff --git a/tools/xen/README.md b/tools/xen/README.md
index 06192ed..ee1abcc 100644
--- a/tools/xen/README.md
+++ b/tools/xen/README.md
@@ -70,6 +70,9 @@
 Of course, use real passwords if this machine is exposed.
 
     cat > ./localrc <<EOF
+    # At the moment, we depend on github's snapshot function.
+    GIT_BASE="http://github.com"
+
     # Passwords
     # NOTE: these need to be specified, otherwise devstack will try
     # to prompt for these passwords, blocking the install process.
diff --git a/tools/xen/functions b/tools/xen/functions
index 563303d..97c56bc 100644
--- a/tools/xen/functions
+++ b/tools/xen/functions
@@ -1,5 +1,14 @@
 #!/bin/bash
 
+function die_with_error {
+    local err_msg
+
+    err_msg="$1"
+
+    echo "$err_msg" >&2
+    exit 1
+}
+
 function xapi_plugin_location {
     for PLUGIN_DIR in "/etc/xapi.d/plugins/" "/usr/lib/xcp/plugins/" "/usr/lib/xapi/plugins"; do
         if [ -d $PLUGIN_DIR ]; then
@@ -11,7 +20,7 @@
 }
 
 function zip_snapshot_location {
-    echo $1 | sed "s:\.git$::;s:$:/zipball/$2:g"
+    echo $1 | sed "s,^git://,http://,g;s:\.git$::;s:$:/zipball/$2:g"
 }
 
 function create_directory_for_kernels {
@@ -41,7 +50,9 @@
     local EXTRACTED_FILES=$(mktemp -d)
 
     {
-        wget -nv $ZIPBALL_URL -O $LOCAL_ZIPBALL --no-check-certificate
+        if ! wget -nv $ZIPBALL_URL -O $LOCAL_ZIPBALL --no-check-certificate; then
+            die_with_error "Failed to download [$ZIPBALL_URL]"
+        fi
         unzip -q -o $LOCAL_ZIPBALL -d $EXTRACTED_FILES
         rm -f $LOCAL_ZIPBALL
     } >&2
diff --git a/tools/xen/mocks b/tools/xen/mocks
index 94b0ca4..3b9b05c 100644
--- a/tools/xen/mocks
+++ b/tools/xen/mocks
@@ -35,7 +35,7 @@
 
 function wget {
     if [[ $@ =~ "failurl" ]]; then
-        exit 1
+        return 1
     fi
     echo "wget $@" >> $LIST_OF_ACTIONS
 }
@@ -73,10 +73,14 @@
         done
         return 1
     fi
-    echo "Mock test does not implement the requested function"
+    echo "Mock test does not implement the requested function: ${1:-}"
     exit 1
 }
 
+function die_with_error {
+    echo "$1" >> $DEAD_MESSAGES
+}
+
 function xe {
     cat $XE_RESPONSE
     {
diff --git a/tools/xen/test_functions.sh b/tools/xen/test_functions.sh
index 0ae2cb7..373d996 100755
--- a/tools/xen/test_functions.sh
+++ b/tools/xen/test_functions.sh
@@ -29,6 +29,9 @@
 
     XE_CALLS=$(mktemp)
     truncate -s 0 $XE_CALLS
+
+    DEAD_MESSAGES=$(mktemp)
+    truncate -s 0 $DEAD_MESSAGES
 }
 
 # Teardown
@@ -64,6 +67,10 @@
     grep -qe "^$1\$" $XE_CALLS
 }
 
+function assert_died_with {
+    diff -u <(echo "$1") $DEAD_MESSAGES
+}
+
 function mock_out {
     local FNNAME="$1"
     local OUTPUT="$2"
@@ -109,16 +116,22 @@
     grep "[ -d /usr/lib/xcp/plugins/ ]" $LIST_OF_ACTIONS
 }
 
-function test_zip_snapshot_location {
+function test_zip_snapshot_location_http {
     diff \
-    <(zip_snapshot_location "git://git.openstack.org/openstack/nova.git" "master") \
-    <(echo "git://git.openstack.org/openstack/nova/zipball/master")
+    <(zip_snapshot_location "http://github.com/openstack/nova.git" "master") \
+    <(echo "http://github.com/openstack/nova/zipball/master")
+}
+
+function test_zip_snapsot_location_git {
+    diff \
+    <(zip_snapshot_location "git://github.com/openstack/nova.git" "master") \
+    <(echo "http://github.com/openstack/nova/zipball/master")
 }
 
 function test_create_directory_for_kernels {
     (
         . mocks
-        mock_out get_local_sr uuid1
+        mock_out get_local_sr_path /var/run/sr-mount/uuid1
         create_directory_for_kernels
     )
 
@@ -141,7 +154,7 @@
 function test_create_directory_for_images {
     (
         . mocks
-        mock_out get_local_sr uuid1
+        mock_out get_local_sr_path /var/run/sr-mount/uuid1
         create_directory_for_images
     )
 
@@ -179,7 +192,7 @@
     local IGNORE
     IGNORE=$(. mocks && extract_remote_zipball "failurl")
 
-    assert_previous_command_failed
+    assert_died_with "Failed to download [failurl]"
 }
 
 function test_find_nova_plugins {
@@ -199,8 +212,7 @@
 
     [ "$RESULT" == "uuid123" ]
 
-    assert_xe_min
-    assert_xe_param "sr-list" "name-label=Local storage"
+    assert_xe_param "pool-list" params=default-SR minimal=true
 }
 
 function test_get_local_sr_path {
diff --git a/unstack.sh b/unstack.sh
index 4445f1f..92d0642 100755
--- a/unstack.sh
+++ b/unstack.sh
@@ -30,22 +30,32 @@
     exit 1
 fi
 
+
+# Configure Projects
+# ==================
+
 # Import apache functions
 source $TOP_DIR/lib/apache
 
-# Get project function libraries
-source $TOP_DIR/lib/baremetal
-source $TOP_DIR/lib/ceilometer
-source $TOP_DIR/lib/cinder
+# Import TLS functions
+source $TOP_DIR/lib/tls
+
+# Source project function libraries
+source $TOP_DIR/lib/infra
+source $TOP_DIR/lib/oslo
+source $TOP_DIR/lib/stackforge
+source $TOP_DIR/lib/horizon
 source $TOP_DIR/lib/keystone
 source $TOP_DIR/lib/glance
 source $TOP_DIR/lib/nova
-source $TOP_DIR/lib/heat
-source $TOP_DIR/lib/horizon
+source $TOP_DIR/lib/cinder
 source $TOP_DIR/lib/swift
+source $TOP_DIR/lib/ceilometer
+source $TOP_DIR/lib/heat
 source $TOP_DIR/lib/neutron
+source $TOP_DIR/lib/baremetal
+source $TOP_DIR/lib/ldap
 source $TOP_DIR/lib/ironic
-source $TOP_DIR/lib/trove
 
 # Extras Source
 # --------------
@@ -81,9 +91,6 @@
 fi
 
 # Call service stop
-if is_service_enabled trove; then
-    stop_trove
-fi
 
 if is_service_enabled heat; then
     stop_heat