From fe3debc87ab261736ea213ec25c03190182c0323 Mon Sep 17 00:00:00 2001 From: rcherrueau Date: Thu, 9 Feb 2017 16:03:29 +0100 Subject: [PATCH] Multi-Regions Support The deployment of a service requires the creation of a new service endpoint into Keystone. To create a new service endpoint the kolla_keystone_service tests if the service is already registered and updates the URL if so, or create the new endpoint in other cases. In the actual implementation, the register test only looks at the service id and interface which makes the test behaving wrong in multi-regions context. In multi-regions, we deploy the same service many times, and thus, actual implementation considers that this is the same service and updates its endpoint rather than creating a new one. This fix adds a condition to the test that verifies the region to distinguish two identical services deployed into two different regions. Change-Id: Ie7ca8800fe3c5a9585e4b0bbbc38ac628ec753bc --- docker/kolla-toolbox/kolla_keystone_service.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docker/kolla-toolbox/kolla_keystone_service.py b/docker/kolla-toolbox/kolla_keystone_service.py index 6dd2a1b25b..bdab442f15 100644 --- a/docker/kolla-toolbox/kolla_keystone_service.py +++ b/docker/kolla-toolbox/kolla_keystone_service.py @@ -72,7 +72,8 @@ def main(): for _endpoint in cloud.keystone_client.endpoints.list(): if _endpoint.service_id == service.id and \ - _endpoint.interface == interface: + _endpoint.interface == interface and \ + _endpoint.region == endpoint_region: endpoint = _endpoint if endpoint.url != url: changed = True