Use gate_hook to enable q-trunk for rally.

Instead of making devstack enable it, because it can have
undesired effects for other rally-using gate jobs.
(See Closes-Bug for an example)

Closes-Bug: #1643451

(cherry picked from commit b1405cbe1e)
Change-Id: Id971432955196a7d5f64c598aeebf1a7bc245321
This commit is contained in:
YAMAMOTO Takashi 2016-12-15 21:42:07 +09:00 committed by Armando Migliaccio
parent 2c81375185
commit 13af011671
3 changed files with 14 additions and 16 deletions

View File

@ -1,13 +0,0 @@
#!/bin/bash
RALLY_EXTRA_DIR="$DEST/neutron/rally-jobs/extra"
# If rally has been configured, .setup files can be sourced to control the
# neutron configuration required to run the scenario plugins.
if [[ "$DEVSTACK_PLUGINS" =~ "rally" ]];
then
for file in $(ls $RALLY_EXTRA_DIR/*.setup);
do
source $file
done
fi

View File

@ -7,7 +7,6 @@ source $LIBDIR/l2_agent_sriovnicswitch
source $LIBDIR/ml2
source $LIBDIR/qos
source $LIBDIR/ovs
source $LIBDIR/rally
source $LIBDIR/trunk
Q_BUILD_OVS_FROM_GIT=$(trueorfalse False Q_BUILD_OVS_FROM_GIT)

View File

@ -9,6 +9,7 @@ NEUTRON_PATH=$GATE_DEST/neutron
GATE_HOOKS=$NEUTRON_PATH/neutron/tests/contrib/hooks
DEVSTACK_PATH=$GATE_DEST/devstack
LOCAL_CONF=$DEVSTACK_PATH/local.conf
RALLY_EXTRA_DIR=$NEUTRON_PATH/rally-jobs/extra
# Inject config from hook into localrc
@ -29,6 +30,18 @@ function load_conf_hook {
}
# Tweak gate configuration for our rally scenarios
function load_rc_for_rally {
for file in $(ls $RALLY_EXTRA_DIR/*.setup); do
local config=$(cat $file)
export DEVSTACK_LOCAL_CONFIG+="
# generated from hook '$file'
${config}
"
done
}
case $VENV in
"dsvm-functional"|"dsvm-fullstack")
# The following need to be set before sourcing
@ -78,8 +91,7 @@ case $VENV in
;;
"rally")
# NOTE(yamamoto): This is a no-op placeholder to allow
# further changes.
load_rc_for_rally
$BASE/new/devstack-gate/devstack-vm-gate.sh
;;