Revamp fencing order
Prevents unnecessarily excessive timeouts if IPMI connections time out; before, would have to go through 3 timed out commands at ~20s each before failure was registered; reduced to 1 if the first times out.
This commit is contained in:
parent
37c3b4ef80
commit
ac3ef3d792
|
@ -124,6 +124,11 @@ def rebootViaIPMI(ipmi_hostname, ipmi_user, ipmi_password, logger):
|
|||
)
|
||||
ipmi_reset_retcode, ipmi_reset_stdout, ipmi_reset_stderr = common.run_os_command(ipmi_command_reset)
|
||||
|
||||
if ipmi_reset_retcode != 0:
|
||||
logger.out('Failed to reboot dead node', state='e')
|
||||
print(ipmi_reset_stderr)
|
||||
return False
|
||||
|
||||
time.sleep(2)
|
||||
|
||||
# Ensure the node is powered on
|
||||
|
@ -139,15 +144,15 @@ def rebootViaIPMI(ipmi_hostname, ipmi_user, ipmi_password, logger):
|
|||
)
|
||||
ipmi_start_retcode, ipmi_start_stdout, ipmi_start_stderr = common.run_os_command(ipmi_command_start)
|
||||
|
||||
# Declare success or failure
|
||||
if ipmi_reset_retcode == 0:
|
||||
logger.out('Successfully rebooted dead node', state='o')
|
||||
return True
|
||||
else:
|
||||
logger.out('Failed to reboot dead node', state='e')
|
||||
if ipmi_start_retcode != 0:
|
||||
logger.out('Failed to start powered-off dead node', state='e')
|
||||
print(ipmi_reset_stderr)
|
||||
return False
|
||||
|
||||
# Declare success
|
||||
logger.out('Successfully rebooted dead node', state='o')
|
||||
return True
|
||||
|
||||
|
||||
#
|
||||
# Verify that IPMI connectivity to this host exists (used during node init)
|
||||
|
|
Loading…
Reference in New Issue