[Neo-report] r2030 vincent - /trunk/neo/master/handlers/election.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Apr 26 16:42:32 CEST 2010
Author: vincent
Date: Mon Apr 26 16:42:29 2010
New Revision: 2030
Log:
Fix r2026: use addresses to tell if we got the answer from the primary.
conn.getUUID() will always return None on a not-identified-yet node, so
the test was always false when a was given.
Also, test app.primary_master_node for None instead of primary_uuid, as
the case where an unknown primary UUID is received must be handled.
Modified:
trunk/neo/master/handlers/election.py
Modified: trunk/neo/master/handlers/election.py
==============================================================================
--- trunk/neo/master/handlers/election.py [iso-8859-1] (original)
+++ trunk/neo/master/handlers/election.py [iso-8859-1] Mon Apr 26 16:42:29 2010
@@ -147,7 +147,9 @@
app.unconnected_master_node_set.clear()
app.negotiating_master_node_set.clear()
- if (primary_uuid is None or conn.getUUID() == primary_uuid) and \
+ primary_node = app.primary_master_node
+ if (primary_node is None or \
+ conn.getAddress() == primary_node.getAddress()) and \
not conn.isClosed():
# Request a node identification.
# There are 3 cases here:
More information about the Neo-report
mailing list