From edc3a3e9f337491849ff73a7cf20ada0b334c826 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 22 Aug 2024 16:39:52 -0400 Subject: [PATCH] Have confignet fallback to unicast per deploycfg In routed deployments, the scan mechanism will not be available. Fall back to routed access to the deploy server as indicated by deploycfg from install time. --- confluent_osdeploy/common/profile/scripts/confignet | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/confluent_osdeploy/common/profile/scripts/confignet b/confluent_osdeploy/common/profile/scripts/confignet index 650f4eb6..9092f631 100644 --- a/confluent_osdeploy/common/profile/scripts/confignet +++ b/confluent_osdeploy/common/profile/scripts/confignet @@ -455,6 +455,12 @@ if __name__ == '__main__': srvs, _ = apiclient.scan_confluents() doneidxs = set([]) dc = None + if not srvs: # the multicast scan failed, fallback to deploycfg cfg file + with open('/etc/confluent/confluent.deploycfg', 'r') as dci: + for cfgline in dci.read().split('\n'): + if cfgline.startswith('deploy_server:'): + srvs = [cfgline.split()[1]] + break for srv in srvs: try: s = socket.create_connection((srv, 443))