Browse code

Merge "Move glance auth cache creation to configure_glance"

Zuul authored on 2017/10/18 17:28:18
Showing 1 changed files
... ...
@@ -105,6 +105,11 @@ function cleanup_glance {
105 105
 function configure_glance {
106 106
     sudo install -d -o $STACK_USER $GLANCE_CONF_DIR $GLANCE_METADEF_DIR
107 107
 
108
+    # We run this here as this configures cache dirs for the auth middleware
109
+    # which is used in the api server and not in the registry. The api
110
+    # Server is configured through this function and not init_glance.
111
+    create_glance_cache_dir
112
+
108 113
     # Copy over our glance configurations and update them
109 114
     cp $GLANCE_DIR/etc/glance-registry.conf $GLANCE_REGISTRY_CONF
110 115
     iniset $GLANCE_REGISTRY_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
... ...
@@ -279,7 +284,7 @@ function create_glance_accounts {
279 279
     fi
280 280
 }
281 281
 
282
-# create_glance_cache_dir() - Part of the init_glance() process
282
+# create_glance_cache_dir() - Part of the configure_glance() process
283 283
 function create_glance_cache_dir {
284 284
     # Create cache dir
285 285
     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 {
306 306
     # Load metadata definitions
307 307
     $GLANCE_BIN_DIR/glance-manage --config-file $GLANCE_CONF_DIR/glance-api.conf db_load_metadefs
308 308
     time_stop "dbsync"
309
-
310
-    create_glance_cache_dir
311 309
 }
312 310
 
313 311
 # install_glanceclient() - Collect source and prepare