From 6ee4c55071af0139b624db73df8e81f7d8306b96 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 7 Oct 2021 15:11:19 -0400 Subject: [PATCH] Correct flawed conditional in verify_ipmi --- node-daemon/pvcnoded/util/fencing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node-daemon/pvcnoded/util/fencing.py b/node-daemon/pvcnoded/util/fencing.py index e87a38d1..1435d697 100644 --- a/node-daemon/pvcnoded/util/fencing.py +++ b/node-daemon/pvcnoded/util/fencing.py @@ -189,7 +189,7 @@ def reboot_via_ipmi(ipmi_hostname, ipmi_user, ipmi_password, logger): def verify_ipmi(ipmi_hostname, ipmi_user, ipmi_password): ipmi_command = f'/usr/bin/ipmitool -I lanplus -H {ipmi_hostname} -U {ipmi_user} -P {ipmi_password} chassis power status' retcode, stdout, stderr = common.run_os_command(ipmi_command, timeout=2) - if retcode == 0 and stdout.strip() != "Chassis Power is on": + if retcode == 0 and stdout.strip() == "Chassis Power is on": return True else: return False