Commit c619ca8d authored by Aurel's avatar Aurel

check that all these messages are sent by a storage node only


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@288 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 3ea5e49e
...@@ -344,6 +344,11 @@ class VerificationEventHandler(MasterEventHandler): ...@@ -344,6 +344,11 @@ class VerificationEventHandler(MasterEventHandler):
logging.info('got unfinished transactions %s from %s:%d', logging.info('got unfinished transactions %s from %s:%d',
tid_list, *(conn.getAddress())) tid_list, *(conn.getAddress()))
app = self.app app = self.app
node = app.nm.getNodeByUUID(uuid)
if not isinstance(node, StorageNode):
self.handleUnexpectedPacket(conn, packet)
return
if app.asking_uuid_dict.get(uuid, True): if app.asking_uuid_dict.get(uuid, True):
# No interest. # No interest.
return return
...@@ -361,6 +366,11 @@ class VerificationEventHandler(MasterEventHandler): ...@@ -361,6 +366,11 @@ class VerificationEventHandler(MasterEventHandler):
logging.info('got OIDs %s for %s from %s:%d', logging.info('got OIDs %s for %s from %s:%d',
oid_list, tid, *(conn.getAddress())) oid_list, tid, *(conn.getAddress()))
app = self.app app = self.app
node = app.nm.getNodeByUUID(uuid)
if not isinstance(node, StorageNode):
self.handleUnexpectedPacket(conn, packet)
return
if app.asking_uuid_dict.get(uuid, True): if app.asking_uuid_dict.get(uuid, True):
# No interest. # No interest.
return return
...@@ -384,6 +394,11 @@ class VerificationEventHandler(MasterEventHandler): ...@@ -384,6 +394,11 @@ class VerificationEventHandler(MasterEventHandler):
logging.info('TID not found: %s', message) logging.info('TID not found: %s', message)
app = self.app app = self.app
node = app.nm.getNodeByUUID(uuid)
if not isinstance(node, StorageNode):
self.handleUnexpectedPacket(conn, packet)
return
if app.asking_uuid_dict.get(uuid, True): if app.asking_uuid_dict.get(uuid, True):
# No interest. # No interest.
return return
...@@ -399,6 +414,11 @@ class VerificationEventHandler(MasterEventHandler): ...@@ -399,6 +414,11 @@ class VerificationEventHandler(MasterEventHandler):
logging.info('object %s:%s found', dump(oid), dump(tid)) logging.info('object %s:%s found', dump(oid), dump(tid))
app = self.app app = self.app
node = app.nm.getNodeByUUID(uuid)
if not isinstance(node, StorageNode):
self.handleUnexpectedPacket(conn, packet)
return
if app.asking_uuid_dict.get(uuid, True): if app.asking_uuid_dict.get(uuid, True):
# No interest. # No interest.
return return
...@@ -413,6 +433,11 @@ class VerificationEventHandler(MasterEventHandler): ...@@ -413,6 +433,11 @@ class VerificationEventHandler(MasterEventHandler):
logging.info('OID not found: %s', message) logging.info('OID not found: %s', message)
app = self.app app = self.app
node = app.nm.getNodeByUUID(uuid)
if not isinstance(node, StorageNode):
self.handleUnexpectedPacket(conn, packet)
return
if app.asking_uuid_dict.get(uuid, True): if app.asking_uuid_dict.get(uuid, True):
# No interest. # No interest.
return return
......
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