Commit 7966828a authored by Grégory Wisniewski's avatar Grégory Wisniewski

Delete nodes from the node manager if they are in DOWN state, this is the only

way to clean old nodes on non-master nodes.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@801 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 09eb146e
......@@ -96,6 +96,11 @@ class BaseStorageHandler(EventHandler):
# same uuid but different address, update it
n.setServer(addr)
if state == protocol.DOWN_STATE and n is not None:
# this node is consider as down, remove it
self.app.nm.remove(n)
continue
if node_type == MASTER_NODE_TYPE:
if n is None:
n = MasterNode(server = addr)
......@@ -122,7 +127,7 @@ class BaseStorageHandler(EventHandler):
if n is not None:
n.setState(state)
raise OperationFailure
if n is None:
n = StorageNode(server = addr, uuid = uuid)
app.nm.add(n)
......
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