Commit 55e92444 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Don't change a node after removal.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2071 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 291344ac
......@@ -92,12 +92,13 @@ class BaseServiceHandler(MasterHandler):
assert node.getState() not in (NodeStates.TEMPORARILY_DOWN,
NodeStates.DOWN, NodeStates.BROKEN), (dump(self.app.uuid),
node.whoSetState(), new_state)
if new_state != NodeStates.BROKEN and node.isPending():
was_pending = node.isPending()
node.setState(new_state)
if new_state != NodeStates.BROKEN and was_pending:
# 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
logging.info('drop a pending node from the node manager')
self.app.nm.remove(node)
node.setState(new_state)
self.app.broadcastNodesInformation([node])
# clean node related data in specialized handlers
self.nodeLost(conn, node)
......
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