Commit df6170a5 authored by Vincent Pelletier's avatar Vincent Pelletier

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.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2382 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent add68f82
......@@ -126,13 +126,14 @@ class AdministrationHandler(MasterHandler):
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')
......
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