Comment cleanup

This commit is contained in:
Joshua Boniface 2020-06-06 13:20:40 -04:00
parent a672e06dd2
commit cebb4bbc1a
1 changed files with 5 additions and 4 deletions

View File

@ -1264,6 +1264,7 @@ def node_keepalive():
logger.out('Failed to upload OSD stats from dictionary: {}'.format(e), state='w') logger.out('Failed to upload OSD stats from dictionary: {}'.format(e), state='w')
osds_this_node += 1 osds_this_node += 1
# Normalize running VM status
memalloc = 0 memalloc = 0
vcpualloc = 0 vcpualloc = 0
if enable_hypervisor: if enable_hypervisor:
@ -1305,10 +1306,7 @@ def node_keepalive():
# Close the Libvirt connection # Close the Libvirt connection
lv_conn.close() lv_conn.close()
# Set our information in zookeeper # Get node performance statistics
if debug:
print("Set our information in zookeeper")
#this_node.name = lv_conn.getHostname()
this_node.memtotal = int(psutil.virtual_memory().total / 1024 / 1024) this_node.memtotal = int(psutil.virtual_memory().total / 1024 / 1024)
this_node.memused = int(psutil.virtual_memory().used / 1024 / 1024) this_node.memused = int(psutil.virtual_memory().used / 1024 / 1024)
this_node.memfree = int(psutil.virtual_memory().free / 1024 / 1024) this_node.memfree = int(psutil.virtual_memory().free / 1024 / 1024)
@ -1320,7 +1318,10 @@ def node_keepalive():
else: else:
this_node.domains_count = 0 this_node.domains_count = 0
# Set our information in zookeeper
keepalive_time = int(time.time()) keepalive_time = int(time.time())
if debug:
print("Set our information in zookeeper")
try: try:
zkhandler.writedata(zk_conn, { zkhandler.writedata(zk_conn, {
'/nodes/{}/memtotal'.format(this_node.name): str(this_node.memtotal), '/nodes/{}/memtotal'.format(this_node.name): str(this_node.memtotal),