Set Daemon migration selector in zookeeper

This commit is contained in:
Joshua Boniface 2021-06-01 10:52:41 -04:00
parent 33a54cf7f2
commit a0b9087167
1 changed files with 11 additions and 0 deletions

View File

@ -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':