Remove instant triggers and only run flush/unflush on keepalive

This commit is contained in:
Joshua Boniface 2018-06-11 21:47:41 -04:00
parent 78e61a759e
commit e3181b19e1
1 changed files with 2 additions and 8 deletions

View File

@ -59,12 +59,6 @@ class NodeInstance():
except AttributeError: except AttributeError:
self.domain_state = 'stop' self.domain_state = 'stop'
if self.name == self.this_node and self.inflush == False:
if self.domain_state == 'flush':
self.flush()
if self.domain_state == 'unflush':
self.unflush()
@zk.DataWatch('/nodes/{}/memfree'.format(self.name)) @zk.DataWatch('/nodes/{}/memfree'.format(self.name))
def watch_hypervisor_memfree(data, stat, event=""): def watch_hypervisor_memfree(data, stat, event=""):
try: try:
@ -311,8 +305,8 @@ class NodeInstance():
ansiiprint.echo('{}Flushed nodes:{} {}'.format(ansiiprint.bold(), ansiiprint.end(), ' '.join(self.flushed_node_list)), '', 'c') ansiiprint.echo('{}Flushed nodes:{} {}'.format(ansiiprint.bold(), ansiiprint.end(), ' '.join(self.flushed_node_list)), '', 'c')
# toggle state management of this node # toggle state management of this node
if self.domain_state == 'flush': if self.domain_state == 'flush' and self.inflush == False:
self.flush() self.flush()
if self.domain_state == 'unflush': if self.domain_state == 'unflush' and self.inflush == False:
self.unflush() self.unflush()