Using the swift_store_auth_address, swift_store_user and swift_store_key are
marked as deprecated in glance in favour of using a standalone config file that
provides multiple auth options.
Create and use a standalone authentication file for communicating with swift.
Change-Id: I9b5361ce6e1771781d7ae7226974604a7f9e5d00
| ... | ... |
@@ -56,6 +56,7 @@ GLANCE_SEARCH_PASTE_INI=$GLANCE_CONF_DIR/glance-search-paste.ini |
| 56 | 56 |
GLANCE_CACHE_CONF=$GLANCE_CONF_DIR/glance-cache.conf |
| 57 | 57 |
GLANCE_POLICY_JSON=$GLANCE_CONF_DIR/policy.json |
| 58 | 58 |
GLANCE_SCHEMA_JSON=$GLANCE_CONF_DIR/schema-image.json |
| 59 |
+GLANCE_SWIFT_STORE_CONF=$GLANCE_CONF_DIR/glance-swift-store.conf |
|
| 59 | 60 |
|
| 60 | 61 |
if is_ssl_enabled_service "glance" || is_service_enabled tls-proxy; then |
| 61 | 62 |
GLANCE_SERVICE_PROTOCOL="https" |
| ... | ... |
@@ -145,11 +146,20 @@ function configure_glance {
|
| 145 | 145 |
# Store the images in swift if enabled. |
| 146 | 146 |
if is_service_enabled s-proxy; then |
| 147 | 147 |
iniset $GLANCE_API_CONF glance_store default_store swift |
| 148 |
- iniset $GLANCE_API_CONF glance_store swift_store_auth_address $KEYSTONE_SERVICE_URI/v2.0/ |
|
| 149 |
- iniset $GLANCE_API_CONF glance_store swift_store_user $SERVICE_TENANT_NAME:glance-swift |
|
| 150 |
- iniset $GLANCE_API_CONF glance_store swift_store_key $SERVICE_PASSWORD |
|
| 151 | 148 |
iniset $GLANCE_API_CONF glance_store swift_store_create_container_on_put True |
| 149 |
+ |
|
| 150 |
+ iniset $GLANCE_API_CONF glance_store swift_store_config_file $GLANCE_SWIFT_STORE_CONF |
|
| 151 |
+ iniset $GLANCE_API_CONF glance_store default_swift_reference ref1 |
|
| 152 | 152 |
iniset $GLANCE_API_CONF glance_store stores "file, http, swift" |
| 153 |
+ |
|
| 154 |
+ iniset $GLANCE_SWIFT_STORE_CONF ref1 user $SERVICE_TENANT_NAME:glance-swift |
|
| 155 |
+ iniset $GLANCE_SWIFT_STORE_CONF ref1 key $SERVICE_PASSWORD |
|
| 156 |
+ iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address $KEYSTONE_SERVICE_URI/v2.0/ |
|
| 157 |
+ |
|
| 158 |
+ # commenting is not strictly necessary but it's confusing to have bad values in conf |
|
| 159 |
+ inicomment $GLANCE_API_CONF glance_store swift_store_user |
|
| 160 |
+ inicomment $GLANCE_API_CONF glance_store swift_store_key |
|
| 161 |
+ inicomment $GLANCE_API_CONF glance_store swift_store_auth_address |
|
| 153 | 162 |
fi |
| 154 | 163 |
|
| 155 | 164 |
if is_service_enabled tls-proxy; then |