grenade/grenaderc
Tom Barron d5dc033a2e Determine PYTHON3_VERSION when necessary
When grenade.sh is invoked by devstack-gate, PYTHON3_VERSION
is not set so grenadrc defaults it to 3.5, which breaks grenade
on nodes where python 3.5 does not exist, such as ubuntu bionic.

One solution is to set PYTHON3_VERSION in devstack-gate [1].
Alternatively, this change uses a bit of code borrowed from
stackrc in devstack to determine the version of python
within grenade if it was not set by the caller.

Closes-bug: #1812208
[1] https://review.openstack.org/#/c/607379/

Change-Id: I0349de2026c49279ba7f262d5e86d37018d66326
2019-03-03 17:49:11 +00:00

106 lines
2.9 KiB
Plaintext

# grenaderc - Configuration
# Find the other rc files
RC_DIR=$(cd $(dirname "$BASH_SOURCE") && pwd)
# Allow local overrides of env variables
if [ -f $RC_DIR/localrc ]; then
source $RC_DIR/localrc
fi
# Base GIT Repo URL
# Another option is http://review.openstack.org/p
# Another option is https://github.com
GIT_BASE=${GIT_BASE:-git://git.openstack.org}
#GIT_BASE=/opt/git
# Destination path for installation ``STACK_ROOT``
STACK_ROOT=${STACK_ROOT:-/opt/stack}
DATA_DIR=${STACK_ROOT}/data
# Release info
BASE_RELEASE=${BASE_RELEASE:-newton}
BASE_RELEASE_DIR=${STACK_ROOT}/$BASE_RELEASE
TARGET_RELEASE=${TARGET_RELEASE:-ocata}
TARGET_RELEASE_DIR=${STACK_ROOT}/$TARGET_RELEASE
# DevStack sources
BASE_DEVSTACK_REPO=$GIT_BASE/openstack-dev/devstack.git
BASE_DEVSTACK_BRANCH=${BASE_DEVSTACK_BRANCH:-stable/$BASE_RELEASE}
BASE_DEVSTACK_DIR=${BASE_DEVSTACK_DIR:-$BASE_RELEASE_DIR/devstack}
TARGET_DEVSTACK_REPO=$BASE_DEVSTACK_REPO
TARGET_DEVSTACK_BRANCH=${TARGET_DEVSTACK_BRANCH:-master}
TARGET_DEVSTACK_DIR=${TARGET_DEVSTACK_DIR:-$TARGET_RELEASE_DIR/devstack}
TEMPEST_CONCURRENCY=${TEMPEST_CONCURRENCY:-$(nproc --all)}
# Saved stuff
SAVE_DIR=${STACK_ROOT}/save
# Screen session name
SCREEN_NAME=${SCREEN_NAME:-stack}
# Logging
LOGFILE=${STACK_ROOT}/logs/grenade.sh.log
LOGDAYS=1
TIMESTAMP_FORMAT="%F-%H%M%S"
CURRENT_LOG_TIME=${CURRENT_LOG_TIME:-$(date "+$TIMESTAMP_FORMAT")}
SCREEN_LOGDIR=${STACK_ROOT}/logs/screen
# Timeouts
#
# ``ACTIVE_TIMEOUT`` is used by javelin to determine how long to wait for
# resources to become active.
ACTIVE_TIMEOUT=120
SERVICE_TIMEOUT=120
# Defaults that use values from localrc go here
# Enable tempest
ENABLE_TEMPEST=${ENABLE_TEMPEST:-True}
# We need RECLONE to get the updated branches; not everyone wants it though
RECLONE=${RECLONE:-no}
# Set this to True if you want to abort execution with an error if a git repo
# does not exist
ERROR_ON_CLONE=${ERROR_ON_CLONE:-False}
# Allow only running parts of this script
RUN_BASE=${RUN_BASE:-True}
RUN_TARGET=${RUN_TARGET:-True}
VERBOSE=${VERBOSE:-True}
# Allow skipping smoke tests
RUN_SMOKE=${RUN_SMOKE:-True}
BASE_RUN_SMOKE=${BASE_RUN_SMOKE:-$RUN_SMOKE}
TARGET_RUN_SMOKE=${TARGET_RUN_SMOKE:-$RUN_SMOKE}
# declare the storage location for project specific things
declare -A PLUGIN_DIR
# Projects that we should upgrade
UPGRADE_PROJECTS=""
# Need this for global requirements
REQUIREMENTS_DIR=$TARGET_RELEASE_DIR/requirements
# Should we verify resources survive the upgrade process. Previously
# this was done with Javelin, but will be done with per resource
# scripts going forward.
VERIFY_RESOURCES=${VERIFY_RESOURCES:-True}
# How long should we wait for services to start / stop before we
# consider it a fail. Defaults to 30 seconds.
SERVICE_TIMEOUT=${SERVICE_TIMEOUT:-30}
# Should we run any online migrations manually during the upgrade
# process?
FORCE_ONLINE_MIGRATIONS=${FORCE_ONLINE_MIGRATIONS:-True}
# Local variables:
# mode: shell-script
# End: