From a0b90871677fe79418a66356860fced4d8f4f597 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Tue, 1 Jun 2021 10:52:41 -0400 Subject: [PATCH] Set Daemon migration selector in zookeeper --- node-daemon/pvcnoded/Daemon.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/node-daemon/pvcnoded/Daemon.py b/node-daemon/pvcnoded/Daemon.py index 591b23a1..d5c2b856 100644 --- a/node-daemon/pvcnoded/Daemon.py +++ b/node-daemon/pvcnoded/Daemon.py @@ -1504,6 +1504,17 @@ def node_keepalive(): if debug: logger.out("Keepalive starting", state='d', prefix='main-thread') + # Set the migration selector in Zookeeper for clients to read + if config['enable_hypervisor']: + if this_node.router_state == 'primary': + try: + if zkhandler.read('/config/migration_target_selector') != config['migration_target_selector']: + raise + except Exception: + zkhandler.write([ + ('/config/migration_target_selector', config['migration_target_selector']) + ]) + # Set the upstream IP in Zookeeper for clients to read if config['enable_networking']: if this_node.router_state == 'primary':