2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Add remote scan to autosense startup

This commit is contained in:
Jarrod Johnson 2022-11-03 13:59:14 -04:00
parent 7e02987a8c
commit ca1f459364

View File

@ -1446,14 +1446,17 @@ def _periodic_recheck(configmanager):
def rescan():
_map_unique_ids()
global scanner
mycfm = cfm.ConfigManager(None)
myname = collective.get_myname()
if scanner:
return
else:
scanner = eventlet.spawn(blocking_scan)
remotescan()
def remotescan():
mycfm = cfm.ConfigManager(None)
myname = collective.get_myname()
for remagent in get_subscriptions():
affluent.renotify_my(remagent, mycfm, myname)
affluent.renotify_me(remagent, mycfm, myname)
def blocking_scan():
@ -1492,6 +1495,7 @@ def stop_autosense():
def start_autosense():
autosensors.add(eventlet.spawn(slp.snoop, safe_detected, slp))
autosensors.add(eventlet.spawn(pxe.snoop, safe_detected, pxe, get_node_guess_by_uuid))
remotescan()
nodes_by_fprint = {}