From 212045e4c87aee81fde82dd4887d321cb511d717 Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Mon, 16 Jul 2012 17:57:29 -0400 Subject: Improved VM detection for bandwidth polling (XAPI) XenAPI bandwidth polling would fail or be unreliable if there was any other virtual machines on the same node (such as the nova compute node). This uses the nova_uuid which is much more reliable to be there. Fixes LP Bug #918383 Change-Id: I1eb9e6289a8171d6fc93a49b327df474b1e2e503 --- nova/virt/xenapi/vmops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/virt/xenapi/vmops.py b/nova/virt/xenapi/vmops.py index 4805ccaf7..40ef3f9b1 100644 --- a/nova/virt/xenapi/vmops.py +++ b/nova/virt/xenapi/vmops.py @@ -1148,7 +1148,7 @@ class VMOps(object): for vrec in vm_rec['VIFs']]: vif_map[vif['device']] = vif['MAC'] name = vm_rec['name_label'] - if vm_rec["is_a_template"] or vm_rec["is_control_domain"]: + if 'nova_uuid' not in vm_rec['other_config']: continue vifs_bw = bw.setdefault(name, {}) for key, val in data.iteritems(): -- cgit