Don't skip outself when fencing
This commit is contained in:
parent
778a126604
commit
617902ede0
|
@ -330,8 +330,9 @@ def fenceNode(node_name, zk):
|
||||||
hypervisor_list = zk.get_children('/nodes')
|
hypervisor_list = zk.get_children('/nodes')
|
||||||
current_hypervisor = zk.get('/domains/{}/hypervisor'.format(dom_uuid))[0].decode('ascii')
|
current_hypervisor = zk.get('/domains/{}/hypervisor'.format(dom_uuid))[0].decode('ascii')
|
||||||
for hypervisor in hypervisor_list:
|
for hypervisor in hypervisor_list:
|
||||||
|
print(hypervisor)
|
||||||
state = zk.get('/nodes/{}/state'.format(hypervisor))[0].decode('ascii')
|
state = zk.get('/nodes/{}/state'.format(hypervisor))[0].decode('ascii')
|
||||||
if state != 'start' or hypervisor == current_hypervisor:
|
if state != 'start':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
memfree = int(zk.get('/nodes/{}/memfree'.format(hypervisor))[0].decode('ascii'))
|
memfree = int(zk.get('/nodes/{}/memfree'.format(hypervisor))[0].decode('ascii'))
|
||||||
|
|
Loading…
Reference in New Issue