Commit 97d520ae authored by Grégory Wisniewski's avatar Grégory Wisniewski

Fix another bug introduced with UUID conflict handling.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@464 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 05b6841c
......@@ -86,11 +86,12 @@ class RecoveryEventHandler(MasterEventHandler):
# may claim a server address used by another node.
addr = (ip_address, port)
# First, get the node by the UUID.
node = app.nm.getNodeByUUID(uuid)
if node is not None and node.getServer() != addr:
if not app.isValidUUID(uuid, addr):
# Here we have an UUID conflict, assume that's a new node
node = None
else:
# First, get the node by the UUID.
node = app.nm.getNodeByUUID(uuid)
if node is None:
# generate an uuid for this node
while not app.isValidUUID(uuid, addr):
......
......@@ -110,11 +110,12 @@ class VerificationEventHandler(MasterEventHandler):
# may claim a server address used by another node.
addr = (ip_address, port)
# First, get the node by the UUID.
node = app.nm.getNodeByUUID(uuid)
if node is not None and node.getServer() != addr:
if not app.isValidUUID(uuid, addr):
# Here we have an UUID conflict, assume that's a new node
node = None
else:
# First, get the node by the UUID.
node = app.nm.getNodeByUUID(uuid)
if node is None:
# generate a new uuid for this node
while not app.isValidUUID(uuid, addr):
......
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