2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-26 02:48:52 +00:00

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.
This commit is contained in:
Jarrod Johnson 2024-08-22 16:39:52 -04:00
parent 3d53b76317
commit edc3a3e9f3

View File

@ -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))