diff --git a/functions b/functions index 755df942..6d7ab8a0 100644 --- a/functions +++ b/functions @@ -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 diff --git a/upgrade-ceilometer b/upgrade-ceilometer index b39b6aad..9551dc03 100755 --- a/upgrade-ceilometer +++ b/upgrade-ceilometer @@ -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" diff --git a/upgrade-cinder b/upgrade-cinder index 059d2805..1f8bdb5e 100755 --- a/upgrade-cinder +++ b/upgrade-cinder @@ -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 diff --git a/upgrade-devstack b/upgrade-devstack index bf47bd7d..7bc3b021 100755 --- a/upgrade-devstack +++ b/upgrade-devstack @@ -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 diff --git a/upgrade-glance b/upgrade-glance index 3dbdbf54..ba645a0c 100755 --- a/upgrade-glance +++ b/upgrade-glance @@ -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 diff --git a/upgrade-horizon b/upgrade-horizon index dc5cb0b3..de7682e8 100755 --- a/upgrade-horizon +++ b/upgrade-horizon @@ -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 diff --git a/upgrade-neutron b/upgrade-neutron index b9822b12..cd946943 100755 --- a/upgrade-neutron +++ b/upgrade-neutron @@ -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 diff --git a/upgrade-nova b/upgrade-nova index 964308f2..31d718fc 100755 --- a/upgrade-nova +++ b/upgrade-nova @@ -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 diff --git a/upgrade-oslo b/upgrade-oslo index 0e51aa67..c4f3ae2d 100755 --- a/upgrade-oslo +++ b/upgrade-oslo @@ -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 diff --git a/upgrade-swift b/upgrade-swift index e4208e09..0fd0787a 100755 --- a/upgrade-swift +++ b/upgrade-swift @@ -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() diff --git a/upgrade-tempest b/upgrade-tempest index 2028a51c..281a01de 100755 --- a/upgrade-tempest +++ b/upgrade-tempest @@ -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 diff --git a/within-juno/README.rst b/within-juno/README.rst new file mode 100644 index 00000000..5037ec3d --- /dev/null +++ b/within-juno/README.rst @@ -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. diff --git a/within-master b/within-master new file mode 120000 index 00000000..94718245 --- /dev/null +++ b/within-master @@ -0,0 +1 @@ +within-juno/ \ No newline at end of file