Commit dbd027a9 authored by Vincent Pelletier's avatar Vincent Pelletier

Remove BOOTING cluster state.

This state was only internal to master node, and was not even
consistently handled in master (only the first election was done in that
state).
changeClusterState was never called with that state as parameter.
Finally, remove this state from protocol as it's not used any longer.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1550 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 7147f291
...@@ -104,7 +104,6 @@ class Application(object): ...@@ -104,7 +104,6 @@ class Application(object):
self.listening_conn = ListeningConnection(self.em, None, self.listening_conn = ListeningConnection(self.em, None,
addr = self.server, connector_handler = self.connector_handler) addr = self.server, connector_handler = self.connector_handler)
self.cluster_state = ClusterStates.BOOTING
# Start the election of a primary master node. # Start the election of a primary master node.
self.electPrimary() self.electPrimary()
...@@ -653,9 +652,7 @@ class Application(object): ...@@ -653,9 +652,7 @@ class Application(object):
nm, em = self.nm, self.em nm, em = self.nm, self.em
# select the storage handler # select the storage handler
if state == ClusterStates.BOOTING: if state == ClusterStates.RECOVERING:
storage_handler = recovery.RecoveryHandler
elif state == ClusterStates.RECOVERING:
storage_handler = recovery.RecoveryHandler storage_handler = recovery.RecoveryHandler
elif state == ClusterStates.VERIFYING: elif state == ClusterStates.VERIFYING:
storage_handler = verification.VerificationHandler storage_handler = verification.VerificationHandler
......
...@@ -38,7 +38,6 @@ class ErrorCodes(Enum): ...@@ -38,7 +38,6 @@ class ErrorCodes(Enum):
ErrorCodes = ErrorCodes() ErrorCodes = ErrorCodes()
class ClusterStates(Enum): class ClusterStates(Enum):
BOOTING = Enum.Item(1)
RECOVERING = Enum.Item(2) RECOVERING = Enum.Item(2)
VERIFYING = Enum.Item(3) VERIFYING = Enum.Item(3)
RUNNING = Enum.Item(4) RUNNING = Enum.Item(4)
......
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