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): ...@@ -126,13 +126,14 @@ class AdministrationHandler(MasterHandler):
pt = app.pt pt = app.pt
cell_list = [] cell_list = []
uuid_set = set() uuid_set = set()
# take all pending nodes if app.getClusterState() == ClusterStates.RUNNING:
for node in nm.getStorageList(): # take all pending nodes
if node.isPending(): for node in nm.getStorageList():
uuid_set.add(node.getUUID()) if node.isPending():
# keep only selected nodes uuid_set.add(node.getUUID())
if uuid_list: # keep only selected nodes
uuid_set = uuid_set.intersection(set(uuid_list)) if uuid_list:
uuid_set = uuid_set.intersection(set(uuid_list))
# nothing to do # nothing to do
if not uuid_set: if not uuid_set:
neo.logging.warning('No nodes added') 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