2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-23 01:53:28 +00:00

Handle some intra-collective errors better

This commit is contained in:
Jarrod Johnson 2021-08-24 15:50:03 -04:00
parent 69b58836f6
commit 797465b3eb
2 changed files with 5 additions and 4 deletions

View File

@ -1054,12 +1054,12 @@ def dispatch_request(nodes, manager, element, configmanager, inputdata,
remote = ssl.wrap_socket(remote, cert_reqs=ssl.CERT_NONE,
keyfile='/etc/confluent/privkey.pem',
certfile='/etc/confluent/srvcert.pem')
except Exception:
except Exception as e:
for node in nodes:
if a:
yield msg.ConfluentResourceUnavailable(
node, 'Collective member {0} is unreachable'.format(
a['name']))
node, 'Collective member {0} is unreachable ({1})'.format(
a['name'], str(e)))
else:
yield msg.ConfluentResourceUnavailable(
node,

View File

@ -205,7 +205,8 @@ def sessionhdl(connection, authname, skipauth=False, cert=None):
except Exception:
request = None
finally:
cfm.close_client_files()
if cfm:
cfm.close_client_files()
try:
connection.close()
except Exception: