Fix missing dom_uuid values in data reads

This commit is contained in:
Joshua Boniface 2019-07-07 15:29:34 -04:00
parent b82ccaa84d
commit d9ebd04264
1 changed files with 2 additions and 2 deletions

View File

@ -362,8 +362,8 @@ class NodeInstance(object):
target_node = findTargetHypervisor(self.zk_conn, 'mem', dom_uuid)
# Don't replace the previous node if the VM is already migrated
if zkhandler.readdata(self.zk_conn, '/domains/{}/migrated') is 'yes':
current_node = zkhandler.readdata(self.zk_conn, '/domains/{}/lastnode')
if zkhandler.readdata(self.zk_conn, '/domains/{}/migrated'.format(dom_uuid)) == 'yes':
current_node = zkhandler.readdata(self.zk_conn, '/domains/{}/lastnode'.format(dom_uuid))
else:
current_node = zkhandler.readdata(self.zk_conn, '/domains/{}/node'.format(dom_uuid))