Commit 8940d047 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Remove two related TODOs. Storage nodes keep their UUIDs in recovery stage and

no conflict can happen (known by address but not UUID), because the recovery is
done at startup an no storage nodes are known by address.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@975 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent e141d8b4
...@@ -751,10 +751,6 @@ class Application(object): ...@@ -751,10 +751,6 @@ class Application(object):
sys.exit("Cluster has been asked to shut down") sys.exit("Cluster has been asked to shut down")
def identifyStorageNode(self, uuid, node): def identifyStorageNode(self, uuid, node):
# TODO: check all cases here, when server address change...
# in verification and running states, if the node is unknown but the
# uuid is not None, we have to give it a new uuid, but in recovery
# the node must keep it's UUID
state = protocol.RUNNING_STATE state = protocol.RUNNING_STATE
handler = None handler = None
if self.cluster_state == protocol.RECOVERING: if self.cluster_state == protocol.RECOVERING:
...@@ -776,7 +772,7 @@ class Application(object): ...@@ -776,7 +772,7 @@ class Application(object):
state = protocol.PENDING_STATE state = protocol.PENDING_STATE
handler = storage.StorageServiceHandler handler = storage.StorageServiceHandler
elif self.cluster_state == protocol.STOPPING: elif self.cluster_state == protocol.STOPPING:
# FIXME: raise a ShutdowningError ? # FIXME: raise a ShuttingDownError ?
raise protocol.NotReadyError raise protocol.NotReadyError
else: else:
raise RuntimeError('unhandled cluster state') raise RuntimeError('unhandled cluster state')
......
...@@ -53,9 +53,6 @@ class IdentificationHandler(MasterHandler): ...@@ -53,9 +53,6 @@ class IdentificationHandler(MasterHandler):
if node.getState() == protocol.RUNNING_STATE: if node.getState() == protocol.RUNNING_STATE:
# still running, reject this new node # still running, reject this new node
raise protocol.ProtocolError('invalid server address') raise protocol.ProtocolError('invalid server address')
# FIXME: here the node was known with a different uuid but with the
# same address, is it safe to forgot the old, even if he's not
# running ?
node.setServer(address) node.setServer(address)
node.setState(protocol.RUNNING_STATE) node.setState(protocol.RUNNING_STATE)
......
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