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
| ... | ... |
@@ -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 |