Commit 3e440366 authored by Grégory Wisniewski's avatar Grégory Wisniewski

When the primary lost a secondary, it have to set it in down state and broadcast

the information to others.
Remove an XXX: As for client node, a master don't leep its UUID, so it have to
be dropped from nodes managers.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1121 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 5912c7f7
......@@ -27,6 +27,12 @@ from neo.node import MasterNode
class SecondaryMasterHandler(MasterHandler):
""" Handler used by primary to handle secondary masters"""
def handleConnectionLost(self, conn, new_state):
node = self.app.nm.getNodeByUUID(conn.getUUID())
assert node is not None
node.setState(DOWN_STATE)
self.app.broadcastNodeInformation(node)
def connectionCompleted(self, conn):
pass
......@@ -44,7 +50,6 @@ class PrimaryMasterHandler(MasterHandler):
""" Handler used by secondaries to handle primary master"""
def handleNodeLost(self, conn, node):
# XXX: why in down state ?
self.app.primary_master_node.setState(DOWN_STATE)
raise PrimaryFailure, 'primary master is dead'
......
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