Some more major tweaks to client and rename the 'formerhypervisor' to 'lasthypervisor'

This commit is contained in:
2018-06-05 22:06:08 -04:00
parent 62c5099d8f
commit dacce87175
3 changed files with 170 additions and 72 deletions

View File

@ -100,8 +100,8 @@ class NodeInstance(threading.Thread):
def unflush(self):
print('>>> Restoring node %s to active service' % self.name)
for domain in self.s_domain:
former_hypervisor = self.zk.get("/domains/" + domain + '/formerhypervisor')[0].decode('ascii')
if former_hypervisor == self.name:
last_hypervisor = self.zk.get("/domains/" + domain + '/lasthypervisor')[0].decode('ascii')
if last_hypervisor == self.name:
print(">>> Setting unmigration for %s" % domain)
transaction = self.zk.transaction()
transaction.set_data('/domains/' + domain + '/state', 'migrate'.encode('ascii'))