[swift]: issues with multi region (swift as backend for glance)

fsbiz at yahoo.com fsbiz at yahoo.com
Thu Nov 12 19:44:11 UTC 2020


 Hi Erno,
Thanks for your response.
Just to clarify, each region (RegionOne and RegionTwo) has its own database.Keystone DB is shared between the two regions.

Glance should be getting the following two endpoints (and it does).
root at stg-cl1-dev-001:/opt/netbox# openstack endpoint list | grep swift | grep public
| 38f4a2201b1e498c886051df85661c74 | RegionOne    | swift        | object-store | True    | public    | https://RegionOne.abc.com:7480/swift/v1              || 3ae563eb03f5479e9488f955400a514c | RegionTwo  | swift        | object-store | True    | public    | https://RegionTwo.abc.com:7480/swift/v1    |



Here's the relevant config for glance with swift backend.
[glance_store]

stores = swiftdefault_store = swiftswift_store_auth_version = 3swift_store_auth_address = swift_store_user = service:glanceswift_store_key = swift_store_container = glanceswift_store_region = RegionTwo



Since the configs support it, I assumed that when glance gets the endpoints from auth, it would match the region (RegionTwo) to get the correct endpoint and then send the swift request to https://RegionTwo.abc.com:7480/swift/v1

By default, the swift_store_endpoint is not set since it is taken from auth. If I force it to RegionTwo, things work well.
swift_store_endpoint =  https://RegionTwo.abc.com/swift/v1


For some reason, glance_store is not matching the region to multiple endpoints coming in from auth. So it seems.
Regards,Fred.

    On Thursday, November 12, 2020, 04:28:47 AM PST, Erno Kuvaja <ekuvaja at redhat.com> wrote:  

 
 On Fri, Nov 6, 2020 at 11:49 PM fsbiz at yahoo.com <fsbiz at yahoo.com> wrote:

Hi folks,
We're on queens release. 
We have just setup a 2nd region.  So, now we have two regions regionOne and regionTwo
We had a storage cluster in regionOne. Everything works good.We also added another storage cluster in regionTwo and have created swift endpoints for this.Using swift API, everything works fine.  The container is properly created in regionOne or regionTwo asdesired.


We are also using swift as the glance backend.  We are seeing an issue with this for regionTwo.When I create an image in regionTwo, it seems like the glance storage backend is not properly recognizingthe endpoint and wants to store the image in regionOne.
This looks like a definite bug.I can work around it by overriding the endpoint using swift_store_endpoint but if there is a known bugabout this issue I would rather patch it than resort to overriding the URL endpoint returned from "auth".
Is this a known bug ?  Again, we are on the latest Queens release.
thanks,Fred.


Hi Fred,
With these details I'm not exactly sure what the bug would be here. Glance has no concept for availability zones or regions per se. It expects consistent database across the deployment and multi-store not being a thing in Queens yet, there really is no meaningful way to configure multiple instances of the same store type. While there is no enforcement of homogenous configuration across the Glance nodes, the storage side really depends on it for the service to operate correctly. Forcing Glance to use different stores with the same database will likely cause lots of confusion and poor user experience. I'd assume that to achieve what you are looking for you'd either need to upgrade your openstack deployment to recent version to take advantage of the multi-store work or use separate Glance deployments per region.
best,Erno "jokke" Kuvaja
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20201112/da4cbfd3/attachment.html>


More information about the openstack-discuss mailing list