mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Add error if chain goes off into non-existent nodes
Various behaviors break if the administrator declares a chain goes to nowhere, throw up an error and hopefully see it caught to detect this misconfiguration.
This commit is contained in:
parent
f5f9403eff
commit
43fb4467b7
@ -691,6 +691,10 @@ def get_enclosure_chain_head(nodename, cfg):
|
||||
if ne in members:
|
||||
raise exc.InvalidArgumentException(
|
||||
'Circular chain that includes ' + nodename)
|
||||
if not cfg.is_node(ne):
|
||||
raise exc.InvalidArgumentException(
|
||||
'{0} is chained to nonexistent node {1} '.format(
|
||||
nodename, ne))
|
||||
nodename = ne
|
||||
members.append(nodename)
|
||||
return nodename
|
||||
|
Loading…
Reference in New Issue
Block a user