From fe65e2dffac177db61ab868343d6dc32e2da3b6c Mon Sep 17 00:00:00 2001 From: Flavio Percoco Date: Wed, 3 Sep 2014 11:51:00 +0200 Subject: [PATCH] Set configs for glance_store glance_store uses a new section to keep its configs. This patch duplicates the existing, store related, config options and sets them under the glance_store section. Once glance is fully migrated, the old options will be removed. Change-Id: Ie3de87cf07a321415d111e644ccbb360c7491151 --- lib/glance | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/lib/glance b/lib/glance index 92577d9f47..7a84e8ea0d 100644 --- a/lib/glance +++ b/lib/glance @@ -102,7 +102,6 @@ function configure_glance { inicomment $GLANCE_API_CONF DEFAULT log_file iniset $GLANCE_API_CONF DEFAULT sql_connection $dburl iniset $GLANCE_API_CONF DEFAULT use_syslog $SYSLOG - iniset $GLANCE_API_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/ iniset $GLANCE_API_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/ iniset $GLANCE_API_CONF paste_deploy flavor keystone+cachemanagement iniset $GLANCE_API_CONF keystone_authtoken identity_uri $KEYSTONE_AUTH_URI @@ -121,6 +120,13 @@ function configure_glance { iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,raw,iso" fi + # Store specific configs + iniset $GLANCE_API_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/ + + # NOTE(flaper87): Until Glance is fully migrated, set these configs in both + # sections. + iniset $GLANCE_API_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/ + # Store the images in swift if enabled. if is_service_enabled s-proxy; then iniset $GLANCE_API_CONF DEFAULT default_store swift @@ -130,6 +136,15 @@ function configure_glance { iniset $GLANCE_API_CONF DEFAULT swift_store_create_container_on_put True iniset $GLANCE_API_CONF DEFAULT known_stores "glance.store.filesystem.Store, glance.store.http.Store, glance.store.swift.Store" + + # NOTE(flaper87): Until Glance is fully migrated, set these configs in both + # sections. + iniset $GLANCE_API_CONF glance_store default_store swift + iniset $GLANCE_API_CONF glance_store swift_store_auth_address $KEYSTONE_SERVICE_URI/v2.0/ + iniset $GLANCE_API_CONF glance_store swift_store_user $SERVICE_TENANT_NAME:glance-swift + iniset $GLANCE_API_CONF glance_store swift_store_key $SERVICE_PASSWORD + iniset $GLANCE_API_CONF glance_store swift_store_create_container_on_put True + iniset $GLANCE_API_CONF glance_store stores "file, http, swift" fi cp -p $GLANCE_DIR/etc/glance-registry-paste.ini $GLANCE_REGISTRY_PASTE_INI @@ -140,7 +155,6 @@ function configure_glance { iniset $GLANCE_CACHE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL inicomment $GLANCE_CACHE_CONF DEFAULT log_file iniset $GLANCE_CACHE_CONF DEFAULT use_syslog $SYSLOG - iniset $GLANCE_CACHE_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/ iniset $GLANCE_CACHE_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/ iniuncomment $GLANCE_CACHE_CONF DEFAULT auth_url iniset $GLANCE_CACHE_CONF DEFAULT auth_url $KEYSTONE_AUTH_URI/v2.0 @@ -151,6 +165,12 @@ function configure_glance { iniuncomment $GLANCE_CACHE_CONF DEFAULT auth_password iniset $GLANCE_CACHE_CONF DEFAULT admin_password $SERVICE_PASSWORD + # Store specific confs + # NOTE(flaper87): Until Glance is fully migrated, set these configs in both + # sections. + iniset $GLANCE_CACHE_CONF DEFAULT filesystem_store_datadir $GLANCE_IMAGE_DIR/ + iniset $GLANCE_CACHE_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/ + cp -p $GLANCE_DIR/etc/policy.json $GLANCE_POLICY_JSON cp -p $GLANCE_DIR/etc/schema-image.json $GLANCE_SCHEMA_JSON }