Commit e13b69a7 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Handle Answer Primary Master gracefully in verification.

git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@93 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent f458178b
......@@ -95,7 +95,15 @@ class VerificationEventHandler(StorageEventHandler):
def handleAnswerPrimaryMaster(self, conn, packet, primary_uuid,
known_master_list):
self.handleUnexpectedPacket(conn, packet)
if isinstance(conn, ClientConnection):
app = self.app
if app.primary_master_node.getUUID() != primary_uuid:
raise PrimaryFailure('the primary master node seems to have changed')
# XXX is it better to deal with known_master_list here?
# But a primary master node is supposed not to send any info
# with this packet, so it would be useless.
else:
self.handleUnexpectedPacket(conn, packet)
def handleAskLastIDs(self, conn, packet):
if isinstance(conn, ClientConnection):
......
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