Fix bug in config element retrieval

This commit is contained in:
Joshua Boniface 2019-10-22 12:28:18 -04:00
parent d5a120f490
commit f0e0a38a20
1 changed files with 2 additions and 2 deletions

View File

@ -153,8 +153,8 @@ def findTargetNode(zk_conn, config, dom_uuid):
try: try:
search_field = zkhandler.readdata(zk_conn, '/domains/{}/node_selector'.format(dom_uuid)) search_field = zkhandler.readdata(zk_conn, '/domains/{}/node_selector'.format(dom_uuid))
except: except:
search_field = config.migration_target_selector search_field = config['migration_target_selector']
zkhandler.writedata(zk_conn, { '/domains/{}/node_selector'.format(dom_uuid): config.migration_target_selector }) zkhandler.writedata(zk_conn, { '/domains/{}/node_selector'.format(dom_uuid): config['migration_target_selector'] })
# Execute the search # Execute the search
if search_field == 'mem': if search_field == 'mem':