Fix cluster connectivity
Connection generator should not insert "None" into connection pool. Exception caught in validation func should do the job. Change-Id: Ia854e3fb719b7e177c07b9b566ff50dc44fe7765
This commit is contained in:
parent
4ec7fdca47
commit
2c1cd9c40b
|
@ -402,13 +402,7 @@ class ClusteredAPI(object):
|
|||
|
||||
def _create_conn(p):
|
||||
def _conn():
|
||||
# called when a pool needs to create a new connection
|
||||
try:
|
||||
return self._http_provider.new_connection(self, p)
|
||||
except Exception as e:
|
||||
if self._http_provider.is_conn_open_exception(e):
|
||||
LOG.warning("Timeout while trying to open a "
|
||||
"connection with %s", p)
|
||||
return self._http_provider.new_connection(self, p)
|
||||
|
||||
return _conn
|
||||
|
||||
|
@ -491,11 +485,6 @@ class ClusteredAPI(object):
|
|||
def _validate(self, endpoint):
|
||||
try:
|
||||
with endpoint.pool.item() as conn:
|
||||
if not conn:
|
||||
LOG.warning("No connection established with endpoint "
|
||||
"%(ep)s. ", {'ep': endpoint})
|
||||
endpoint.set_state(EndpointState.DOWN)
|
||||
return
|
||||
self._http_provider.validate_connection(self, endpoint, conn)
|
||||
endpoint.set_state(EndpointState.UP)
|
||||
except exceptions.ClientCertificateNotTrusted:
|
||||
|
|
Loading…
Reference in New Issue