Don't skip outself when fencing

This commit is contained in:
Joshua Boniface 2018-06-17 01:55:11 -04:00
parent 778a126604
commit 617902ede0
1 changed files with 2 additions and 1 deletions

View File

@ -330,8 +330,9 @@ def fenceNode(node_name, zk):
hypervisor_list = zk.get_children('/nodes')
current_hypervisor = zk.get('/domains/{}/hypervisor'.format(dom_uuid))[0].decode('ascii')
for hypervisor in hypervisor_list:
print(hypervisor)
state = zk.get('/nodes/{}/state'.format(hypervisor))[0].decode('ascii')
if state != 'start' or hypervisor == current_hypervisor:
if state != 'start':
continue
memfree = int(zk.get('/nodes/{}/memfree'.format(hypervisor))[0].decode('ascii'))