[Neo-report] r2382 vincent - /trunk/neo/master/handlers/administration.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Oct 30 14:55:57 CEST 2010
Author: vincent
Date: Sat Oct 30 14:55:57 2010
New Revision: 2382
Log:
Refuse to add more storage nodes when cluster state is not running.
This is because verification handler doesn't implement responses to
questions sent by a storage node after it receives the order to start.
Modified:
trunk/neo/master/handlers/administration.py
Modified: trunk/neo/master/handlers/administration.py
==============================================================================
--- trunk/neo/master/handlers/administration.py [iso-8859-1] (original)
+++ trunk/neo/master/handlers/administration.py [iso-8859-1] Sat Oct 30 14:55:57 2010
@@ -126,13 +126,14 @@ class AdministrationHandler(MasterHandle
pt = app.pt
cell_list = []
uuid_set = set()
- # take all pending nodes
- for node in nm.getStorageList():
- if node.isPending():
- uuid_set.add(node.getUUID())
- # keep only selected nodes
- if uuid_list:
- uuid_set = uuid_set.intersection(set(uuid_list))
+ if app.getClusterState() == ClusterStates.RUNNING:
+ # take all pending nodes
+ for node in nm.getStorageList():
+ if node.isPending():
+ uuid_set.add(node.getUUID())
+ # keep only selected nodes
+ if uuid_list:
+ uuid_set = uuid_set.intersection(set(uuid_list))
# nothing to do
if not uuid_set:
neo.logging.warning('No nodes added')
More information about the Neo-report
mailing list