2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-01-11 18:42:29 +00:00

Treat '' as equivalent to unset for ipv{}_method

Since it's a really difficult distiction between blank
and unset, make sure this is treated the same.
This commit is contained in:
Jarrod Johnson
2025-05-06 09:01:43 -04:00
parent febccf4d5e
commit 5ab16851ec

View File

@@ -575,6 +575,8 @@ def get_nic_config(configmanager, node, ip=None, mac=None, ifidx=None,
cfgdata[srvkey] = socket.inet_ntop(fam, svrip)
for candidate in cfgbyname:
ipmethod = cfgbyname[candidate].get('ipv{}_method'.format(nver), 'static')
if not ipmethod:
ipmethod = 'static'
if ipmethod == 'dhcp':
dhcprequested = True
continue