summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMohammed Naser <mnaser@vexxhost.com>2012-07-16 17:57:29 -0400
committerMohammed Naser <mnaser@vexxhost.com>2012-07-16 17:57:29 -0400
commit212045e4c87aee81fde82dd4887d321cb511d717 (patch)
treeccbd8e5b4cefa31b1b194ef00620505ee2256b5b
parent500ee77121512fd40f5c2afb885fdc45fbf4b57f (diff)
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
-rw-r--r--nova/virt/xenapi/vmops.py2
1 files changed, 1 insertions, 1 deletions
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():