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

Move curruuid up so it is always set

If detected pre-discovered, curruuid was not being set correctly
This commit is contained in:
Jarrod Johnson 2018-02-28 11:53:03 -05:00
parent ca27385eaa
commit 0d06eedc81

View File

@ -972,6 +972,7 @@ def discover_node(cfg, handler, info, nodename, manual):
# the pubkeys, which is deferred for a little bit
# Also, 'secure', when we have the needed infrastructure done
# in some product or another.
curruuid = info.get('uuid', False)
if 'pxe' in policies and info['handler'] == pxeh:
return do_pxe_discovery(cfg, handler, info, manual, nodename, policies)
elif ('permissive' in policies and handler.https_supported and lastfp and
@ -1002,10 +1003,8 @@ def discover_node(cfg, handler, info, nodename, manual):
traceback.print_exc()
return False
newnodeattribs = {}
curruuid = False
if 'uuid' in info:
newnodeattribs['id.uuid'] = info['uuid']
curruuid = info['uuid']
if 'serialnumber' in info:
newnodeattribs['id.serial'] = info['serialnumber']
if 'modelnumber' in info: