From 560fa57176637fe93bf738c47c8a3eb0a69d551c Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sat, 29 Sep 2018 02:00:07 -0400 Subject: [PATCH] Make use of router primary write key in client too --- client-common/client_lib/router.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client-common/client_lib/router.py b/client-common/client_lib/router.py index 2e0c90df..389a66bb 100644 --- a/client-common/client_lib/router.py +++ b/client-common/client_lib/router.py @@ -101,7 +101,10 @@ def primary_router(zk_conn, router): return False, 'ERROR: No router named "{}" is present in the cluster.'.format(router) click.echo('Setting router {} in primary mode.'.format(router)) - zkhandler.writedata(zk_conn, { '/routers/{}/networkstate'.format(router): 'primary' }) + zkhandler.writedata(zk_conn, { + '/routers': router, + '/routers/{}/networkstate'.format(router): 'primary' + }) return True, '' def get_info(zk_conn, router, long_output):