[Neo-report] r2185 gregory - /trunk/neo/storage/app.py

nobody at svn.erp5.org nobody at svn.erp5.org
Mon Jun 21 17:55:17 CEST 2010


Author: gregory
Date: Mon Jun 21 17:55:12 2010
New Revision: 2185

Log:
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)

Modified:
    trunk/neo/storage/app.py

Modified: trunk/neo/storage/app.py
==============================================================================
--- trunk/neo/storage/app.py [iso-8859-1] (original)
+++ trunk/neo/storage/app.py [iso-8859-1] Mon Jun 21 17:55:12 2010
@@ -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():





More information about the Neo-report mailing list