[openstack-dev] Managing endpoints for multiple regions for a service

Jay Pipes jaypipes at gmail.com
Tue Dec 11 16:52:11 UTC 2012


On 12/11/2012 08:42 AM, Karajgi, Rohit wrote:
> Hi,
> 
> Referring to bug https://bugs.launchpad.net/nova/+bug/1087735, I’d like
> to get some thoughts on how the current implementation can be improved
> for filtering endpoints by region.
> 
> For example, during Cinder volume attachment as described in the bug, if
> we specify ‘attr’ and ‘filter_value’ correctly for a specific region,
> 
> (Eg: attr=’region’, filter_value=’RegionTwo’) in the call to
> service_catalog.url_for()  , cinder correctly parses this value and
> returns a matching endpoint for this region.
> 
> https://github.com/openstack/nova/blob/master/nova/volume/cinder.py#L63
> 
> However, it is unclear how these parameters should be passed from nova
> volume API.
> 
> As a possible solution, should the context object also contain a
> “region_name” parameter added to it, and then extract this parameter
> into the cinderclient?
> 
> Does it make sense to add another flag/configuration parameter to
> nova.conf for accepting region?

Doesn't the availability_zone flag (and storage_availability_zone, which
AFAIK, Cinder uses when a region is not specified [1]) already contain
this information?

> How can we ensure that a region name is consistently utilized and
> validated across APIs as well as python clients?

Great question, and one I've recently wondered as well. One thing that
is problematic is the usage of "region" and "availability zone" to mean
essentially the exact same thing.

Unless I'm mistaken, in which case, please do correct me!
-jay

[1]
https://github.com/openstack/cinder/blob/master/cinder/volume/api.py#L151



More information about the OpenStack-dev mailing list