aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrcherrueau <Ronan-Alexandre.Cherrueau@inria.fr>2017-02-09 16:03:29 +0100
committerrcherrueau <Ronan-Alexandre.Cherrueau@inria.fr>2017-02-09 16:03:29 +0100
commitfe3debc87ab261736ea213ec25c03190182c0323 (patch)
treeb92995870ced2bae61277c6cae6413f7a55c8d2a
parent64117209763eccad222e628e1479dc3768da5c10 (diff)
downloadkolla-fe3debc87ab261736ea213ec25c03190182c0323.tar.gz
kolla-fe3debc87ab261736ea213ec25c03190182c0323.zip
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
-rw-r--r--docker/kolla-toolbox/kolla_keystone_service.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/docker/kolla-toolbox/kolla_keystone_service.py b/docker/kolla-toolbox/kolla_keystone_service.py
index 6dd2a1b25..bdab442f1 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