Dan Kenigsberg has uploaded a new change for review.

Change subject: iface_sampling: Fix debug logging samples
......................................................................

iface_sampling: Fix debug logging samples

Currently we have a debug logging entry whenever the tx/rx rates go
over 100%. In this log, we try to help debugging of the issue by
printing the sample value of rx and tx for all the samples in the
AVERAGING_WINDOW (size 5).

The problem comes from the fact that the decision to log is taken
by checking samples hs0 and hs1 iterating over all the devices
existing on the older hs1. However, there is no guarantee that
the devices would exist in hs2, hs3, ..., hs_AVERAGING_WINDOW.

The fix is to simply not include the samples for which the device
is missing.

Change-Id: Ibaa80f5fe069875d8e48deb1783f102b2da8f39d
Bug-Url: https://bugzilla.redhat.com/1116577
Signed-off-by: Antoni S. Puimedon <[email protected]>
Reviewed-on: http://gerrit.ovirt.org/29916
Reviewed-by: Dan Kenigsberg <[email protected]>
Reviewed-by: Francesco Romani <[email protected]>
Tested-by: Dan Kenigsberg <[email protected]>
---
M vdsm/virt/sampling.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/31789/1

diff --git a/vdsm/virt/sampling.py b/vdsm/virt/sampling.py
index 4cefc19..d6bef32 100644
--- a/vdsm/virt/sampling.py
+++ b/vdsm/virt/sampling.py
@@ -650,7 +650,8 @@
                                 interval, thisRx, thisTx,
                                 [(hs.timestamp, hs.interfaces[ifid].rx,
                                  hs.interfaces[ifid].tx)
-                                 for hs in self._samples])
+                                 for hs in self._samples if
+                                 ifid in hs.interfaces])
             iface = hs1.interfaces[ifid]
             stats['network'][ifid] = {'name': ifid, 'speed': str(ifrate),
                                       'rxDropped': str(iface.rxDropped),


-- 
To view, visit http://gerrit.ovirt.org/31789
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibaa80f5fe069875d8e48deb1783f102b2da8f39d
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.5
Gerrit-Owner: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to