Add delay before setting to start state

This commit is contained in:
Joshua Boniface 2018-06-11 13:19:23 -04:00
parent 3c35142523
commit e10e1a0bc5
1 changed files with 2 additions and 1 deletions

View File

@ -194,11 +194,12 @@ class VMInstance:
time.sleep(1) time.sleep(1)
self.zk.set('/domains/{}/state'.format(self.domuuid), 'start'.encode('ascii')) self.zk.set('/domains/{}/state'.format(self.domuuid), 'start'.encode('ascii'))
else: else:
self.zk.set('/domains/{}/state'.format(self.domuuid), 'start'.encode('ascii'))
try: try:
self.thishypervisor.domain_list.remove(self.domuuid) self.thishypervisor.domain_list.remove(self.domuuid)
except ValueError: except ValueError:
pass pass
time.sleep(1)
self.zk.set('/domains/{}/state'.format(self.domuuid), 'start'.encode('ascii'))
self.inmigrate = False self.inmigrate = False