Move glance auth cache creation to configure_glance

We install the glance api on all nodes in multinode testing. This has
been failing because we don't configure the glance auth cache dirs if
we only install the glance api service. This was done as part of
init_glance which is only run when installing g-reg.

Fix this by moving the auth cache dir creation step into
configure_glance which is run for the glance api.

Change-Id: Ie669827507df0f524e6e53fe4ab3dff848dd4bd7
This commit is contained in:
Clark Boylan 2017-09-30 09:55:38 -07:00 committed by John L. Villalovos
parent 301d4d1678
commit 56131eb11f

View File

@ -105,6 +105,11 @@ function cleanup_glance {
function configure_glance {
sudo install -d -o $STACK_USER $GLANCE_CONF_DIR $GLANCE_METADEF_DIR
# We run this here as this configures cache dirs for the auth middleware
# which is used in the api server and not in the registry. The api
# Server is configured through this function and not init_glance.
create_glance_cache_dir
# Copy over our glance configurations and update them
cp $GLANCE_DIR/etc/glance-registry.conf $GLANCE_REGISTRY_CONF
iniset $GLANCE_REGISTRY_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
@ -279,7 +284,7 @@ function create_glance_accounts {
fi
}
# create_glance_cache_dir() - Part of the init_glance() process
# create_glance_cache_dir() - Part of the configure_glance() process
function create_glance_cache_dir {
# Create cache dir
sudo install -d -o $STACK_USER $GLANCE_AUTH_CACHE_DIR/api $GLANCE_AUTH_CACHE_DIR/registry $GLANCE_AUTH_CACHE_DIR/search $GLANCE_AUTH_CACHE_DIR/artifact
@ -306,8 +311,6 @@ function init_glance {
# Load metadata definitions
$GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_load_metadefs
time_stop "dbsync"
create_glance_cache_dir
}
# install_glanceclient() - Collect source and prepare