From 441ac73e14e361f95d08c6117c58e3c4cc6eda14 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Wed, 13 Jun 2018 12:12:00 -0400 Subject: [PATCH] Explicitly continue if VM is not supposed to be on this node --- NodeInstance.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NodeInstance.py b/NodeInstance.py index b4b6f99f..2e0c2627 100644 --- a/NodeInstance.py +++ b/NodeInstance.py @@ -131,6 +131,9 @@ class NodeInstance(): target_hypervisor = None hypervisor_list = self.zk.get_children('/nodes') current_hypervisor = self.zk.get('/domains/{}/hypervisor'.format(dom_uuid))[0].decode('ascii') + if current_hypervisor != self.this_node: + continue + for hypervisor in hypervisor_list: daemon_state = self.zk.get('/nodes/{}/daemonstate'.format(hypervisor))[0].decode('ascii') domain_state = self.zk.get('/nodes/{}/domainstate'.format(hypervisor))[0].decode('ascii')