More debug

This commit is contained in:
Joshua Boniface 2018-06-11 17:32:21 -04:00
parent ef49260762
commit e4cb3d6a71
1 changed files with 5 additions and 3 deletions

View File

@ -130,9 +130,6 @@ class NodeInstance():
for hypervisor in hypervisor_list: for hypervisor in hypervisor_list:
daemon_state = self.zk.get('/nodes/{}/daemonstate'.format(hypervisor))[0].decode('ascii') daemon_state = self.zk.get('/nodes/{}/daemonstate'.format(hypervisor))[0].decode('ascii')
domain_state = self.zk.get('/nodes/{}/domainstate'.format(hypervisor))[0].decode('ascii') domain_state = self.zk.get('/nodes/{}/domainstate'.format(hypervisor))[0].decode('ascii')
print(hypervisor)
print(daemon_state)
print(domain_state)
if hypervisor == current_hypervisor: if hypervisor == current_hypervisor:
continue continue
@ -140,6 +137,11 @@ class NodeInstance():
continue continue
memfree = int(self.zk.get('/nodes/{}/memfree'.format(hypervisor))[0].decode('ascii')) memfree = int(self.zk.get('/nodes/{}/memfree'.format(hypervisor))[0].decode('ascii'))
print(hypervisor)
print(daemon_state)
print(domain_state)
print(memfree)
print(most_memfree)
if memfree > most_memfree: if memfree > most_memfree:
most_memfree = memfree most_memfree = memfree
target_hypervisor = hypervisor target_hypervisor = hypervisor