Error Configuring tenant-specific image locations (Multi tenant) with Swift storage!

asked 2016-07-11 16:36:08 -0500

Vinoth gravatar image

Hi,

I am trying to enable Multi Project (Multi-Tenant) glance storage in swift in my Juno openstack environment. As of now, glance with swift backend store is working fine with dedicated Service Account (Single Tenant)

I followed the link below for the configuration http://docs.openstack.org/admin-guide...

I incuded the below paramenters in glance-api.conf file,

> swift_store_multi_tenant = True 
> swift_store_admin_tenants = <My service tenant ID>

Then restarted the glance-api service.

The following error occurred when I tried to upload a new image to glance,

2016-07-11 21:09:24.715 14886 ERROR glance.api.v1.upload_utils [ed13c27e-94f4-458b-8b91-2266709ba5d7 66f14939dd36416292e29b67ad53609a 7c5b5ae5ad424ff69355bed9f17a2d60 - - -] Failed to upload image 0fd53d0a-23b1-447c-b6a9-19eeab24e030
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils Traceback (most recent call last):
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.7/dist-packages/glance/api/v1/upload_utils.py", line 107, in upload_data_to_store
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils     context=req.context)
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.7/dist-packages/glance_store/backend.py", line 342, in store_add_to_backend
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils     (location, size, checksum, metadata) = store.add(image_id, data, size)
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.7/dist-packages/glance_store/_drivers/swift/store.py", line 458, in add
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils     location = self.create_location(image_id, context=context)
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.7/dist-packages/glance_store/_drivers/swift/store.py", line 808, in create_location
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils     ep = self._get_endpoint(context)
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils   File "/usr/lib/python2.7/dist-packages/glance_store/_drivers/swift/store.py", line 748, in _get_endpoint
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils     reason=reason)
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils BadStoreConfiguration: None
2016-07-11 21:09:24.715 14886 TRACE glance.api.v1.upload_utils

Below is my glance-api.conf file for your reference.

[DEFAULT]
debug = True
verbose = True

default_store = swift

bind_host = 172.30.7.200
bind_port = 9292

sql_connection=mysql://glance:********@172.30.4.9/glance?charset=utf8
sql_idle_timeout = 3600
use_syslog = True
syslog_log_facility = LOG_LOCAL0
log_dir = /var/log/glance
registry_host = ***********
registry_port = 9191
registry_client_protocol = https
notifier_strategy = noop

#
# Rabbit
#
notification_driver = messagingv2

rpc_backend = rabbit
rabbit_use_ssl = True
kombu_ssl_certfile = /etc/ssl/private/******.crt
kombu_ssl_keyfile = /etc/ssl/private/********.key
rabbit_hosts=172.30.7.200:5671,172.30.7.201:5671,172.30.7.202:5671
#rabbit_host = zone-1-internal
rabbit_virtual_host = /
rabbit_userid = openstack
rabbit_password = ********
rabbit_port = 5671


# swift store options
default_swift_reference = ref1
swift_store_config_file = /etc/glance/glance-swift-store.conf


[glance_store]
stores = glance.store.swift.Store,
         glance.store.http.Store

# NOTE: auth, user, key will come from glance-swift-store.conf
#swift_store_auth_address = https://*********:35357/v2.0
#swift_store_user = service:glance
#swift_store_key = **********
swift_store_create_container_on_put = True
swift_store_endpoint_type = internalURL
swift_store_large_object_size = 5120
swift_store_large_object_chunk_size = 200
swift_store_region = tor1

#Enable swift multi tenant storage
swift_store_multi_tenant = True
swift_store_admin_tenants = <Service tenant ID here ...
(more)
edit retag flag offensive close merge delete