mirror of
https://github.com/xcat2/confluent.git
synced 2024-12-25 04:32:11 +00:00
Provide better reseat error message on non-enclosure
If a user were to try to reseat a node that isn't enclosure based or at least does not have the configuration, provide a clue as to what happened.
This commit is contained in:
parent
d473d23725
commit
62ac582b61
@ -19,8 +19,15 @@ def update(nodes, element, configmanager, inputdata):
|
||||
emebs = configmanager.get_node_attributes(
|
||||
nodes, (u'enclosure.manager', u'enclosure.bay'))
|
||||
for node in nodes:
|
||||
em = emebs[node]['enclosure.manager']['value']
|
||||
eb = emebs[node]['enclosure.bay']['value']
|
||||
try:
|
||||
em = emebs[node]['enclosure.manager']['value']
|
||||
eb = emebs[node]['enclosure.bay']['value']
|
||||
except KeyError:
|
||||
yield msg.ConfluentNodeError(
|
||||
node,
|
||||
'Reseat is only supported on servers in an enclosure, and '
|
||||
'with enclosure.manager and enclosure.bay defined')
|
||||
continue
|
||||
try:
|
||||
for rsp in core.handle_path(
|
||||
'/nodes/{0}/_enclosure/reseat_bay'.format(em),
|
||||
|
Loading…
Reference in New Issue
Block a user