Get rid of sourcing stackrc in grenade settings

Instead, use the common_settings file to source all the variables
we need at the early stages of devstack setup and during the upgrade
itself. This also fixes an issue with the networking-generic-switch
upgrade script, which is run from the old release instead of the new
one.

It depends on a patch from an older release, as grenade is setup
using settings from an older release, we need common_setting to be
populated there.

Change-Id: I0d6d3e9e60785bb9b6a10c8c7a07867a5b2a5e6e
Depends-On: I34fb68c150b753824bd2687a1f522ac87771a5e3
This commit is contained in:
Vladyslav Drok
2017-06-30 18:28:15 +03:00
parent c08c21e308
commit c4b39e7b09
4 changed files with 70 additions and 71 deletions

View File

@@ -10,24 +10,17 @@
register_project_for_upgrade ironic
register_db_to_save ironic
# Duplicate some setup bits from target DevStack. Use old devstack as we install base environment from it.
BASE_TOP_DIR=$TOP_DIR/../../old/devstack/
source $BASE_TOP_DIR/stackrc
source $BASE_TOP_DIR/lib/tls
source $BASE_TOP_DIR/lib/nova
source $BASE_TOP_DIR/lib/neutron-legacy
source $BASE_TOP_DIR/lib/apache
source $BASE_TOP_DIR/lib/keystone
# Duplicate some settings from devstack. Use old devstack as we install base
# environment from it. In common_settings we also source the old localrc
# variables, so we need to do this before checking the HOST_TOPOLOGY value
IRONIC_BASE_DEVSTACK_DIR=$TOP_DIR/../../old/ironic/devstack
source $IRONIC_BASE_DEVSTACK_DIR/common_settings
if [[ "${HOST_TOPOLOGY}" != "multinode" ]]; then
# Disable automated cleaning on single node grenade to save a time and resources.
export IRONIC_AUTOMATED_CLEAN_ENABLED=False
fi
# Update global variables like DEFAULT_IMAGE_NAME that are set in ironic devstack plugin
IRONIC_BASE_DEVSTACK_DIR=$BASE_TOP_DIR/../ironic/devstack
source $IRONIC_BASE_DEVSTACK_DIR/lib/ironic
# NOTE(jlvillal): For multi-node grenade jobs we do not want to upgrade Nova
if [[ "${HOST_TOPOLOGY}" == "multinode" ]]; then
# Remove 'nova' from the list of projects to upgrade