Commit 0d1c4b07 authored by Grégory Wisniewski's avatar Grégory Wisniewski

Each time a unknown node is registered into the manager, the state is defaulted

to 'UNKNOWN'.


git-svn-id: https://svn.erp5.org/repos/neo/trunk@1324 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 9111aa13
...@@ -173,10 +173,7 @@ class MasterEventHandler(EventHandler): ...@@ -173,10 +173,7 @@ class MasterEventHandler(EventHandler):
for uuid, state in row: for uuid, state in row:
node = nm.getByUUID(uuid) node = nm.getByUUID(uuid)
if node is None: if node is None:
nm.createStorage( nm.createStorage(uuid=uuid)
uuid=uuid,
state=protocol.TEMPORARILY_DOWN_STATE
)
pt.setCell(offset, node, state) pt.setCell(offset, node, state)
pt.log() pt.log()
......
...@@ -54,10 +54,7 @@ class RecoveryHandler(MasterHandler): ...@@ -54,10 +54,7 @@ class RecoveryHandler(MasterHandler):
for uuid, state in row: for uuid, state in row:
node = app.nm.getByUUID(uuid) node = app.nm.getByUUID(uuid)
if node is None: if node is None:
app.nm.createStorage( app.nm.createStorage(uuid=uuid)
uuid=uuid,
state=protocol.TEMPORARILY_DOWN_STATE,
)
# load partition in memory # load partition in memory
self.app.pt.load(ptid, row_list, self.app.nm) self.app.pt.load(ptid, row_list, self.app.nm)
...@@ -135,10 +135,7 @@ class Application(object): ...@@ -135,10 +135,7 @@ class Application(object):
state = protocol.cell_states[state] state = protocol.cell_states[state]
# register unknown nodes # register unknown nodes
if self.nm.getByUUID(uuid) is None: if self.nm.getByUUID(uuid) is None:
self.nm.createStorage( self.nm.createStorage(uuid=uuid)
uuid=uuid,
state=protocol.TEMPORARILY_DOWN_STATE,
)
new_cell_list.append((offset, uuid, state)) new_cell_list.append((offset, uuid, state))
# load the partition table in manager # load the partition table in manager
self.pt.clear() self.pt.clear()
......
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