mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 09:32:21 +00:00
Fix issue where ipmi plugin would continue despite error
In changing to do multi-node, some flow was altered. Where it would formerly cease execution, the changes made it continue. Add return statements to match everywhere that return statements were effectively removed.
This commit is contained in:
parent
26a969c41a
commit
17b5d5a816
@ -455,7 +455,7 @@ def handle_node_request(configmanager, inputdata, operation,
|
||||
nodesbyhandler[hfunc].append(node)
|
||||
else:
|
||||
nodesbyhandler[hfunc] = [node]
|
||||
for hfunc in nodesbyhandler.iterkeys():
|
||||
for hfunc in nodesbyhandler:
|
||||
passvalues.append(hfunc(
|
||||
nodes=nodesbyhandler[hfunc], element=pathcomponents,
|
||||
configmanager=configmanager,
|
||||
|
@ -294,10 +294,12 @@ class IpmiHandler(object):
|
||||
self.error = self.error.replace(' reported in RAKP4','')
|
||||
self.output.put(msg.ConfluentTargetTimeout(
|
||||
self.node, self.error))
|
||||
return
|
||||
elif ('Unauthorized' in self.error or
|
||||
'Incorrect password' in self.error):
|
||||
self.output.put(
|
||||
msg.ConfluentTargetInvalidCredentials(self.node))
|
||||
return
|
||||
else:
|
||||
raise Exception(self.error)
|
||||
if self.element == ['power', 'state']:
|
||||
@ -408,6 +410,7 @@ class IpmiHandler(object):
|
||||
self.output.put(msg.BootDevice(node=self.node,
|
||||
device=bootdev['bootdev'],
|
||||
bootmode=bootmode))
|
||||
return
|
||||
elif 'update' == self.op:
|
||||
bootdev = self.inputdata.bootdevice(self.node)
|
||||
douefi = False
|
||||
@ -425,21 +428,25 @@ class IpmiHandler(object):
|
||||
self.ipmicmd.set_identify(on=identifystate)
|
||||
self.output.put(msg.IdentifyState(
|
||||
node=self.node, state=self.inputdata.inputbynode[self.node]))
|
||||
return
|
||||
elif 'read' == self.op:
|
||||
# ipmi has identify as read-only for now
|
||||
self.output.put(msg.IdentifyState(node=self.node, state=''))
|
||||
return
|
||||
|
||||
def power(self):
|
||||
if 'read' == self.op:
|
||||
power = self.ipmicmd.get_power()
|
||||
self.output.put(msg.PowerState(node=self.node,
|
||||
state=power['powerstate']))
|
||||
return
|
||||
elif 'update' == self.op:
|
||||
powerstate = self.inputdata.powerstate(self.node)
|
||||
self.ipmicmd.set_power(powerstate, wait=30)
|
||||
power = self.ipmicmd.get_power()
|
||||
self.output.put(msg.PowerState(node=self.node,
|
||||
state=power['powerstate']))
|
||||
return
|
||||
|
||||
|
||||
def _str_health(health):
|
||||
|
Loading…
Reference in New Issue
Block a user