From d4c535d038c244f753697617cf32f334ec0de79e Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Fri, 15 Sep 2023 15:32:33 -0400 Subject: [PATCH] Halt autonomous discovery handling while configmanager is down This avoids triggering a potential large amount of churn on transiently "unknown" systems that are actually discovered. --- confluent_server/confluent/discovery/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/confluent_server/confluent/discovery/core.py b/confluent_server/confluent/discovery/core.py index e18aae0e..dfb50b9f 100644 --- a/confluent_server/confluent/discovery/core.py +++ b/confluent_server/confluent/discovery/core.py @@ -648,6 +648,8 @@ def detected_models(): def _recheck_nodes(nodeattribs, configmanager): + if not cfm.config_is_ready(): + return if rechecklock.locked(): # if already in progress, don't run again # it may make sense to schedule a repeat, but will try the easier and less redundant way first @@ -766,6 +768,9 @@ def eval_detected(info): def detected(info): global rechecker global rechecktime + if not cfm.config_is_ready(): + # drop processing of discovery data while configmanager is 'down' + return # later, manual and CMM discovery may act on SN and/or UUID for service in info['services']: if service in nodehandlers: