Fix problem writing keepalive time to ZK

This commit is contained in:
Joshua Boniface 2018-06-06 17:53:59 -04:00
parent bce202246e
commit 4b85ce9462
2 changed files with 2 additions and 2 deletions

View File

@ -185,7 +185,7 @@ class NodeInstance():
self.zk.set(self.zkey + '/memfree', str(self.memfree).encode('ascii'))
self.zk.set(self.zkey + '/cpuload', str(self.cpuload).encode('ascii'))
self.zk.set(self.zkey + '/runningdomains', ' '.join(self.domain_list).encode('ascii'))
self.zk.set(self.zkey + '/keepalive', keepalive_time.encode('ascii'))
self.zk.set(self.zkey + '/keepalive', str(keepalive_time).encode('ascii'))
except:
return

View File

@ -84,7 +84,7 @@ else:
zk.create('%s/memfree' % mynodestring, '0'.encode('ascii'))
zk.create('%s/cpuload' % mynodestring, '0.0'.encode('ascii'))
zk.create('%s/runningdomains' % mynodestring, ''.encode('ascii'))
zk.create('%s/keepalive' % mynodestring, keepalive_time.encode('ascii'))
zk.create('%s/keepalive' % mynodestring, str(keepalive_time).encode('ascii'))
t_node = dict()
s_domain = dict()