2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-09-29 00:31:09 +00:00

Track known_nodes and unknown better

If something was known from a prior life, still store it as
a known_nodes to allow config changes to be handled.
Also, if an unexpected condition occurs, ensure that
we track it as unknown.
This commit is contained in:
Jarrod Johnson
2017-03-21 10:17:36 -04:00
parent 2cd2e170e0
commit 7f185db64f
@@ -273,12 +273,16 @@ def detected(info):
lastfp = dp.get(nodename, {}).get('pubkeys.tls_hardwaremanager',
{}).get('value', None)
if util.cert_matches(lastfp, handler.https_cert):
known_nodes[nodename] = info
return # already known, no need for more
try:
handler.probe() # unicast interrogation as possible to get more data
# for now, we search switch only, ideally we search cmm, smm, and
# switch concurrently
except Exception as e:
unknown_info[info['hwaddr']] = info
log.log({'error': 'An error occured during discovery, check the '
'trace and stderr logs'})
traceback.print_exc()
return
if nodename: