Browse code

only set nova catalog if it's not the default

This ensures we only set the nova catalog when it's not the default,
instead of also putting defaults in devstack.

Change-Id: Ibb0dcb8bae2e9223db302d7b19e8fbee4ebbf0e3

Sean Dague authored on 2017/02/18 01:51:36
Showing 1 changed files
... ...
@@ -125,12 +125,6 @@ if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then
125 125
     done
126 126
 fi
127 127
 
128
-# Change the default nova_catalog_info and nova_catalog_admin_info values in
129
-# cinder so that the service name cinder is searching for matches that set for
130
-# nova in keystone.
131
-CINDER_NOVA_CATALOG_INFO=${CINDER_NOVA_CATALOG_INFO:-compute:nova:publicURL}
132
-CINDER_NOVA_CATALOG_ADMIN_INFO=${CINDER_NOVA_CATALOG_ADMIN_INFO:-compute:nova:adminURL}
133
-
134 128
 # Environment variables to configure the image-volume cache
135 129
 CINDER_IMG_CACHE_ENABLED=${CINDER_IMG_CACHE_ENABLED:-True}
136 130
 
... ...
@@ -268,8 +262,15 @@ function configure_cinder {
268 268
 
269 269
     configure_auth_token_middleware $CINDER_CONF cinder $CINDER_AUTH_CACHE_DIR
270 270
 
271
-    iniset $CINDER_CONF DEFAULT nova_catalog_info $CINDER_NOVA_CATALOG_INFO
272
-    iniset $CINDER_CONF DEFAULT nova_catalog_admin_info $CINDER_NOVA_CATALOG_ADMIN_INFO
271
+    # Change the default nova_catalog_info and nova_catalog_admin_info values in
272
+    # cinder so that the service name cinder is searching for matches that set for
273
+    # nova in keystone.
274
+    if [[ -n "$CINDER_NOVA_CATALOG_INFO" ]]; then
275
+        iniset $CINDER_CONF DEFAULT nova_catalog_info $CINDER_NOVA_CATALOG_INFO
276
+    fi
277
+    if [[ -n "$CINDER_NOVA_CATALOG_ADMIN_INFO" ]]; then
278
+        iniset $CINDER_CONF DEFAULT nova_catalog_admin_info $CINDER_NOVA_CATALOG_ADMIN_INFO
279
+    fi
273 280
 
274 281
     iniset $CINDER_CONF DEFAULT auth_strategy keystone
275 282
     iniset $CINDER_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL