From 65644195fed64a2b4e70c797b4faeddedd12a3d6 Mon Sep 17 00:00:00 2001 From: Monsyne Dragon Date: Mon, 5 Nov 2012 17:46:55 +0000 Subject: 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 --- plugins/xenserver/xenapi/etc/xapi.d/plugins/bandwidth | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/xenserver/xenapi') 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 -- cgit