Browse code

Remove glance registry configuration

Glance has deprecated registry serivce for long and now efforts are placed to
remove the registry code from the glance repo.

To avoid regression on other projects, gate jobs etc. removing
configuring registry service from the devstack.

Change-Id: I6a7be6bdc97acc43c8e985060aeea05d92642e80

Abhishek Kekane authored on 2020/02/17 15:11:15
Showing 1 changed files
... ...
@@ -67,9 +67,7 @@ GLANCE_TASKS_DIR=${GLANCE_MULTISTORE_FILE_IMAGE_DIR:=$DATA_DIR/os_glance_tasks_s
67 67
 
68 68
 GLANCE_CONF_DIR=${GLANCE_CONF_DIR:-/etc/glance}
69 69
 GLANCE_METADEF_DIR=$GLANCE_CONF_DIR/metadefs
70
-GLANCE_REGISTRY_CONF=$GLANCE_CONF_DIR/glance-registry.conf
71 70
 GLANCE_API_CONF=$GLANCE_CONF_DIR/glance-api.conf
72
-GLANCE_REGISTRY_PASTE_INI=$GLANCE_CONF_DIR/glance-registry-paste.ini
73 71
 GLANCE_API_PASTE_INI=$GLANCE_CONF_DIR/glance-api-paste.ini
74 72
 GLANCE_CACHE_CONF=$GLANCE_CONF_DIR/glance-cache.conf
75 73
 GLANCE_SCHEMA_JSON=$GLANCE_CONF_DIR/schema-image.json
... ...
@@ -88,8 +86,6 @@ GLANCE_SERVICE_PORT=${GLANCE_SERVICE_PORT:-9292}
88 88
 GLANCE_SERVICE_PORT_INT=${GLANCE_SERVICE_PORT_INT:-19292}
89 89
 GLANCE_HOSTPORT=${GLANCE_HOSTPORT:-$GLANCE_SERVICE_HOST:$GLANCE_SERVICE_PORT}
90 90
 GLANCE_SERVICE_PROTOCOL=${GLANCE_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
91
-GLANCE_REGISTRY_PORT=${GLANCE_REGISTRY_PORT:-9191}
92
-GLANCE_REGISTRY_PORT_INT=${GLANCE_REGISTRY_PORT_INT:-19191}
93 91
 GLANCE_UWSGI=$GLANCE_BIN_DIR/glance-wsgi-api
94 92
 GLANCE_UWSGI_CONF=$GLANCE_CONF_DIR/glance-uwsgi.ini
95 93
 # If wsgi mode is uwsgi run glance under uwsgi, else default to eventlet
... ...
@@ -135,31 +131,10 @@ function cleanup_glance {
135 135
 function configure_glance {
136 136
     sudo install -d -o $STACK_USER $GLANCE_CONF_DIR $GLANCE_METADEF_DIR
137 137
 
138
-    # Set non-default configuration options for registry
139
-    iniset $GLANCE_REGISTRY_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
140
-    iniset $GLANCE_REGISTRY_CONF DEFAULT bind_host $GLANCE_SERVICE_LISTEN_ADDRESS
141
-    iniset $GLANCE_REGISTRY_CONF DEFAULT workers $API_WORKERS
138
+    # Set non-default configuration options for the API server
142 139
     local dburl
143 140
     dburl=`database_connection_url glance`
144
-    iniset $GLANCE_REGISTRY_CONF database connection $dburl
145
-    iniset $GLANCE_REGISTRY_CONF DEFAULT use_syslog $SYSLOG
146
-    iniset $GLANCE_REGISTRY_CONF paste_deploy flavor keystone
147
-    configure_keystone_authtoken_middleware $GLANCE_REGISTRY_CONF glance
148
-    iniset $GLANCE_REGISTRY_CONF oslo_messaging_notifications driver messagingv2
149
-    iniset_rpc_backend glance $GLANCE_REGISTRY_CONF
150
-    iniset $GLANCE_REGISTRY_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT"
151
-
152
-    # Configure multiple stores
153
-    if [[ "$GLANCE_ENABLE_MULTIPLE_STORES" == "True" ]]; then
154
-        local store enabled_backends
155
-        enabled_backends=""
156
-        for store in $(echo $GLANCE_MULTIPLE_FILE_STORES | tr "," "\n"); do
157
-            enabled_backends+="${store}:file,"
158
-        done
159
-        iniset $GLANCE_API_CONF DEFAULT enabled_backends ${enabled_backends::-1}
160
-    fi
161 141
 
162
-    # Set non-default configuration options for the API server
163 142
     iniset $GLANCE_API_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
164 143
     iniset $GLANCE_API_CONF database connection $dburl
165 144
     iniset $GLANCE_API_CONF DEFAULT use_syslog $SYSLOG
... ...
@@ -198,7 +173,6 @@ function configure_glance {
198 198
         # Store specific configs
199 199
         iniset $GLANCE_API_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/
200 200
     fi
201
-    iniset $GLANCE_API_CONF DEFAULT registry_host $(ipv6_unquote $GLANCE_SERVICE_HOST)
202 201
 
203 202
     # CORS feature support - to allow calls from Horizon by default
204 203
     if [ -n "$GLANCE_CORS_ALLOWED_ORIGIN" ]; then
... ...
@@ -240,21 +214,13 @@ function configure_glance {
240 240
 
241 241
     if is_service_enabled tls-proxy; then
242 242
         iniset $GLANCE_API_CONF DEFAULT bind_port $GLANCE_SERVICE_PORT_INT
243
-        iniset $GLANCE_REGISTRY_CONF DEFAULT bind_port $GLANCE_REGISTRY_PORT_INT
244 243
 
245 244
         iniset $GLANCE_API_CONF keystone_authtoken identity_uri $KEYSTONE_AUTH_URI
246
-        iniset $GLANCE_REGISTRY_CONF keystone_authtoken identity_uri $KEYSTONE_AUTH_URI
247
-    fi
248
-
249
-    if is_service_enabled tls-proxy; then
250
-        iniset $GLANCE_API_CONF DEFAULT registry_client_protocol https
251 245
     fi
252 246
 
253 247
     # Format logging
254 248
     setup_logging $GLANCE_API_CONF
255
-    setup_logging $GLANCE_REGISTRY_CONF
256 249
 
257
-    cp -p $GLANCE_DIR/etc/glance-registry-paste.ini $GLANCE_REGISTRY_PASTE_INI
258 250
     cp -p $GLANCE_DIR/etc/glance-api-paste.ini $GLANCE_API_PASTE_INI
259 251
 
260 252
     # Set non-default configuration options for the glance-cache
... ...
@@ -265,7 +231,6 @@ function configure_glance {
265 265
     iniset $GLANCE_CACHE_CONF DEFAULT admin_tenant_name $SERVICE_PROJECT_NAME
266 266
     iniset $GLANCE_CACHE_CONF DEFAULT admin_user glance
267 267
     iniset $GLANCE_CACHE_CONF DEFAULT admin_password $SERVICE_PASSWORD
268
-    iniset $GLANCE_CACHE_CONF DEFAULT registry_host $(ipv6_unquote $GLANCE_SERVICE_HOST)
269 268
 
270 269
     # Store specific confs
271 270
     iniset $GLANCE_CACHE_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/
... ...
@@ -387,10 +352,8 @@ function start_glance {
387 387
         if [[ "$WSGI_MODE" != "uwsgi" ]]; then
388 388
             start_tls_proxy glance-service '*' $GLANCE_SERVICE_PORT $GLANCE_SERVICE_HOST $GLANCE_SERVICE_PORT_INT
389 389
         fi
390
-        start_tls_proxy glance-registry '*' $GLANCE_REGISTRY_PORT $GLANCE_SERVICE_HOST $GLANCE_REGISTRY_PORT_INT
391 390
     fi
392 391
 
393
-    run_process g-reg "$GLANCE_BIN_DIR/glance-registry --config-file=$GLANCE_CONF_DIR/glance-registry.conf"
394 392
     if [[ "$WSGI_MODE" == "uwsgi" ]]; then
395 393
         run_process g-api "$(which uwsgi) --procname-prefix glance-api --ini $GLANCE_UWSGI_CONF"
396 394
     else
... ...
@@ -406,7 +369,6 @@ function start_glance {
406 406
 # stop_glance() - Stop running processes
407 407
 function stop_glance {
408 408
     stop_process g-api
409
-    stop_process g-reg
410 409
 }
411 410
 
412 411
 # Restore xtrace