2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 11:01:09 +00:00

Fix for partial returns

full_net_config may not always apply,
be sure to gracefully degrade.
This commit is contained in:
Jarrod Johnson 2022-02-22 17:08:23 -05:00
parent ac8918c2b9
commit 8f4846c248

View File

@ -44,8 +44,8 @@ def get_extra_names(nodename, cfg, myip=None):
if myip:
ncfgs = [netutil.get_nic_config(cfg, nodename, serverip=myip)]
fncfg = netutil.get_full_net_config(cfg, nodename, serverip=myip)
ncfgs.append(fncfg['default'])
for ent in fncfg['extranets']:
ncfgs.append(fncfg.get('default', {}))
for ent in fncfg.get('extranets', []):
ncfgs.append(fncfg['extranets'][ent])
for ncfg in ncfgs:
for nip in (ncfg.get('ipv4_address', None), ncfg.get('ipv6_address', None)):