Get rid of ambiguity in region_name

Now keystone_authtoken.region_name is used
 both for requesting admin keystone endpoint
 and default region for openstack actions.
 Default region doesn't work for environments
 with keystone in 1 region and mistrals in many
 regions.

 Due to above just specifying default_region name
 separately for openstack actions can solve the problem

Closes-Bug: #1691660

Change-Id: I1eeea298feca45de37d77d791e1548ec5e7161a1
This commit is contained in:
Nikolay Mahotkin 2017-05-19 17:21:34 +03:00
parent 2ab9da618b
commit c3050df5ac
2 changed files with 6 additions and 2 deletions
mistral
config.py
utils/openstack

@ -295,7 +295,11 @@ openstack_actions_opts = [
'trove', 'ironic', 'designate', 'murano', 'tacker', 'senlin',
'aodh', 'gnocchi'],
help=_('List of module names that support region in actions.')
)
),
cfg.StrOpt(
'default_region',
help=_('Default region name for openstack actions supporting region.')
),
]
# note: this command line option is used only from sync_db and

@ -83,7 +83,7 @@ def get_endpoint_for_project(service_name=None, service_type=None,
# could be passed to rest api in http header ('X-Region-Name'). Otherwise,
# just get region from mistral configuration.
region = (region_name or ctx.region_name or
CONF.keystone_authtoken.region_name)
CONF.openstack_actions.default_region)
service_endpoints = service_catalog.get_endpoints(
service_name=service_name,