Additional debug for NSX v3 cluster

Adds additional debug statements to critical points in the NSX v3
cluster logic to ease cluster logic troubleshooting and analysis.

backport: liberty

Change-Id: I547a5fa8340773a123617904cd21febaa387bebb
Closes-Bug: #1544640
(cherry picked from commit 0875449b5d)
This commit is contained in:
Boden R
2016-02-11 10:54:48 -07:00
parent c94fd0c50e
commit 8f6a6b448f

View File

@@ -373,6 +373,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(
@@ -420,6 +422,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)