Add condition to avoid setting ZK status during restart shutdown/stop
This commit is contained in:
parent
f543c43978
commit
cf6cc9ff8a
|
@ -143,7 +143,9 @@ class VMInstance:
|
|||
except ValueError:
|
||||
pass
|
||||
|
||||
if self.inrestart == False:
|
||||
self.zk.set('/domains/{}/state'.format(self.domuuid), 'stop'.encode('ascii'))
|
||||
|
||||
ansiiprint.echo('Successfully stopped VM', '{}:'.format(self.domuuid), 'o')
|
||||
self.dom = None
|
||||
self.instop = False
|
||||
|
@ -173,7 +175,9 @@ class VMInstance:
|
|||
except ValueError:
|
||||
pass
|
||||
|
||||
if self.inrestart == False:
|
||||
self.zk.set('/domains/{}/state'.format(self.domuuid), 'stop'.encode('ascii'))
|
||||
|
||||
ansiiprint.echo('Successfully shutdown VM', '{}:'.format(self.domuuid), 'o')
|
||||
self.dom = None
|
||||
self.inshutdown = False
|
||||
|
|
Loading…
Reference in New Issue