Commit 378873f2 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Call the specialized method after change the node state because the can affect

the logic in _nodeLost(), especially when dealing with pt and its operational 
state.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@860 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 14843277
...@@ -31,14 +31,14 @@ class MasterHandler(EventHandler): ...@@ -31,14 +31,14 @@ class MasterHandler(EventHandler):
def _dropIt(self, conn, node, new_state): def _dropIt(self, conn, node, new_state):
if node is None or node.getState() == new_state: if node is None or node.getState() == new_state:
return return
# clean node related data in specialized handlers
self._nodeLost(conn, node)
if new_state != protocol.BROKEN_STATE and node.getState() == protocol.PENDING_STATE: if new_state != protocol.BROKEN_STATE and node.getState() == protocol.PENDING_STATE:
# was in pending state, so drop it from the node manager to forget # was in pending state, so drop it from the node manager to forget
# it and do not set in running state when it comes back # it and do not set in running state when it comes back
logging.info('drop a pending node from the node manager') logging.info('drop a pending node from the node manager')
self.app.nm.remove(node) self.app.nm.remove(node)
node.setState(new_state) node.setState(new_state)
# clean node related data in specialized handlers
self._nodeLost(conn, node)
self.app.broadcastNodeInformation(node) self.app.broadcastNodeInformation(node)
def connectionClosed(self, conn): def connectionClosed(self, conn):
......
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