Merge "Additional debug for NSX v3 cluster"

This commit is contained in:
Jenkins 2016-02-12 05:34:43 +00:00 committed by Gerrit Code Review
commit 11d9740ca3

View File

@ -371,6 +371,8 @@ class ClusteredAPI(object):
def endpoint_connection(self):
endpoint = self._select_endpoint()
if not endpoint:
LOG.debug("All endpoints down for: %s" %
[str(ep) for ep in self._endpoints.values()])
# all endpoints are DOWN and will have their next
# state updated as per _endpoint_keepalive()
raise nsx_exc.ServiceClusterUnavailable(
@ -418,6 +420,8 @@ class ClusteredAPI(object):
# only trap and retry connection errors
raise e
endpoint.set_state(EndpointState.DOWN)
LOG.debug("Connection to %s failed, checking additional "
"endpoints" % url)
# retry until exhausting endpoints
return self._proxy(proxy_for, uri, *args, **kwargs)