Commit 7e103f2a authored by Vincent Pelletier's avatar Vincent Pelletier

An empty partition table is a valid partition table (happens when a master...

An empty partition table is a valid partition table (happens when a master didn't get any from a storage). A missing partition table must be detected with a None value.
Don't trash data we received from previous primary master when getting disconnected. It is still valuable, and interesting to fetch from neoctl.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@1035 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent d1ffa1dc
...@@ -103,9 +103,6 @@ class Application(object): ...@@ -103,9 +103,6 @@ class Application(object):
self.em.poll(1) self.em.poll(1)
except PrimaryFailure: except PrimaryFailure:
logging.error('primary master is down') logging.error('primary master is down')
# do not trust any longer our informations
self.pt.clear()
self.nm.clear(filter = lambda node: not node.isMaster())
def connectToPrimaryMaster(self): def connectToPrimaryMaster(self):
......
...@@ -35,7 +35,7 @@ class AdminEventHandler(EventHandler): ...@@ -35,7 +35,7 @@ class AdminEventHandler(EventHandler):
logging.info("ask partition list from %s to %s for %s" %(min_offset, max_offset, dump(uuid))) logging.info("ask partition list from %s to %s for %s" %(min_offset, max_offset, dump(uuid)))
app = self.app app = self.app
# check we have one pt otherwise ask it to PMN # check we have one pt otherwise ask it to PMN
if len(app.pt.getNodeList()) == 0: if app.pt is None:
master_conn = self.app.master_conn master_conn = self.app.master_conn
p = protocol.askPartitionTable([]) p = protocol.askPartitionTable([])
msg_id = master_conn.ask(p) msg_id = master_conn.ask(p)
......
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