Commit 829de28d authored by Grégory Wisniewski's avatar Grégory Wisniewski

Fix global storage states.

- A storage is not operational while connecting to the primary master
- A storage is not ready until connected to a primary master, with an
operational partition table and fully initialized. The 'ready' attribute
must be initialized to False when PrimaryFailure or OperationFailure
exceptions are reaised to prevent acceptation of incoming clients (see
storage/handlers/identification.py that check app.ready value)

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2185 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 42128130
......@@ -174,10 +174,11 @@ class Application(object):
# start the operation. This cycle will be executed permanently,
# until the user explicitly requests a shutdown.
while True:
self.ready = False
self.operational = False
if self.master_node is None:
# look for the primary master
self.connectToPrimary()
self.operational = False
# check my state
node = self.nm.getByUUID(self.uuid)
if node is not None and node.isHidden():
......
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