From ca1f459364e595b3095ef2fe0fb1f83da89fecb7 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 3 Nov 2022 13:59:14 -0400 Subject: [PATCH] Add remote scan to autosense startup --- confluent_server/confluent/discovery/core.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index 302dc47e..ee31104c 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -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 = {}