From ec07a63ec14a7ed91c227536986f9ad5a9892127 Mon Sep 17 00:00:00 2001 From: Brian Haley Date: Tue, 8 May 2018 12:09:56 -0400 Subject: [PATCH] Change defaults in tools/configure_for_func_testing.sh The defaults in tools/configure_for_func_testing.sh don't match what devstack uses, so running it while a stack is running breaks all database access. Change to source local.conf if it exists, else use the devstack defaults to be less destructive. Change-Id: I2d2a7ef034f670f3927ecc7b7706876872a01c77 --- tools/configure_for_func_testing.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/configure_for_func_testing.sh b/tools/configure_for_func_testing.sh index 95f59a1f2db..4bce5201580 100755 --- a/tools/configure_for_func_testing.sh +++ b/tools/configure_for_func_testing.sh @@ -32,7 +32,11 @@ Configure a host to run Neutron's functional test suite. Warning: This script relies on devstack to perform extensive modification to the underlying host. It is recommended that it be -invoked only on a throw-away VM." +invoked only on a throw-away VM. + +NOTE: Default values in this file, such as passwords, have been taken +from the devstack samples/local.conf file, but can be over-ridden by +setting them in your environment if necessary." exit 1 fi @@ -74,6 +78,10 @@ function _init { FILES=$DEVSTACK_PATH/files TOP_DIR=$DEVSTACK_PATH + if [ -f source $DEVSTACK_PATH/local.conf ]; then + source $DEVSTACK_PATH/local.conf 2> /dev/null + fi + source $DEVSTACK_PATH/stackrc # Allow the gate to override values set by stackrc. @@ -101,7 +109,7 @@ function _install_rpc_backend { RABBIT_USERID=${RABBIT_USERID:-stackrabbit} RABBIT_HOST=${RABBIT_HOST:-$SERVICE_HOST} - RABBIT_PASSWORD=${RABBIT_PASSWORD:-secretrabbit} + RABBIT_PASSWORD=${RABBIT_PASSWORD:-stackqueue} source $DEVSTACK_PATH/lib/rpc_backend @@ -124,8 +132,8 @@ function _install_databases { return 0 fi - MYSQL_PASSWORD=${MYSQL_PASSWORD:-secretmysql} - DATABASE_PASSWORD=${DATABASE_PASSWORD:-secretdatabase} + MYSQL_PASSWORD=${MYSQL_PASSWORD:-stackdb} + DATABASE_PASSWORD=${DATABASE_PASSWORD:-stackdb} source $DEVSTACK_PATH/lib/database