From 56131eb11fa431a13028e90f179e5444c0297f2a Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Sat, 30 Sep 2017 09:55:38 -0700 Subject: [PATCH] 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 --- lib/glance | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/glance b/lib/glance index 74734c7516..ad286bacb9 100644 --- a/lib/glance +++ b/lib/glance @@ -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