Browse code

Merge "Clean up Glance config files"

Zuul authored on 2018/04/25 00:13:37
Showing 1 changed files
... ...
@@ -111,11 +111,9 @@ function configure_glance {
111 111
     # Server is configured through this function and not init_glance.
112 112
     create_glance_cache_dir
113 113
 
114
-    # Copy over our glance configurations and update them
115
-    cp $GLANCE_DIR/etc/glance-registry.conf $GLANCE_REGISTRY_CONF
114
+    # Set non-default configuration options for registry
116 115
     iniset $GLANCE_REGISTRY_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
117 116
     iniset $GLANCE_REGISTRY_CONF DEFAULT bind_host $GLANCE_SERVICE_LISTEN_ADDRESS
118
-    inicomment $GLANCE_REGISTRY_CONF DEFAULT log_file
119 117
     local dburl
120 118
     dburl=`database_connection_url glance`
121 119
     iniset $GLANCE_REGISTRY_CONF database connection $dburl
... ...
@@ -126,8 +124,8 @@ function configure_glance {
126 126
     iniset_rpc_backend glance $GLANCE_REGISTRY_CONF
127 127
     iniset $GLANCE_REGISTRY_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT"
128 128
 
129
+    # Set non-default configuration options for the API server
129 130
     iniset $GLANCE_API_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
130
-    inicomment $GLANCE_API_CONF DEFAULT log_file
131 131
     iniset $GLANCE_API_CONF database connection $dburl
132 132
     iniset $GLANCE_API_CONF DEFAULT use_syslog $SYSLOG
133 133
     iniset $GLANCE_API_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/
... ...
@@ -185,11 +183,6 @@ function configure_glance {
185 185
             iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address $KEYSTONE_SERVICE_URI/v3
186 186
         fi
187 187
         iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_version 3
188
-
189
-        # commenting is not strictly necessary but it's confusing to have bad values in conf
190
-        inicomment $GLANCE_API_CONF glance_store swift_store_user
191
-        inicomment $GLANCE_API_CONF glance_store swift_store_key
192
-        inicomment $GLANCE_API_CONF glance_store swift_store_auth_address
193 188
     fi
194 189
 
195 190
     # We need to tell glance what it's public endpoint is so that the version
... ...
@@ -215,18 +208,13 @@ function configure_glance {
215 215
     cp -p $GLANCE_DIR/etc/glance-registry-paste.ini $GLANCE_REGISTRY_PASTE_INI
216 216
     cp -p $GLANCE_DIR/etc/glance-api-paste.ini $GLANCE_API_PASTE_INI
217 217
 
218
-    cp $GLANCE_DIR/etc/glance-cache.conf $GLANCE_CACHE_CONF
218
+    # Set non-default configuration options for the glance-cache
219 219
     iniset $GLANCE_CACHE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
220
-    inicomment $GLANCE_CACHE_CONF DEFAULT log_file
221 220
     iniset $GLANCE_CACHE_CONF DEFAULT use_syslog $SYSLOG
222 221
     iniset $GLANCE_CACHE_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/
223
-    iniuncomment $GLANCE_CACHE_CONF DEFAULT auth_url
224 222
     iniset $GLANCE_CACHE_CONF DEFAULT auth_url $KEYSTONE_AUTH_URI
225
-    iniuncomment $GLANCE_CACHE_CONF DEFAULT auth_tenant_name
226 223
     iniset $GLANCE_CACHE_CONF DEFAULT admin_tenant_name $SERVICE_PROJECT_NAME
227
-    iniuncomment $GLANCE_CACHE_CONF DEFAULT auth_user
228 224
     iniset $GLANCE_CACHE_CONF DEFAULT admin_user glance
229
-    iniuncomment $GLANCE_CACHE_CONF DEFAULT auth_password
230 225
     iniset $GLANCE_CACHE_CONF DEFAULT admin_password $SERVICE_PASSWORD
231 226
     iniset $GLANCE_CACHE_CONF DEFAULT registry_host $GLANCE_SERVICE_HOST
232 227