[Neo-report] r2772 jm - in /trunk/neo/client/handlers: master.py storage.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Jun 9 14:52:03 CEST 2011
Author: jm
Date: Thu Jun 9 14:52:03 2011
New Revision: 2772
Log:
client: fix assertion when storage is shut down
Modified:
trunk/neo/client/handlers/master.py
trunk/neo/client/handlers/storage.py
Modified: trunk/neo/client/handlers/master.py
==============================================================================
--- trunk/neo/client/handlers/master.py [iso-8859-1] (original)
+++ trunk/neo/client/handlers/master.py [iso-8859-1] Thu Jun 9 14:52:03 2011
@@ -126,9 +126,10 @@ class PrimaryNotificationsHandler(BaseHa
def notifyNodeInformation(self, conn, node_list):
nm = self.app.nm
nm.update(node_list)
+ # XXX: 'update' automatically closes DOWN nodes. Do we really want
+ # to do the same thing for nodes in other non-running states ?
for node_type, addr, uuid, state in node_list:
if state != NodeStates.RUNNING:
- # close connection to this node if no longer running
node = nm.getByUUID(uuid)
if node and node.isConnected():
node.getConnection().close()
Modified: trunk/neo/client/handlers/storage.py
==============================================================================
--- trunk/neo/client/handlers/storage.py [iso-8859-1] (original)
+++ trunk/neo/client/handlers/storage.py [iso-8859-1] Thu Jun 9 14:52:03 2011
@@ -59,6 +59,7 @@ class StorageBootstrapHandler(AnswerBase
assert node is not None, conn.getAddress()
conn.setUUID(uuid)
node.setUUID(uuid)
+ node.setConnection(conn)
class StorageAnswersHandler(AnswerBaseHandler):
""" Handle all messages related to ZODB operations """
More information about the Neo-report
mailing list