Skip to content
Snippets Groups Projects
Unverified Commit 293f297b authored by Frode Nordahl's avatar Frode Nordahl
Browse files

Temporarily retry initial connect in test 400

There is a eluding issue that currently makes the
first request to the OpenStack Dashboard error out
with 500 Internal Server Error in CI.  Temporarilly
add retry logic to unwedge the gate.  This issue
should be revisited and root caused properly when time
allows.

Change-Id: Id828082416c7cbdd88247d9b6750c0f77467bc26
parent e10f120a
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,10 @@ from charmhelpers.contrib.openstack.amulet.utils import (
# ERROR
)
from charmhelpers.core.decorators import (
retry_on_exception,
)
# Use DEBUG to turn on debug logging
u = OpenStackAmuletUtils(DEBUG)
......@@ -215,8 +219,18 @@ class OpenstackDashboardBasicDeployment(OpenStackAmuletDeployment):
dashboard_relation = unit.relation('identity-service',
'keystone:identity-service')
dashboard_ip = dashboard_relation['private-address']
response = urllib2.urlopen('http://%s/horizon' % (dashboard_ip))
html = response.read()
# NOTE(fnordahl) there is a eluding issue that currently makes the
# first request to the OpenStack Dashboard error out
# with 500 Internal Server Error in CI. Temporarilly
# add retry logic to unwedge the gate. This issue
# should be revisited and root caused properly when time
# allows.
@retry_on_exception(1)
def do_request():
response = urllib2.urlopen('http://%s/horizon' % (dashboard_ip))
return response.read()
html = do_request()
if 'OpenStack Dashboard' not in html:
msg = "Dashboard frontpage check failed"
amulet.raise_status(amulet.FAIL, msg=msg)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment