summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Brady <rbrady@redhat.com>2015-07-22 18:33:19 -0400
committerRyan Brady <rbrady@redhat.com>2015-08-04 09:16:55 -0400
commitbfffd1cec5c3195ac1759094635401eaabbfa8f4 (patch)
tree2ecf6b5c4d25a32ae49c8689540bec40a45b59bf
parent6bec389675d7717e9507dd9bf74a0f881c0b5675 (diff)
downloadtuskar-ui-bfffd1cec5c3195ac1759094635401eaabbfa8f4.tar.gz
Fixes EndpointNotFound after deployment
After deploying an overcloud via the UI, the generic error page for Horizon is displayed. With debugging enabled, an EndpointNotFound error message is displayed. This is caused by the dashboard_urls method attempting to access a method on the overcloud keystone client before the overcloud keystone service is initialized. This patch wraps the code to check for initialized services in a try block and returns an empty list in the event an exception is thrown. Change-Id: I7da53ea085b2728950c3a0c2760d0745119e6ff1 Resolves: rhbz#1245192
-rw-r--r--tuskar_ui/api/heat.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/tuskar_ui/api/heat.py b/tuskar_ui/api/heat.py
index 9852ca00..923565ec 100644
--- a/tuskar_ui/api/heat.py
+++ b/tuskar_ui/api/heat.py
@@ -429,12 +429,14 @@ class Stack(base.APIResourceWrapper):
if not client:
return []
- services = client.services.list()
-
- for service in services:
- if service.name == 'horizon':
- break
- else:
+ try:
+ services = client.services.list()
+ for service in services:
+ if service.name == 'horizon':
+ break
+ else:
+ return []
+ except Exception:
return []
admin_urls = [endpoint.adminurl for endpoint