Browse code

Merge "Set configs for glance_store"

Jenkins authored on 2014/09/06 10:25:54
Showing 1 changed files
... ...
@@ -106,7 +106,6 @@ function configure_glance {
106 106
     inicomment $GLANCE_API_CONF DEFAULT log_file
107 107
     iniset $GLANCE_API_CONF DEFAULT sql_connection $dburl
108 108
     iniset $GLANCE_API_CONF DEFAULT use_syslog $SYSLOG
109
-    iniset $GLANCE_API_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/
110 109
     iniset $GLANCE_API_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/
111 110
     iniset $GLANCE_API_CONF paste_deploy flavor keystone+cachemanagement
112 111
     iniset $GLANCE_API_CONF keystone_authtoken identity_uri $KEYSTONE_AUTH_URI
... ...
@@ -125,6 +124,13 @@ function configure_glance {
125 125
         iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,raw,iso"
126 126
     fi
127 127
 
128
+    # Store specific configs
129
+    iniset $GLANCE_API_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/
130
+
131
+    # NOTE(flaper87): Until Glance is fully migrated, set these configs in both
132
+    # sections.
133
+    iniset $GLANCE_API_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/
134
+
128 135
     # Store the images in swift if enabled.
129 136
     if is_service_enabled s-proxy; then
130 137
         iniset $GLANCE_API_CONF DEFAULT default_store swift
... ...
@@ -134,6 +140,15 @@ function configure_glance {
134 134
         iniset $GLANCE_API_CONF DEFAULT swift_store_create_container_on_put True
135 135
 
136 136
         iniset $GLANCE_API_CONF DEFAULT known_stores "glance.store.filesystem.Store, glance.store.http.Store, glance.store.swift.Store"
137
+
138
+        # NOTE(flaper87): Until Glance is fully migrated, set these configs in both
139
+        # sections.
140
+        iniset $GLANCE_API_CONF glance_store default_store swift
141
+        iniset $GLANCE_API_CONF glance_store swift_store_auth_address $KEYSTONE_SERVICE_URI/v2.0/
142
+        iniset $GLANCE_API_CONF glance_store swift_store_user $SERVICE_TENANT_NAME:glance-swift
143
+        iniset $GLANCE_API_CONF glance_store swift_store_key $SERVICE_PASSWORD
144
+        iniset $GLANCE_API_CONF glance_store swift_store_create_container_on_put True
145
+        iniset $GLANCE_API_CONF glance_store stores "file, http, swift"
137 146
     fi
138 147
 
139 148
     cp -p $GLANCE_DIR/etc/glance-registry-paste.ini $GLANCE_REGISTRY_PASTE_INI
... ...
@@ -144,7 +159,6 @@ function configure_glance {
144 144
     iniset $GLANCE_CACHE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
145 145
     inicomment $GLANCE_CACHE_CONF DEFAULT log_file
146 146
     iniset $GLANCE_CACHE_CONF DEFAULT use_syslog $SYSLOG
147
-    iniset $GLANCE_CACHE_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/
148 147
     iniset $GLANCE_CACHE_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/
149 148
     iniuncomment $GLANCE_CACHE_CONF DEFAULT auth_url
150 149
     iniset $GLANCE_CACHE_CONF DEFAULT auth_url $KEYSTONE_AUTH_URI/v2.0
... ...
@@ -155,6 +169,12 @@ function configure_glance {
155 155
     iniuncomment $GLANCE_CACHE_CONF DEFAULT auth_password
156 156
     iniset $GLANCE_CACHE_CONF DEFAULT admin_password $SERVICE_PASSWORD
157 157
 
158
+    # Store specific confs
159
+    # NOTE(flaper87): Until Glance is fully migrated, set these configs in both
160
+    # sections.
161
+    iniset $GLANCE_CACHE_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/
162
+    iniset $GLANCE_CACHE_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/
163
+
158 164
     cp -p $GLANCE_DIR/etc/policy.json $GLANCE_POLICY_JSON
159 165
     cp -p $GLANCE_DIR/etc/schema-image.json $GLANCE_SCHEMA_JSON
160 166
 }