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):