Merge "Set default OVS_SYSCONFDIR value depending on OVS_PREFIX"
diff --git a/lib/glance b/lib/glance
index 0ef42b0..e789aff 100644
--- a/lib/glance
+++ b/lib/glance
@@ -130,8 +130,9 @@
# cleanup_glance() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up
function cleanup_glance {
- # delete image files (glance)
- sudo rm -rf $GLANCE_CACHE_DIR $GLANCE_IMAGE_DIR $(glance_remote_conf '')
+ # delete image files (glance) and all of the glance-remote temporary
+ # storage
+ sudo rm -rf $GLANCE_CACHE_DIR $GLANCE_IMAGE_DIR "${DATA_DIR}/glance-remote"
# Cleanup multiple stores directories
if [[ "$GLANCE_ENABLE_MULTIPLE_STORES" == "True" ]]; then
@@ -464,39 +465,41 @@
# glance_remote_conf() - Return the path to an alternate config file for
# the remote glance clone
function glance_remote_conf {
- echo "$(dirname ${GLANCE_CONF_DIR})/glance-remote/"$(basename "$1")
+ echo $(dirname "${GLANCE_CONF_DIR}")/glance-remote/$(basename "$1")
}
# start_glance_remote_clone() - Clone the regular glance api worker
function start_glance_remote_clone {
- local glance_remote_conf glance_remote_port
+ local glance_remote_conf_dir glance_remote_port remote_data
+ local glance_remote_uwsgi
- glance_remote_conf_dir=$(glance_remote_conf '')
+ glance_remote_conf_dir="$(glance_remote_conf "")"
glance_remote_port=$(get_random_port)
+ glance_remote_uwsgi="$(glance_remote_conf $GLANCE_UWSGI_CONF)"
# Clone the existing ready-to-go glance-api setup
- sudo rm -Rf $glance_remote_conf_dir
- sudo cp -r "$GLANCE_CONF_DIR" $glance_remote_conf_dir
- sudo chown $STACK_USER -R $glance_remote_conf_dir
+ sudo rm -Rf "$glance_remote_conf_dir"
+ sudo cp -r "$GLANCE_CONF_DIR" "$glance_remote_conf_dir"
+ sudo chown $STACK_USER -R "$glance_remote_conf_dir"
# Point this worker at different data dirs
remote_data="${DATA_DIR}/glance-remote"
mkdir -p $remote_data/os_glance_tasks_store \
- $remote_data/os_glance_staging_store
- iniset $(glance_remote_conf 'glance-api.conf') os_glance_staging_store \
- filesystem_store_datadir ${remote_data}/os_glance_staging_store
- iniset $(glance_remote_conf 'glance-api.conf') os_glance_tasks_store \
- filesystem_store_datadir ${remote_data}/os_glance_tasks_store
+ "${remote_data}/os_glance_staging_store"
+ iniset $(glance_remote_conf "$GLANCE_API_CONF") os_glance_staging_store \
+ filesystem_store_datadir "${remote_data}/os_glance_staging_store"
+ iniset $(glance_remote_conf "$GLANCE_API_CONF") os_glance_tasks_store \
+ filesystem_store_datadir "${remote_data}/os_glance_tasks_store"
# Change our uwsgi to our new port
sed -ri "s/^(http-socket.*):[0-9]+/\1:$glance_remote_port/" \
- $(glance_remote_conf $GLANCE_UWSGI_CONF)
+ "$glance_remote_uwsgi"
# Update the self-reference url with our new port
iniset $(glance_remote_conf $GLANCE_API_CONF) DEFAULT \
worker_self_reference_url \
$(awk '-F= ' '/^http-socket/ { print "http://"$2 }' \
- $(glance_remote_conf $GLANCE_UWSGI_CONF))
+ "$glance_remote_uwsgi")
# We need to create the systemd service for the clone, but then
# change it to include an Environment line to point the WSGI app
@@ -504,10 +507,11 @@
write_uwsgi_user_unit_file devstack@g-api-r.service "$(which uwsgi) \
--procname-prefix \
glance-api-remote \
- --ini $(glance_remote_conf $GLANCE_UWSGI_CONF)" \
+ --ini $glance_remote_uwsgi" \
"" "$STACK_USER"
iniset -sudo ${SYSTEMD_DIR}/devstack@g-api-r.service \
- "Service" "Environment" "OS_GLANCE_CONFIG_DIR=$glance_remote_conf_dir"
+ "Service" "Environment" \
+ "OS_GLANCE_CONFIG_DIR=$glance_remote_conf_dir"
# Reload and restart with the new config
$SYSTEMCTL daemon-reload
@@ -516,7 +520,7 @@
get_or_create_service glance_remote image_remote "Alternate glance"
get_or_create_endpoint image_remote $REGION_NAME \
$(awk '-F= ' '/^http-socket/ { print "http://"$2 }' \
- $(glance_remote_conf $GLANCE_UWSGI_CONF))
+ $glance_remote_uwsgi)
}
# start_glance() - Start running processes
diff --git a/lib/nova b/lib/nova
index 216c3cf..930529a 100644
--- a/lib/nova
+++ b/lib/nova
@@ -140,7 +140,7 @@
# ``NOVA_USE_SERVICE_TOKEN`` is a mode where service token is passed along with
# user token while communicating to external RESP API's like Neutron, Cinder
# and Glance.
-NOVA_USE_SERVICE_TOKEN=$(trueorfalse False NOVA_USE_SERVICE_TOKEN)
+NOVA_USE_SERVICE_TOKEN=$(trueorfalse True NOVA_USE_SERVICE_TOKEN)
# ``NOVA_ALLOW_MOVE_TO_SAME_HOST`` can be set to False in multi node DevStack,
# where there are at least two nova-computes.
diff --git a/lib/tempest b/lib/tempest
index 5de8848..29a6229 100644
--- a/lib/tempest
+++ b/lib/tempest
@@ -365,8 +365,7 @@
iniset $TEMPEST_CONFIG image-feature-enabled import_image $GLANCE_USE_IMPORT_WORKFLOW
iniset $TEMPEST_CONFIG image-feature-enabled os_glance_reserved True
if is_service_enabled g-api-r; then
- iniset $TEMPEST_CONFIG image alternate_image_endpoint \
- "image_remote"
+ iniset $TEMPEST_CONFIG image alternate_image_endpoint image_remote
fi
# Compute