This commit is contained in:
Joshua Boniface 2018-05-31 23:04:34 -04:00
parent e498d81a8f
commit a9768559aa
1 changed files with 3 additions and 2 deletions

View File

@ -50,8 +50,9 @@ atexit.register(cleanup)
# Check if our node exists in Zookeeper, and create it if not
mynodestring = '/nodes/%s' % myhostname
if not zk.exists('%s' + mynodestring):
print("derp")
if zk.exists('%s' + mynodestring):
print("Node is present in Zookeeper")
else:
zk.create('%s' % mynodestring, 'hypervisor'.encode('ascii'))
zk.create('%s/state' % mynodestring, 'stop'.encode('ascii'))
zk.create('%s/cpucount' % mynodestring, '0'.encode('ascii'))