Commit af1db176 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Bug fix, wrong initialization of default handler.

Send StartOperation packet to running storage nodes only.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@688 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 37d675f3
...@@ -882,7 +882,7 @@ class Application(object): ...@@ -882,7 +882,7 @@ class Application(object):
def identifyNode(self, node_type, uuid, node): def identifyNode(self, node_type, uuid, node):
state = protocol.RUNNING_STATE state = protocol.RUNNING_STATE
handler = self.__class__ handler = IdentificationEventHandler
if node_type == protocol.ADMIN_NODE_TYPE: if node_type == protocol.ADMIN_NODE_TYPE:
# always accept admin nodes # always accept admin nodes
......
...@@ -272,7 +272,9 @@ class ClientServiceEventHandler(ServiceEventHandler): ...@@ -272,7 +272,9 @@ class ClientServiceEventHandler(ServiceEventHandler):
class StorageServiceEventHandler(ServiceEventHandler): class StorageServiceEventHandler(ServiceEventHandler):
def connectionCompleted(self, conn): def connectionCompleted(self, conn):
conn.notify(protocol.startOperation()) node = self.app.nm.getNodeByUUID(conn.getUUID())
if node.getState() == RUNNING_STATE:
conn.notify(protocol.startOperation())
def handleNotifyInformationLocked(self, conn, packet, tid): def handleNotifyInformationLocked(self, conn, packet, tid):
uuid = conn.getUUID() uuid = conn.getUUID()
......
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