
* change BASE_RELEASE and TARGET_RELEASE in grenaderc * remove work-arounds from devstack.localrc.target * remove upgrade steps from the upgrade-* scripts * change references to release names in variables to BASE_ and TARGET_ * remove Javelin check from check-sanity, will return in verify-javelin in https://review.openstack.org/#/c/26257/ Fixes bug 1175340 Change-Id: If1523c73ebefeaf3d3e3efdfbc053f47365d123a
99 lines
2.7 KiB
Bash
Executable File
99 lines
2.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# ``upgrade-cinder``
|
|
|
|
# ``upgrade-nova`` must be complete for this to work!!!
|
|
|
|
echo "*********************************************************************"
|
|
echo "Begin $0"
|
|
echo "*********************************************************************"
|
|
|
|
# Clean up any resources that may be in use
|
|
cleanup() {
|
|
set +o errexit
|
|
|
|
echo "*********************************************************************"
|
|
echo "ERROR: Abort $0"
|
|
echo "*********************************************************************"
|
|
|
|
# Kill ourselves to signal any calling process
|
|
trap 2; kill -2 $$
|
|
}
|
|
|
|
trap cleanup SIGHUP SIGINT SIGTERM
|
|
|
|
# Keep track of the grenade directory
|
|
GRENADE_DIR=$(cd $(dirname "$0") && pwd)
|
|
|
|
# Import common functions
|
|
source $GRENADE_DIR/functions
|
|
|
|
# Determine what system we are running on. This provides ``os_VENDOR``,
|
|
# ``os_RELEASE``, ``os_UPDATE``, ``os_PACKAGE``, ``os_CODENAME``
|
|
# and ``DISTRO``
|
|
GetDistro
|
|
|
|
# Source params
|
|
source $GRENADE_DIR/grenaderc
|
|
|
|
# This script exits on an error so that errors don't compound and you see
|
|
# only the first error that occured.
|
|
set -o errexit
|
|
|
|
# Print the commands being run so that we can see the command that triggers
|
|
# an error. It is also useful for following allowing as the install occurs.
|
|
set -o xtrace
|
|
|
|
# Set for DevStack compatibility
|
|
TOP_DIR=$TARGET_DEVSTACK_DIR
|
|
|
|
|
|
# Upgrade Cinder
|
|
# ==============
|
|
|
|
# Kill running Cinder processes
|
|
for serv in c-api c-sch c-vol; do
|
|
screen -S $SCREEN_NAME -p $serv -X kill
|
|
done
|
|
|
|
MYSQL_HOST=${MYSQL_HOST:-localhost}
|
|
MYSQL_USER=${MYSQL_USER:-root}
|
|
BASE_SQL_CONN=$(source $BASE_DEVSTACK_DIR/stackrc; echo ${BASE_SQL_CONN:-mysql://$MYSQL_USER:$MYSQL_PASSWORD@$MYSQL_HOST})
|
|
|
|
# Duplicate some setup bits from target DevStack
|
|
cd $TARGET_DEVSTACK_DIR
|
|
source $TARGET_DEVSTACK_DIR/stackrc
|
|
SERVICE_HOST=${SERVICE_HOST:-localhost}
|
|
SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http}
|
|
SERVICE_TENANT_NAME=${SERVICE_TENANT_NAME:-service}
|
|
source $TARGET_DEVSTACK_DIR/lib/database
|
|
source $TARGET_DEVSTACK_DIR/lib/rpc_backend
|
|
source $TARGET_DEVSTACK_DIR/lib/keystone
|
|
|
|
source $TARGET_DEVSTACK_DIR/lib/cinder
|
|
|
|
# Save current config files for posterity
|
|
[[ -d $SAVE_DIR/etc.cinder ]] || cp -pr $CINDER_CONF_DIR $SAVE_DIR/etc.cinder
|
|
|
|
# install_cinder()
|
|
install_cinderclient
|
|
install_cinder
|
|
install_cinderclient
|
|
|
|
# configure_cinder
|
|
# nothing to see here yet
|
|
|
|
# Simulate init_cinder()
|
|
create_cinder_volume_group
|
|
create_cinder_cache_dir
|
|
|
|
# Migrate the database
|
|
cinder-manage db sync || die $LINENO "DB migration error"
|
|
|
|
start_cinder
|
|
|
|
set +o xtrace
|
|
echo "*********************************************************************"
|
|
echo "SUCCESS: End $0"
|
|
echo "*********************************************************************"
|