From 8524e44826175a2654567746171c28356dba846c Mon Sep 17 00:00:00 2001 From: changyufei Date: Tue, 16 Oct 2018 13:10:30 +0800 Subject: [PATCH] update aodh notifier when there're multiple regions When there're multiple regions in openstack system, like 'regionOne' and 'regionTwo', aodh do not specify a region to get the endpoint of zaqar. An endpoint url should be uniquely determined by 'service_id','interface', 'region_id'. Closes-Bug: #1798033 Change-Id: I5b8d279d7ce08b165002422c07792f59f1e9912f --- aodh/notifier/zaqar.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aodh/notifier/zaqar.py b/aodh/notifier/zaqar.py index 58388089a..8b01b71bf 100644 --- a/aodh/notifier/zaqar.py +++ b/aodh/notifier/zaqar.py @@ -70,7 +70,9 @@ class ZaqarAlarmNotifier(notifier.AlarmNotifier): z_srv = ks_client.services.find( type=self.conf.service_types.zaqar) endpoint_type = self.conf.service_credentials.interface + region_name = self.conf.service_credentials.region_name z_endpoint = ks_client.endpoints.find(service_id=z_srv.id, + region_id=region_name, interface=endpoint_type) self._zendpoint = z_endpoint.url except Exception: