Add within-juno dir and within-master symlink

This adds logic to upgrade_project() to call project upgrade
scripts from the within-$release directory if performing a
sideways upgrade within the same release.  A symlink named
within-master is added and linked to the current development
release to allow sideways migration testing of trunk.  When Juno
tags are cut and K opens, a from-kilo directoy should be created
and this symlink updated.

Change-Id: I770075442d05f38515e5dadf24f2c642d14d7845
This commit is contained in:
Adam Gandelman 2014-08-07 16:44:35 -07:00
parent aabdae97ef
commit 156339e4e8
13 changed files with 31 additions and 13 deletions

View File

@ -1731,10 +1731,17 @@ function upgrade_project {
project=$1
base_dir=$2
branch=$3
base_branch=$3
target_branch=$4
upgrade_dir=$(get_release_name_from_branch $branch)
upgrade_file=${base_dir}/"from-"${upgrade_dir}/"upgrade-"${project}
if [[ "$base_branch" == "$target_branch" ]]; then
direction="within"
else
direction="from"
fi
upgrade_dir=$(get_release_name_from_branch $base_branch)
upgrade_file=${base_dir}/${direction}"-"${upgrade_dir}/"upgrade-"${project}
if [[ -e ${upgrade_file} ]]; then
source ${upgrade_file} && configure_${project}_upgrade
else

View File

@ -58,7 +58,7 @@ source $TARGET_DEVSTACK_DIR/lib/ceilometer
install_ceilometer
# calls upgrade-ceilometer for specific release
upgrade_project ceilometer $GRENADE_DIR $BASE_DEVSTACK_BRANCH
upgrade_project ceilometer $GRENADE_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
# Migrate the database
ceilometer-dbsync || die $LINENO "DB sync error"

View File

@ -84,7 +84,7 @@ install_cinder
install_cinderclient
# calls upgrade-cinder for specific release
upgrade_project cinder $GRENADE_DIR $BASE_DEVSTACK_BRANCH
upgrade_project cinder $GRENADE_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
# Simulate init_cinder()
create_cinder_volume_group

View File

@ -24,7 +24,7 @@ set -o xtrace
# ================
# calls upgrade-devstack for specific release
upgrade_project devstack $GRENADE_DIR $BASE_DEVSTACK_BRANCH
upgrade_project devstack $GRENADE_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
# Preserve accrc files for future usage
cp -a $BASE_DEVSTACK_DIR/accrc $TARGET_DEVSTACK_DIR/accrc

View File

@ -84,7 +84,7 @@ install_glanceclient
install_glance
# calls upgrade-glance for specific release
upgrade_project glance $GRENADE_DIR $BASE_DEVSTACK_BRANCH
upgrade_project glance $GRENADE_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
# Simulate init_glance()
create_glance_cache_dir

View File

@ -68,7 +68,7 @@ screen -S $SCREEN_NAME -p horizon -X kill
install_horizon
# calls upgrade-horizon for specific release
upgrade_project horizon $GRENADE_DIR $BASE_DEVSTACK_BRANCH
upgrade_project horizon $GRENADE_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
# Start Horizon
start_horizon

View File

@ -107,7 +107,7 @@ install_neutron_third_party
Q_L3_CONF_FILE=${Q_L3_CONF_FILE:-"$NEUTRON_CONF_DIR/l3_agent.ini"}
Q_FWAAS_CONF_FILE=${Q_FWAAS_CONF_FILE:-"$NEUTRON_CONF_DIR/fwaas_driver.ini"}
upgrade_project neutron $GRENADE_DIR $BASE_DEVSTACK_BRANCH
upgrade_project neutron $GRENADE_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
# Get plugin config paths
neutron_plugin_configure_common

View File

@ -98,7 +98,7 @@ install_novaclient
install_nova
# calls upgrade-nova for specific release
upgrade_project nova $GRENADE_DIR $BASE_DEVSTACK_BRANCH
upgrade_project nova $GRENADE_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
# Simulate init_nova()
create_nova_cache_dir

View File

@ -35,6 +35,6 @@ source $TARGET_DEVSTACK_DIR/lib/oslo
sudo pip uninstall -y oslo.config
# calls upgrade-oslo for specific release
upgrade_project oslo $GRENADE_DIR $BASE_DEVSTACK_BRANCH
upgrade_project oslo $GRENADE_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
install_oslo

View File

@ -82,7 +82,7 @@ install_swift
install_swiftclient
# calls upgrade-swift for specific release
upgrade_project swift $GRENADE_DIR $BASE_DEVSTACK_BRANCH
upgrade_project swift $GRENADE_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
# Simulate swift_init()

View File

@ -65,7 +65,7 @@ source $TARGET_DEVSTACK_DIR/lib/tempest
install_tempest
# calls upgrade-tempest for specific release
upgrade_project tempest $GRENADE_DIR $BASE_DEVSTACK_BRANCH
upgrade_project tempest $GRENADE_DIR $BASE_DEVSTACK_BRANCH $TARGET_DEVSTACK_BRANCH
OS_USERNAME=admin
if $(source $BASE_DEVSTACK_DIR/stackrc; is_service_enabled neutron); then

10
within-juno/README.rst Normal file
View File

@ -0,0 +1,10 @@
===========================================
Juno to Juno specific sideways upgrade scripts
===========================================
This directory can house service scripts for upgrading within the Juno
release.
To do this add ``upgrade-$servicename`` script to this directory and
include a ``configure_$servicename_upgrade`` function in the file. All
services that don't have a specific upgrade script will just use the
generic one, which performs a db-sync and installs the updated code.

1
within-master Symbolic link
View File

@ -0,0 +1 @@
within-juno/