From fa46bd47d6c38ea6bd14dc160dc31d442438acd3 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Tue, 17 Jul 2018 02:39:03 -0400 Subject: [PATCH] Correctly parse subprocess object --- pvcd/NodeInstance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pvcd/NodeInstance.py b/pvcd/NodeInstance.py index 52cf0064..9de91d95 100644 --- a/pvcd/NodeInstance.py +++ b/pvcd/NodeInstance.py @@ -383,7 +383,7 @@ def migrateFromFencedHost(zk_conn, node_name): def rebootViaIPMI(ipmi_hostname, ipmi_user, ipmi_password): ipmi_command = ['/usr/bin/ipmitool', '-I', 'lanplus', '-H', ipmi_hostname, '-U', ipmi_user, '-P', ipmi_password, 'chassis', 'power', 'reset'] ipmi_command_output = subprocess.run(ipmi_command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - if ipmi_command_output == 0: + if ipmi_command_output.returncode == 0: ansiiprint.echo('Successfully rebooted dead node', '', 'o') return True else: