Merge "Add is_fedora and exit_distro_not_supported functions"
diff --git a/exercises/euca.sh b/exercises/euca.sh
index 67da1be..982653e 100755
--- a/exercises/euca.sh
+++ b/exercises/euca.sh
@@ -90,7 +90,7 @@
die_if_not_set VOLUME "Failure to get volume"
# Test volume has become available
- if ! timeout $ASSOCIATE_TIMEOUT sh -c "while ! euca-describe-volumes $VOLUME | grep -q available; do sleep 1; done"; then
+ if ! timeout $RUNNING_TIMEOUT sh -c "while ! euca-describe-volumes $VOLUME | grep -q available; do sleep 1; done"; then
echo "volume didnt become available within $RUNNING_TIMEOUT seconds"
exit 1
fi
diff --git a/lib/heat b/lib/heat
index b640fbc..feaadec 100644
--- a/lib/heat
+++ b/lib/heat
@@ -124,7 +124,7 @@
iniset $HEAT_ENGINE_CONF DEFAULT bind_host $HEAT_ENGINE_HOST
iniset $HEAT_ENGINE_CONF DEFAULT bind_port $HEAT_ENGINE_PORT
iniset $HEAT_ENGINE_CONF DEFAULT heat_metadata_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT
- iniset $HEAT_ENGINE_CONF DEFAULT heat_waitcondition_server_url http://$HEAT_CFN_HOST:$HEAT_CFN_PORT/v1/waitcondition
+ iniset $HEAT_ENGINE_CONF DEFAULT heat_waitcondition_server_url http://$HEAT_API_CFN_HOST:$HEAT_API_CFN_PORT/v1/waitcondition
iniset $HEAT_ENGINE_CONF DEFAULT heat_watch_server_url http://$HEAT_API_CW_HOST:$HEAT_API_CW_PORT
local dburl
database_connection_url dburl heat
diff --git a/lib/quantum b/lib/quantum
index 14a3a4a..4e9f298 100644
--- a/lib/quantum
+++ b/lib/quantum
@@ -1,24 +1,113 @@
# lib/quantum
# functions - funstions specific to quantum
+# Dependencies:
+# ``functions`` file
+# ``DEST`` must be defined
+
+
+# Quantum Networking
+# ------------------
+
+# Make sure that quantum is enabled in ``ENABLED_SERVICES``. If you want
+# to run Quantum on this host, make sure that q-svc is also in
+# ``ENABLED_SERVICES``.
+#
+# If you're planning to use the Quantum openvswitch plugin, set
+# ``Q_PLUGIN`` to "openvswitch" and make sure the q-agt service is enabled
+# in ``ENABLED_SERVICES``. If you're planning to use the Quantum
+# linuxbridge plugin, set ``Q_PLUGIN`` to "linuxbridge" and make sure the
+# q-agt service is enabled in ``ENABLED_SERVICES``.
+#
+# See "Quantum Network Configuration" below for additional variables
+# that must be set in localrc for connectivity across hosts with
+# Quantum.
+#
+# With Quantum networking the NET_MAN variable is ignored.
+
+
# Save trace setting
XTRACE=$(set +o | grep xtrace)
set +o xtrace
+
+# Defaults
+# --------
+
+# Set up default directories
QUANTUM_DIR=$DEST/quantum
-export QUANTUM_TEST_CONFIG_FILE=${QUANTUM_TEST_CONFIG_FILE:-"/etc/quantum/debug.ini"}
+QUANTUMCLIENT_DIR=$DEST/python-quantumclient
QUANTUM_AUTH_CACHE_DIR=${QUANTUM_AUTH_CACHE_DIR:-/var/cache/quantum}
+QUANTUM_CONF_DIR=/etc/quantum
+QUANTUM_CONF=$QUANTUM_CONF_DIR/quantum.conf
+export QUANTUM_TEST_CONFIG_FILE=${QUANTUM_TEST_CONFIG_FILE:-"$QUANTUM_CONF_DIR/debug.ini"}
+
+# Default Quantum Plugin
+Q_PLUGIN=${Q_PLUGIN:-openvswitch}
+# Default Quantum Port
+Q_PORT=${Q_PORT:-9696}
+# Default Quantum Host
+Q_HOST=${Q_HOST:-$HOST_IP}
+# Which Quantum API nova should use
+# Default admin username
+Q_ADMIN_USERNAME=${Q_ADMIN_USERNAME:-quantum}
+# Default auth strategy
+Q_AUTH_STRATEGY=${Q_AUTH_STRATEGY:-keystone}
+# Use namespace or not
+Q_USE_NAMESPACE=${Q_USE_NAMESPACE:-True}
+Q_USE_ROOTWRAP=${Q_USE_ROOTWRAP:-True}
+# Meta data IP
+Q_META_DATA_IP=${Q_META_DATA_IP:-$HOST_IP}
+# Use quantum-debug command
+Q_USE_DEBUG_COMMAND=${Q_USE_DEBUG_COMMAND:-False}
+
if is_service_enabled quantum; then
- Q_CONF_FILE=/etc/quantum/quantum.conf
- Q_RR_CONF_FILE=/etc/quantum/rootwrap.conf
+ Q_RR_CONF_FILE=$QUANTUM_CONF_DIR/rootwrap.conf
if [[ "$Q_USE_ROOTWRAP" == "False" ]]; then
Q_RR_COMMAND="sudo"
else
- Q_RR_COMMAND="sudo $QUANTUM_DIR/bin/quantum-rootwrap $Q_RR_CONF_FILE"
+ QUANTUM_ROOTWRAP=$(get_rootwrap_location quantum)
+ Q_RR_COMMAND="sudo $QUANTUM_ROOTWRAP $Q_RR_CONF_FILE"
fi
fi
+
+# Entry Points
+# ------------
+
+# configure_quantum_rootwrap() - configure Quantum's rootwrap
+function configure_quantum_rootwrap() {
+ if [[ "$Q_USE_ROOTWRAP" == "False" ]]; then
+ return
+ fi
+ # Deploy new rootwrap filters files (owned by root).
+ # Wipe any existing rootwrap.d files first
+ Q_CONF_ROOTWRAP_D=$QUANTUM_CONF_DIR/rootwrap.d
+ if [[ -d $Q_CONF_ROOTWRAP_D ]]; then
+ sudo rm -rf $Q_CONF_ROOTWRAP_D
+ fi
+ # Deploy filters to $QUANTUM_CONF_DIR/rootwrap.d
+ mkdir -p -m 755 $Q_CONF_ROOTWRAP_D
+ cp -pr $QUANTUM_DIR/etc/quantum/rootwrap.d/* $Q_CONF_ROOTWRAP_D/
+ sudo chown -R root:root $Q_CONF_ROOTWRAP_D
+ sudo chmod 644 $Q_CONF_ROOTWRAP_D/*
+ # Set up rootwrap.conf, pointing to $QUANTUM_CONF_DIR/rootwrap.d
+ sudo cp -p $QUANTUM_DIR/etc/rootwrap.conf $Q_RR_CONF_FILE
+ sudo sed -e "s:^filters_path=.*$:filters_path=$Q_CONF_ROOTWRAP_D:" -i $Q_RR_CONF_FILE
+ sudo chown root:root $Q_RR_CONF_FILE
+ sudo chmod 0644 $Q_RR_CONF_FILE
+ # Specify rootwrap.conf as first parameter to quantum-rootwrap
+ ROOTWRAP_SUDOER_CMD="$QUANTUM_ROOTWRAP $Q_RR_CONF_FILE *"
+
+ # Set up the rootwrap sudoers for quantum
+ TEMPFILE=`mktemp`
+ echo "$USER ALL=(root) NOPASSWD: $ROOTWRAP_SUDOER_CMD" >$TEMPFILE
+ chmod 0440 $TEMPFILE
+ sudo chown root:root $TEMPFILE
+ sudo mv $TEMPFILE /etc/sudoers.d/quantum-rootwrap
+}
+
# Configures keystone integration for quantum service and agents
function quantum_setup_keystone() {
local conf_file=$1
diff --git a/lib/tempest b/lib/tempest
index 606f05e..7fa15df 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -4,21 +4,21 @@
# ``functions`` file
# ``lib/nova`` service is runing
# <list other global vars that are assumed to be defined>
-# - DEST
-# - ADMIN_PASSWORD
-# - OS_USERNAME
-# - DEFAULT_IMAGE_NAME
-# - S3_SERVICE_PORT
-# - SERVICE_HOST
-# - BASE_SQL_CONN ``lib/database`` declares
+# - ``DEST``
+# - ``ADMIN_PASSWORD``
+# - ``DEFAULT_IMAGE_NAME``
+# - ``S3_SERVICE_PORT``
+# - ``SERVICE_HOST``
+# - ``BASE_SQL_CONN`` ``lib/database`` declares
# Optional Dependencies:
-# IDENTITY_*
+# IDENTITY_USE_SSL, IDENTITY_HOST, IDENTITY_PORT, IDENTITY_PATH
# ALT_* (similar vars exists in keystone_data.sh)
-# IMAGE_*
-# LIVE_MIGRATION_AVAILABLE
-# DEFAULT_INSTANCE_TYPE
-# DEFAULT_INSTANCE_USER
-# USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION
+# ``OS_USERNAME``
+# ``IMAGE_PORT``, ``IMAGE_HOST``
+# ``LIVE_MIGRATION_AVAILABLE``
+# ``USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION``
+# ``DEFAULT_INSTANCE_TYPE``
+# ``DEFAULT_INSTANCE_USER``
# ``stack.sh`` calls the entry points in this order:
#
# install_tempest
@@ -52,12 +52,17 @@
# configure_tempest() - Set config files, create data dirs, etc
function configure_tempest() {
- local IMAGE_LINES
- local IMAGES
- local NUM_IMAGES
- local IMAGE_UUID
- local IMAGE_UUID_ALT
+ local image_lines
+ local images
+ local num_images
+ local image_uuid
+ local image_uuid_alt
local errexit
+ local password
+ local line
+ local flavors
+ local flavors_ref
+ local flavor_lines
#TODO(afazekas):
# sudo python setup.py deploy
@@ -74,33 +79,33 @@
# testing. Here we simply look for images stored in Glance
# and set the appropriate variables for use in the tempest config
# We ignore ramdisk and kernel images, look for the default image
- # DEFAULT_IMAGE_NAME. If not found, we set the IMAGE_UUID to the
- # first image returned and set IMAGE_UUID_ALT to the second,
+ # ``DEFAULT_IMAGE_NAME``. If not found, we set the ``image_uuid`` to the
+ # first image returned and set ``image_uuid_alt`` to the second,
# if there is more than one returned...
# ... Also ensure we only take active images, so we don't get snapshots in process
- IMAGE_LINES=`glance image-list`
+ image_lines=`glance image-list`
IFS=$'\n\r'
- IMAGES=""
- for line in $IMAGE_LINES; do
+ images=""
+ for line in $image_lines; do
if [ -z $DEFAULT_IMAGE_NAME ]; then
- IMAGES="$IMAGES `echo $line | grep -v "^\(ID\|+--\)" | grep -v "\(aki\|ari\)" | grep 'active' | cut -d' ' -f2`"
+ images="$images `echo $line | grep -v "^\(ID\|+--\)" | grep -v "\(aki\|ari\)" | grep 'active' | cut -d' ' -f2`"
else
- IMAGES="$IMAGES `echo $line | grep -v "^\(ID\|+--\)" | grep -v "\(aki\|ari\)" | grep 'active' | grep "$DEFAULT_IMAGE_NAME" | cut -d' ' -f2`"
+ images="$images `echo $line | grep -v "^\(ID\|+--\)" | grep -v "\(aki\|ari\)" | grep 'active' | grep "$DEFAULT_IMAGE_NAME" | cut -d' ' -f2`"
fi
done
# Create array of image UUIDs...
IFS=" "
- IMAGES=($IMAGES)
- NUM_IMAGES=${#IMAGES[*]}
- echo "Found $NUM_IMAGES images"
- if [[ $NUM_IMAGES -eq 0 ]]; then
+ images=($images)
+ num_images=${#images[*]}
+ echo "Found $num_images images"
+ if [[ $num_images -eq 0 ]]; then
echo "Found no valid images to use!"
exit 1
fi
- IMAGE_UUID=${IMAGES[0]}
- IMAGE_UUID_ALT=$IMAGE_UUID
- if [[ $NUM_IMAGES -gt 1 ]]; then
- IMAGE_UUID_ALT=${IMAGES[1]}
+ image_uuid=${images[0]}
+ image_uuid_alt=$image_uuid
+ if [[ $num_images -gt 1 ]]; then
+ image_uuid_alt=${images[1]}
fi
# Create tempest.conf from tempest.conf.sample
@@ -114,7 +119,7 @@
# from the Tempest configuration file entirely...
IDENTITY_PATH=${IDENTITY_PATH:-tokens}
- PASSWORD=${ADMIN_PASSWORD:-secrete}
+ password=${ADMIN_PASSWORD:-secrete}
# See files/keystone_data.sh where alt_demo user
# and tenant are set up...
@@ -122,30 +127,30 @@
ALT_TENANT_NAME=${ALT_TENANT_NAME:-alt_demo}
# Check Nova for existing flavors and, if set, look for the
- # DEFAULT_INSTANCE_TYPE and use that. Otherwise, just use the first flavor.
- FLAVOR_LINES=`nova flavor-list`
- IFS="$(echo -e "\n\r")"
- FLAVORS=""
- for line in $FLAVOR_LINES; do
+ # ``DEFAULT_INSTANCE_TYPE`` and use that. Otherwise, just use the first flavor.
+ flavor_lines=`nova flavor-list`
+ IFS=$'\r\n'
+ flavors=""
+ for line in $flavor_lines; do
if [ -z $DEFAULT_INSTANCE_TYPE ]; then
- FLAVORS="$FLAVORS `echo $line | grep -v "^\(|\s*ID\|+--\)" | cut -d' ' -f2`"
+ flavors="$flavors `echo $line | grep -v "^\(|\s*ID\|+--\)" | cut -d' ' -f2`"
else
- FLAVORS="$FLAVORS `echo $line | grep -v "^\(|\s*ID\|+--\)" | grep "$DEFAULT_INSTANCE_TYPE" | cut -d' ' -f2`"
+ flavors="$flavors `echo $line | grep -v "^\(|\s*ID\|+--\)" | grep "$DEFAULT_INSTANCE_TYPE" | cut -d' ' -f2`"
fi
done
IFS=" "
- FLAVORS=($FLAVORS)
- NUM_FLAVORS=${#FLAVORS[*]}
- echo "Found $NUM_FLAVORS flavors"
- if [[ $NUM_FLAVORS -eq 0 ]]; then
+ flavors=($flavors)
+ num_flavors=${#flavors[*]}
+ echo "Found $num_flavors flavors"
+ if [[ $num_flavors -eq 0 ]]; then
echo "Found no valid flavors to use!"
exit 1
fi
- FLAVOR_REF=${FLAVORS[0]}
- FLAVOR_REF_ALT=$FLAVOR_REF
- if [[ $NUM_FLAVORS -gt 1 ]]; then
- FLAVOR_REF_ALT=${FLAVORS[1]}
+ flavor_ref=${flavors[0]}
+ flavor_ref_alt=$flavor_ref
+ if [[ $num_flavors -gt 1 ]]; then
+ flavor_ref_alt=${flavors[1]}
fi
# Timeouts
@@ -162,9 +167,9 @@
iniset $TEMPEST_CONF identity port $IDENTITY_PORT
iniset $TEMPEST_CONF identity path $IDENTITY_PATH
- iniset $TEMPEST_CONF compute password "$PASSWORD"
+ iniset $TEMPEST_CONF compute password "$password"
iniset $TEMPEST_CONF compute alt_username $ALT_USERNAME
- iniset $TEMPEST_CONF compute alt_password "$PASSWORD"
+ iniset $TEMPEST_CONF compute alt_password "$password"
iniset $TEMPEST_CONF compute alt_tenant_name $ALT_TENANT_NAME
iniset $TEMPEST_CONF compute resize_available False
iniset $TEMPEST_CONF compute change_password_available False
@@ -175,10 +180,10 @@
iniset $TEMPEST_CONF compute network_for_ssh private
iniset $TEMPEST_CONF compute ip_version_for_ssh 4
iniset $TEMPEST_CONF compute ssh_timeout 4
- iniset $TEMPEST_CONF compute image_ref $IMAGE_UUID
- iniset $TEMPEST_CONF compute image_ref_alt $IMAGE_UUID_ALT
- iniset $TEMPEST_CONF compute flavor_ref $FLAVOR_REF
- iniset $TEMPEST_CONF compute flavor_ref_alt $FLAVOR_REF_ALT
+ iniset $TEMPEST_CONF compute image_ref $image_uuid
+ iniset $TEMPEST_CONF compute image_ref_alt $image_uuid_alt
+ iniset $TEMPEST_CONF compute flavor_ref $flavor_ref
+ iniset $TEMPEST_CONF compute flavor_ref_alt $flavor_ref_alt
iniset $TEMPEST_CONF compute source_dir $NOVA_SOURCE_DIR
iniset $TEMPEST_CONF compute live_migration_available ${LIVE_MIGRATION_AVAILABLE:-False}
iniset $TEMPEST_CONF compute use_block_migration_for_live_migration ${USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION:-False}
@@ -192,13 +197,13 @@
# image
iniset $TEMPEST_CONF image host ${IMAGE_HOST:-127.0.0.1}
iniset $TEMPEST_CONF image port ${IMAGE_PORT:-9292}
- iniset $TEMPEST_CONF image password "$PASSWORD"
+ iniset $TEMPEST_CONF image password "$password"
# identity-admin
- iniset $TEMPEST_CONF "identity-admin" password "$PASSWORD"
+ iniset $TEMPEST_CONF "identity-admin" password "$password"
# compute admin
- iniset $TEMPEST_CONF "compute-admin" password "$PASSWORD"
+ iniset $TEMPEST_CONF "compute-admin" password "$password"
# network
iniset $TEMPEST_CONF network api_version 2.0
diff --git a/stack.sh b/stack.sh
index 6483de3..a976bc0 100755
--- a/stack.sh
+++ b/stack.sh
@@ -321,26 +321,6 @@
OPENSTACKCLIENT_DIR=$DEST/python-openstackclient
NOVNC_DIR=$DEST/noVNC
SWIFT3_DIR=$DEST/swift3
-QUANTUM_CLIENT_DIR=$DEST/python-quantumclient
-
-# Default Quantum Plugin
-Q_PLUGIN=${Q_PLUGIN:-openvswitch}
-# Default Quantum Port
-Q_PORT=${Q_PORT:-9696}
-# Default Quantum Host
-Q_HOST=${Q_HOST:-$HOST_IP}
-# Which Quantum API nova should use
-# Default admin username
-Q_ADMIN_USERNAME=${Q_ADMIN_USERNAME:-quantum}
-# Default auth strategy
-Q_AUTH_STRATEGY=${Q_AUTH_STRATEGY:-keystone}
-# Use namespace or not
-Q_USE_NAMESPACE=${Q_USE_NAMESPACE:-True}
-Q_USE_ROOTWRAP=${Q_USE_ROOTWRAP:-True}
-# Meta data IP
-Q_META_DATA_IP=${Q_META_DATA_IP:-$HOST_IP}
-# Use quantum-debug command
-Q_USE_DEBUG_COMMAND=${Q_USE_DEBUG_COMMAND:-False}
RYU_DIR=$DEST/ryu
# Ryu API Host
@@ -458,26 +438,6 @@
## FIXME(ja): should/can we check that FLAT_INTERFACE is sane?
-# Quantum Networking
-# ------------------
-
-# Make sure that quantum is enabled in ENABLED_SERVICES. If you want
-# to run Quantum on this host, make sure that q-svc is also in
-# ENABLED_SERVICES.
-#
-# If you're planning to use the Quantum openvswitch plugin, set
-# Q_PLUGIN to "openvswitch" and make sure the q-agt service is enabled
-# in ENABLED_SERVICES. If you're planning to use the Quantum
-# linuxbridge plugin, set Q_PLUGIN to "linuxbridge" and make sure the
-# q-agt service is enabled in ENABLED_SERVICES.
-#
-# See "Quantum Network Configuration" below for additional variables
-# that must be set in localrc for connectivity across hosts with
-# Quantum.
-#
-# With Quantum networking the NET_MAN variable is ignored.
-
-
# Database Configuration
# ----------------------
@@ -598,7 +558,15 @@
exec 3>&1
if [[ "$VERBOSE" == "True" ]]; then
# Redirect stdout/stderr to tee to write the log file
- exec 1> >( tee "${LOGFILE}" ) 2>&1
+ exec 1> >( awk '
+ {
+ cmd ="date +\"%Y-%m-%d %H:%M:%S \""
+ cmd | getline now
+ close("date +\"%Y-%m-%d %H:%M:%S \"")
+ sub(/^/, now)
+ print
+ fflush()
+ }' | tee "${LOGFILE}" ) 2>&1
# Set up a second fd for output
exec 6> >( tee "${SUMFILE}" )
else
@@ -803,7 +771,7 @@
install_horizon
fi
if is_service_enabled quantum; then
- git_clone $QUANTUM_CLIENT_REPO $QUANTUM_CLIENT_DIR $QUANTUM_CLIENT_BRANCH
+ git_clone $QUANTUMCLIENT_REPO $QUANTUMCLIENT_DIR $QUANTUMCLIENT_BRANCH
fi
if is_service_enabled quantum; then
# quantum
@@ -862,7 +830,7 @@
configure_horizon
fi
if is_service_enabled quantum; then
- setup_develop $QUANTUM_CLIENT_DIR
+ setup_develop $QUANTUMCLIENT_DIR
setup_develop $QUANTUM_DIR
fi
if is_service_enabled heat; then
@@ -1117,11 +1085,11 @@
# Example: ``OVS_ENABLE_TUNNELING=True``
OVS_ENABLE_TUNNELING=${OVS_ENABLE_TUNNELING:-$ENABLE_TENANT_TUNNELS}
- # Put config files in ``/etc/quantum`` for everyone to find
- if [[ ! -d /etc/quantum ]]; then
- sudo mkdir -p /etc/quantum
+ # Put config files in ``QUANTUM_CONF_DIR`` for everyone to find
+ if [[ ! -d $QUANTUM_CONF_DIR ]]; then
+ sudo mkdir -p $QUANTUM_CONF_DIR
fi
- sudo chown `whoami` /etc/quantum
+ sudo chown `whoami` $QUANTUM_CONF_DIR
if [[ "$Q_PLUGIN" = "openvswitch" ]]; then
Q_PLUGIN_CONF_PATH=etc/quantum/plugins/openvswitch
@@ -1145,7 +1113,7 @@
exit 1
fi
- # If needed, move config file from ``$QUANTUM_DIR/etc/quantum`` to ``/etc/quantum``
+ # If needed, move config file from ``$QUANTUM_DIR/etc/quantum`` to ``QUANTUM_CONF_DIR``
mkdir -p /$Q_PLUGIN_CONF_PATH
Q_PLUGIN_CONF_FILE=$Q_PLUGIN_CONF_PATH/$Q_PLUGIN_CONF_FILENAME
cp $QUANTUM_DIR/$Q_PLUGIN_CONF_FILE /$Q_PLUGIN_CONF_FILE
@@ -1154,19 +1122,14 @@
iniset /$Q_PLUGIN_CONF_FILE DATABASE sql_connection $dburl
unset dburl
- cp $QUANTUM_DIR/etc/quantum.conf $Q_CONF_FILE
- cp -p $QUANTUM_DIR/etc/rootwrap.conf $Q_RR_CONF_FILE
-
- # Copy over the config and filter bits
- Q_CONF_ROOTWRAP_D=/etc/quantum/rootwrap.d
- mkdir -p $Q_CONF_ROOTWRAP_D
- cp -pr $QUANTUM_DIR/etc/quantum/rootwrap.d/* $Q_CONF_ROOTWRAP_D/
+ cp $QUANTUM_DIR/etc/quantum.conf $QUANTUM_CONF
+ configure_quantum_rootwrap
fi
# Quantum service (for controller node)
if is_service_enabled q-svc; then
- Q_API_PASTE_FILE=/etc/quantum/api-paste.ini
- Q_POLICY_FILE=/etc/quantum/policy.json
+ Q_API_PASTE_FILE=$QUANTUM_CONF_DIR/api-paste.ini
+ Q_POLICY_FILE=$QUANTUM_CONF_DIR/policy.json
cp $QUANTUM_DIR/etc/api-paste.ini $Q_API_PASTE_FILE
cp $QUANTUM_DIR/etc/policy.json $Q_POLICY_FILE
@@ -1179,9 +1142,9 @@
fi
# Update either configuration file with plugin
- iniset $Q_CONF_FILE DEFAULT core_plugin $Q_PLUGIN_CLASS
+ iniset $QUANTUM_CONF DEFAULT core_plugin $Q_PLUGIN_CLASS
- iniset $Q_CONF_FILE DEFAULT auth_strategy $Q_AUTH_STRATEGY
+ iniset $QUANTUM_CONF DEFAULT auth_strategy $Q_AUTH_STRATEGY
quantum_setup_keystone $Q_API_PASTE_FILE filter:authtoken
# Configure plugin
@@ -1298,7 +1261,7 @@
if is_service_enabled q-dhcp; then
AGENT_DHCP_BINARY="$QUANTUM_DIR/bin/quantum-dhcp-agent"
- Q_DHCP_CONF_FILE=/etc/quantum/dhcp_agent.ini
+ Q_DHCP_CONF_FILE=$QUANTUM_CONF_DIR/dhcp_agent.ini
cp $QUANTUM_DIR/etc/dhcp_agent.ini $Q_DHCP_CONF_FILE
@@ -1328,7 +1291,7 @@
if is_service_enabled q-l3; then
AGENT_L3_BINARY="$QUANTUM_DIR/bin/quantum-l3-agent"
PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex}
- Q_L3_CONF_FILE=/etc/quantum/l3_agent.ini
+ Q_L3_CONF_FILE=$QUANTUM_CONF_DIR/l3_agent.ini
cp $QUANTUM_DIR/etc/l3_agent.ini $Q_L3_CONF_FILE
@@ -1364,7 +1327,7 @@
#Quantum Metadata
if is_service_enabled q-meta; then
AGENT_META_BINARY="$QUANTUM_DIR/bin/quantum-metadata-agent"
- Q_META_CONF_FILE=/etc/quantum/metadata_agent.ini
+ Q_META_CONF_FILE=$QUANTUM_CONF_DIR/metadata_agent.ini
cp $QUANTUM_DIR/etc/metadata_agent.ini $Q_META_CONF_FILE
@@ -1384,20 +1347,21 @@
# Quantum RPC support - must be updated prior to starting any of the services
if is_service_enabled quantum; then
- iniset $Q_CONF_FILE DEFAULT control_exchange quantum
+ iniset $QUANTUM_CONF DEFAULT control_exchange quantum
if is_service_enabled qpid ; then
- iniset $Q_CONF_FILE DEFAULT rpc_backend quantum.openstack.common.rpc.impl_qpid
+ iniset $QUANTUM_CONF DEFAULT rpc_backend quantum.openstack.common.rpc.impl_qpid
elif is_service_enabled zeromq; then
- iniset $Q_CONF_FILE DEFAULT rpc_backend quantum.openstack.common.rpc.impl_zmq
+ iniset $QUANTUM_CONF DEFAULT rpc_backend quantum.openstack.common.rpc.impl_zmq
elif [ -n "$RABBIT_HOST" ] && [ -n "$RABBIT_PASSWORD" ]; then
- iniset $Q_CONF_FILE DEFAULT rabbit_host $RABBIT_HOST
- iniset $Q_CONF_FILE DEFAULT rabbit_password $RABBIT_PASSWORD
+ iniset $QUANTUM_CONF DEFAULT rabbit_host $RABBIT_HOST
+ iniset $QUANTUM_CONF DEFAULT rabbit_password $RABBIT_PASSWORD
fi
if [[ "$Q_USE_DEBUG_COMMAND" == "True" ]]; then
cp $QUANTUM_DIR/etc/l3_agent.ini $QUANTUM_TEST_CONFIG_FILE
iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT verbose False
iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT debug False
iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
+ iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT root_helper "$Q_RR_COMMAND"
quantum_setup_keystone $QUANTUM_TEST_CONFIG_FILE DEFAULT set_auth_url
if [[ "$Q_PLUGIN" == "openvswitch" ]]; then
iniset $QUANTUM_TEST_CONFIG_FILE DEFAULT interface_driver quantum.agent.linux.interface.OVSInterfaceDriver
@@ -1599,7 +1563,7 @@
if is_service_enabled q-svc; then
echo_summary "Starting Quantum"
# Start the Quantum service
- screen_it q-svc "cd $QUANTUM_DIR && python $QUANTUM_DIR/bin/quantum-server --config-file $Q_CONF_FILE --config-file /$Q_PLUGIN_CONF_FILE"
+ screen_it q-svc "cd $QUANTUM_DIR && python $QUANTUM_DIR/bin/quantum-server --config-file $QUANTUM_CONF --config-file /$Q_PLUGIN_CONF_FILE"
echo "Waiting for Quantum to start..."
if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= wget -q -O- http://127.0.0.1:9696; do sleep 1; done"; then
echo "Quantum did not start"
@@ -1651,10 +1615,10 @@
fi
# Start up the quantum agents if enabled
-screen_it q-agt "python $AGENT_BINARY --config-file $Q_CONF_FILE --config-file /$Q_PLUGIN_CONF_FILE"
-screen_it q-dhcp "python $AGENT_DHCP_BINARY --config-file $Q_CONF_FILE --config-file=$Q_DHCP_CONF_FILE"
-screen_it q-meta "python $AGENT_META_BINARY --config-file $Q_CONF_FILE --config-file=$Q_META_CONF_FILE"
-screen_it q-l3 "python $AGENT_L3_BINARY --config-file $Q_CONF_FILE --config-file=$Q_L3_CONF_FILE"
+screen_it q-agt "python $AGENT_BINARY --config-file $QUANTUM_CONF --config-file /$Q_PLUGIN_CONF_FILE"
+screen_it q-dhcp "python $AGENT_DHCP_BINARY --config-file $QUANTUM_CONF --config-file=$Q_DHCP_CONF_FILE"
+screen_it q-meta "python $AGENT_META_BINARY --config-file $QUANTUM_CONF --config-file=$Q_META_CONF_FILE"
+screen_it q-l3 "python $AGENT_L3_BINARY --config-file $QUANTUM_CONF --config-file=$Q_L3_CONF_FILE"
if is_service_enabled nova; then
echo_summary "Starting Nova"
diff --git a/stackrc b/stackrc
index 39d34b0..8ac6ec5 100644
--- a/stackrc
+++ b/stackrc
@@ -89,8 +89,8 @@
QUANTUM_BRANCH=master
# quantum client
-QUANTUM_CLIENT_REPO=${GIT_BASE}/openstack/python-quantumclient
-QUANTUM_CLIENT_BRANCH=master
+QUANTUMCLIENT_REPO=${GIT_BASE}/openstack/python-quantumclient
+QUANTUMCLIENT_BRANCH=master
# Tempest test suite
TEMPEST_REPO=${GIT_BASE}/openstack/tempest.git