Specify region when looking for radosgw admin URL

When using ceilometer-polling in a multiregion rgw setup, the
wrong endpint is selected and results in an RGWAdminAPIFailed

Change-Id: I6b28f796eacd8b3b33eb58fe05a81b2178165d9f
Closes-Bug: #1705233
This commit is contained in:
Maxime Guyot 2017-07-19 12:26:50 +02:00
parent 082368a6f2
commit 0f3a86232b
1 changed files with 2 additions and 1 deletions

View File

@ -69,7 +69,8 @@ class _Base(plugin_base.PollsterBase):
rgw_url = keystone_client.get_service_catalog(
ksclient).url_for(
service_type=conf.service_types.radosgw,
interface=creds.interface)
interface=creds.interface,
region_name=creds.region_name)
_Base._ENDPOINT = urlparse.urljoin(rgw_url, '/admin')
except exceptions.EndpointNotFound:
LOG.debug("Radosgw endpoint not found")