2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 09:32:21 +00:00

Amend long wait to only apply to shutdown

The previous 30 seconds was a good amount to
wait for everything but a graceful shutdown.

The new 5 minute wait is too long to wait to
find out a system can't turn on.

Apply the 5 minute wait only on clean shutdown
request.
This commit is contained in:
Jarrod Johnson 2021-05-27 09:57:07 -04:00
parent deb2b98e7f
commit 734e12f0f1

View File

@ -1364,11 +1364,14 @@ class IpmiHandler(object):
elif 'update' == self.op:
powerstate = self.inputdata.powerstate(self.node)
oldpower = None
waitamount = 30
if powerstate == 'boot':
oldpower = self.ipmicmd.get_power()
if 'powerstate' in oldpower:
oldpower = oldpower['powerstate']
self.ipmicmd.set_power(powerstate, wait=True)
elif powerstate == 'shutdown':
waitamount = True
self.ipmicmd.set_power(powerstate, wait=waitamount)
if powerstate == 'boot' and oldpower == 'on':
power = {'powerstate': 'reset'}
else: