Commit 87ea823f authored by Grégory Wisniewski's avatar Grégory Wisniewski

Notify the dropped node that it is down before close the connection.

This ensure it will not reappear in pending state.
Explain why the connection is closed by the master rather than wait for a remote closure.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1637 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent a3c67575
...@@ -80,8 +80,13 @@ class AdministrationHandler(MasterHandler): ...@@ -80,8 +80,13 @@ class AdministrationHandler(MasterHandler):
node.setState(state) node.setState(state)
elif state == NodeStates.DOWN and node.isStorage(): elif state == NodeStates.DOWN and node.isStorage():
# update it's state
node.setState(state) node.setState(state)
for storage_conn in app.em.getConnectionListByUUID(uuid): for storage_conn in app.em.getConnectionListByUUID(uuid):
# notify itself so it can shutdown
node_list = [node.asTuple()]
storage_conn.notify(Packets.NotifyNodeInformation(node_list))
# close to avoid handle the closure as a connection lost
storage_conn.close() storage_conn.close()
# modify the partition table if required # modify the partition table if required
cell_list = [] cell_list = []
......
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