Fix bad split on list

This commit is contained in:
Joshua Boniface 2019-03-13 19:26:08 -04:00
parent df394c5c39
commit 6eab87a2a8
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ def fenceNode(node_name, zk_conn, config, logger):
time.sleep(3) time.sleep(3)
# Force into secondary network state if needed # Force into secondary network state if needed
if node_name in config['coordinators'].split(','): if node_name in config['coordinators']:
zkhandler.writedata(zk_conn, { '/nodes/{}/routerstate'.format(node_name): 'secondary' }) zkhandler.writedata(zk_conn, { '/nodes/{}/routerstate'.format(node_name): 'secondary' })
if zkhandler.readdata(zk_conn, '/primary_node') == node_name: if zkhandler.readdata(zk_conn, '/primary_node') == node_name:
zkhandler.writedata(zk_conn, { '/primary_node': 'none' }) zkhandler.writedata(zk_conn, { '/primary_node': 'none' })