
When tls-proxy is enabled, few functions in lib/tls relies on lib/apache functions (restart_apache_server, stop_apache_server, enable_apache_site, enable_apache_mod). It is thus necessary to source lib/apache whenever lib/tls is used. Change-Id: Ia9ffdc490d0cba04a084d572312e177b19791585
72 lines
1.9 KiB
Bash
Executable File
72 lines
1.9 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# ``upgrade-glance``
|
|
|
|
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
|
|
RUN_DIR=$(cd $(dirname "$0") && pwd)
|
|
|
|
# Source params
|
|
source $GRENADE_DIR/grenaderc
|
|
|
|
# Import common functions
|
|
source $GRENADE_DIR/functions
|
|
|
|
# This script exits on an error so that errors don't compound and you see
|
|
# only the first error that occurred.
|
|
set -o errexit
|
|
|
|
# Upgrade Glance
|
|
# ==============
|
|
|
|
# Get functions from current DevStack
|
|
source $TARGET_DEVSTACK_DIR/stackrc
|
|
source $TARGET_DEVSTACK_DIR/lib/apache
|
|
source $TARGET_DEVSTACK_DIR/lib/tls
|
|
source $TARGET_DEVSTACK_DIR/lib/glance
|
|
|
|
# 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
|
|
|
|
# Save current config files for posterity
|
|
[[ -d $SAVE_DIR/etc.glance ]] || cp -pr $GLANCE_CONF_DIR $SAVE_DIR/etc.glance
|
|
|
|
# install_glance()
|
|
stack_install_service glance
|
|
|
|
# calls upgrade-glance for specific release
|
|
upgrade_project glance $RUN_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
|
|
|
|
# Migrate the database
|
|
$GLANCE_BIN_DIR/glance-manage db_sync || die $LINENO "DB sync error"
|
|
|
|
|
|
# Start Glance
|
|
start_glance
|
|
|
|
# Don't succeed unless the services come up
|
|
ensure_services_started g-api
|
|
|
|
set +o xtrace
|
|
echo "*********************************************************************"
|
|
echo "SUCCESS: End $0"
|
|
echo "*********************************************************************"
|