summaryrefslogtreecommitdiffstats
path: root/plugins/xenserver/xenapi
diff options
context:
space:
mode:
authorMonsyne Dragon <mdragon@rackspace.com>2012-11-05 17:46:55 +0000
committerMonsyne Dragon <mdragon@rackspace.com>2012-11-05 17:46:55 +0000
commit65644195fed64a2b4e70c797b4faeddedd12a3d6 (patch)
tree0f16c8d275f6ace53bf85ac51b6ae5fce0ce20f0 /plugins/xenserver/xenapi
parent10979da33ca790b86976c1909624c1440020abe0 (diff)
downloadnova-65644195fed64a2b4e70c797b4faeddedd12a3d6.tar.gz
nova-65644195fed64a2b4e70c797b4faeddedd12a3d6.tar.xz
nova-65644195fed64a2b4e70c797b4faeddedd12a3d6.zip
Fix bandwidth polling exception.
When the bandwidth polling task tries to update bw usage for an instance that does not have an entry for the last two periods already in the bw_usage_cache table, it will throw an exception in the polling task. This was just a misses 'if' statement. Also: xenserver: fix swapped bw data in xs plugin. This fixes bug 1075255 Change-Id: I44bb143039fcdfc8dacb13b67ae8f79dc5f38777
Diffstat (limited to 'plugins/xenserver/xenapi')
-rwxr-xr-xplugins/xenserver/xenapi/etc/xapi.d/plugins/bandwidth2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/bandwidth b/plugins/xenserver/xenapi/etc/xapi.d/plugins/bandwidth
index 171011a06..4c4538fa4 100755
--- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/bandwidth
+++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/bandwidth
@@ -38,7 +38,7 @@ def _read_proc_net():
dev = devmap.get(dom, {})
# Note, we deliberately swap in and out, as instance traffic
# shows up inverted due to going though the bridge. (mdragon)
- dev[vifnum] = dict(bw_in=int(slist[0]), bw_out=int(slist[8]))
+ dev[vifnum] = dict(bw_in=int(slist[8]), bw_out=int(slist[0]))
devmap[dom] = dev
return devmap