Fix incorrect keepalive interval setting

This commit is contained in:
Joshua Boniface 2020-10-26 11:44:45 -04:00
parent 81141c9b93
commit 5d08ad9573
1 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ def fenceNode(node_name, zk_conn, config, logger):
failcount = 0 failcount = 0
while failcount < failcount_limit: while failcount < failcount_limit:
# Wait 5 seconds # Wait 5 seconds
time.sleep(config.keepalive_interval) time.sleep(config['keepalive_interval'])
# Get the state # Get the state
node_daemon_state = zkhandler.readdata(zk_conn, '/nodes/{}/daemonstate'.format(node_name)) node_daemon_state = zkhandler.readdata(zk_conn, '/nodes/{}/daemonstate'.format(node_name))
# Is it still 'dead' # Is it still 'dead'
@ -57,7 +57,7 @@ def fenceNode(node_name, zk_conn, config, logger):
# Shoot it in the head # Shoot it in the head
fence_status = rebootViaIPMI(ipmi_hostname, ipmi_username, ipmi_password, logger) fence_status = rebootViaIPMI(ipmi_hostname, ipmi_username, ipmi_password, logger)
# Hold to ensure the fence takes effect and system stabilizes # Hold to ensure the fence takes effect and system stabilizes
time.sleep(config.keepalive_interval * 2) time.sleep(config['keepalive_interval'] * 2)
# Force into secondary network state if needed # Force into secondary network state if needed
if node_name in config['coordinators']: if node_name in config['coordinators']: