2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-01-09 13:05:49 +00:00

Fix apiclient detection of default interface

It was failing to record the default interface in its checks.
This commit is contained in:
Jarrod Johnson 2022-09-29 13:15:37 -04:00
parent cf000d6872
commit fcf342165c

View File

@ -255,14 +255,14 @@ class HTTPSClient(client.HTTPConnection, object):
if line.startswith('EXTMGRINFO:'):
extinfo = line.split(' ')[1]
extinfo = extinfo.split('|')
if not mgtiface:
host, mgtiface, havedefault = extinfo[:3]
if havedefault == '0' and extinfo[2] == '1':
host, mgtiface, havedefault = extinfo[:3]
if '%' in host:
ifidx = host.split('%', 1)[1]
with open('/tmp/confluent.ifidx', 'w+') as ifout:
ifout.write(ifidx)
if not mgtiface:
host, mgtiface, havedefault = extinfo[:3]
if host:
if havedefault == '0':
if '%' in host: