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

Don't are code node type in generic bootstrap manager.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@852 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 8c4fc6ad
......@@ -32,10 +32,11 @@ class BootstrapManager(EventHandler):
Manage the bootstrap stage, lookup for the primary master then connect to it
"""
def __init__(self, app, name, uuid=protocol.INVALID_UUID, server=NO_SERVER):
def __init__(self, app, name, node_type, uuid=protocol.INVALID_UUID, server=NO_SERVER):
EventHandler.__init__(self, app)
self.primary = None
self.server = server
self.node_type = node_type
self.uuid = uuid
self.name = name
......@@ -88,7 +89,7 @@ class BootstrapManager(EventHandler):
return
logging.info('connected to a primary master node')
conn.ask(protocol.requestNodeIdentification(protocol.STORAGE_NODE_TYPE,
conn.ask(protocol.requestNodeIdentification(self.node_type,
self.uuid, self.server[0], self.server[1], self.name))
def handleAcceptNodeIdentification(self, conn, packet, node_type,
......
......@@ -179,7 +179,8 @@ class Application(object):
conn.close()
# search, find, connect and identify to the primary master
bootstrap = BootstrapManager(self, self.name, self.uuid, self.server)
bootstrap = BootstrapManager(self, self.name,
protocol.STORAGE_NODE_TYPE, self.uuid, self.server)
data = bootstrap.getPrimaryConnection(self.connector_handler)
(node, conn, uuid, num_partitions, num_replicas) = data
self.master_node = node
......
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