Merge "Add debug printouts for potential session reuse"
This commit is contained in:
commit
8deef1727e
|
@ -282,9 +282,9 @@ class RESTClient(object):
|
|||
self._conn.set_silent(False)
|
||||
|
||||
if not silent:
|
||||
LOG.debug("REST call: %s %s. Headers: %s. Body: %s. Response: %s. "
|
||||
"Took %2.4f",
|
||||
method, request_url,
|
||||
LOG.debug("[%x] REST call: %s %s. Headers: %s. Body: %s. "
|
||||
"Response: %s. Took %2.4f",
|
||||
id(self._conn), method, request_url,
|
||||
utils.censor_headers(request_headers),
|
||||
self._mask_password(body),
|
||||
result.json() if result.content else '',
|
||||
|
|
|
@ -772,10 +772,11 @@ class ClusteredAPI(object):
|
|||
kwargs_copy = copy.copy(kwargs)
|
||||
kwargs_copy['headers'] = utils.censor_headers(
|
||||
kwargs_copy['headers'])
|
||||
LOG.debug("API cluster proxy %s %s to %s with %s. "
|
||||
"Waited conn: %2.4f, rate: %2.4f",
|
||||
proxy_for.upper(), uri, url, kwargs_copy,
|
||||
conn_data.conn_wait, conn_data.rate_wait)
|
||||
LOG.debug("[%x] API cluster proxy %s %s to %s "
|
||||
"with %s. Waited conn: %2.4f, rate: %2.4f",
|
||||
id(conn), proxy_for.upper(), uri, url,
|
||||
kwargs_copy, conn_data.conn_wait,
|
||||
conn_data.rate_wait)
|
||||
|
||||
# call the actual connection method to do the
|
||||
# http request/response over the wire
|
||||
|
@ -799,7 +800,7 @@ class ClusteredAPI(object):
|
|||
|
||||
return response
|
||||
except Exception as e:
|
||||
LOG.warning("Request failed due to: %s", e)
|
||||
LOG.warning("[%x] Request failed due to: %s", id(conn), e)
|
||||
exc_config = self.nsxlib_config.exception_config
|
||||
if exc_config.should_ground_endpoint(e):
|
||||
# consider endpoint inaccessible and move to next
|
||||
|
|
Loading…
Reference in New Issue