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
This commit is contained in:
parent
6bec389675
commit
bfffd1cec5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user