Correct flawed conditional in verify_ipmi

This commit is contained in:
Joshua Boniface 2021-10-07 15:11:19 -04:00
parent ee348593c9
commit feab5d3479
1 changed files with 1 additions and 1 deletions

View File

@ -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