Commit 64ebcd65 authored by Aurel's avatar Aurel

update uuid according to what MN answer if different from what we

already know


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@432 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 0f30732c
......@@ -383,7 +383,7 @@ class ClientAnswerEventHandler(BaseClientEventHandler):
if uuid != INVALID_UUID:
# If I don't know the UUID yet, believe what the peer
# told me at the moment.
if n.getUUID() is None:
if n.getUUID() is None or n.getUUID() != uuid:
n.setUUID(uuid)
if primary_uuid != INVALID_UUID:
......
......@@ -18,7 +18,8 @@
import logging
from neo.protocol import MASTER_NODE_TYPE, \
RUNNING_STATE, BROKEN_STATE, TEMPORARILY_DOWN_STATE, DOWN_STATE
RUNNING_STATE, BROKEN_STATE, TEMPORARILY_DOWN_STATE, \
DOWN_STATE, ADMIN_NODE_TYPE
from neo.master.handler import MasterEventHandler
from neo.connection import ClientConnection
from neo.exception import ElectionFailure
......@@ -145,7 +146,7 @@ class ElectionEventHandler(MasterEventHandler):
if uuid != INVALID_UUID:
# If I don't know the UUID yet, believe what the peer
# told me at the moment.
if n.getUUID() is None:
if n.getUUID() is None or n.getUUID() != uuid:
n.setUUID(uuid)
if primary_uuid != INVALID_UUID:
......
......@@ -216,7 +216,7 @@ class BootstrapEventHandler(StorageEventHandler):
if uuid != INVALID_UUID:
# If I don't know the UUID yet, believe what the peer
# told me at the moment.
if n.getUUID() is None:
if n.getUUID() is None or n.getUUID() != uuid:
n.setUUID(uuid)
if primary_uuid != INVALID_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