From 734e12f0f1280f18bcf6e33a4e121846a063e30a Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 27 May 2021 09:57:07 -0400 Subject: [PATCH] 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. --- .../confluent/plugins/hardwaremanagement/ipmi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index a75b7a36..752ca529 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -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: