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:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
self.zk.set('/domains/{}/state'.format(self.domuuid), 'stop'.encode('ascii'))
|
if self.inrestart == False:
|
||||||
|
self.zk.set('/domains/{}/state'.format(self.domuuid), 'stop'.encode('ascii'))
|
||||||
|
|
||||||
ansiiprint.echo('Successfully stopped VM', '{}:'.format(self.domuuid), 'o')
|
ansiiprint.echo('Successfully stopped VM', '{}:'.format(self.domuuid), 'o')
|
||||||
self.dom = None
|
self.dom = None
|
||||||
self.instop = False
|
self.instop = False
|
||||||
|
@ -173,7 +175,9 @@ class VMInstance:
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
self.zk.set('/domains/{}/state'.format(self.domuuid), 'stop'.encode('ascii'))
|
if self.inrestart == False:
|
||||||
|
self.zk.set('/domains/{}/state'.format(self.domuuid), 'stop'.encode('ascii'))
|
||||||
|
|
||||||
ansiiprint.echo('Successfully shutdown VM', '{}:'.format(self.domuuid), 'o')
|
ansiiprint.echo('Successfully shutdown VM', '{}:'.format(self.domuuid), 'o')
|
||||||
self.dom = None
|
self.dom = None
|
||||||
self.inshutdown = False
|
self.inshutdown = False
|
||||||
|
|
Loading…
Reference in New Issue