Commit b041a797 authored by Vincent Pelletier's avatar Vincent Pelletier

Care about conflicts when allocating an UUID during identification.

Also, log node's final UUID, not the one it advertised.
parent f4b9e415
......@@ -65,11 +65,10 @@ class IdentificationHandler(MasterHandler):
human_readable_node_type = 'n admin '
else:
raise NotImplementedError(node_type)
logging.info('Accept a' + human_readable_node_type + dump(uuid))
if uuid is None:
# no valid uuid, give it one
while not app.isValidUUID(uuid, address):
uuid = app.getNewUUID(node_type)
logging.info('Accept a' + human_readable_node_type + dump(uuid))
if node is None:
node = node_ctor(uuid=uuid, address=address)
node.setUUID(uuid)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment