Francesco Romani has uploaded a new change for review.

Change subject: stats: change log to exception for missing stats
......................................................................

stats: change log to exception for missing stats

Once we have explicitely handled the common error
conditions for missing stats, we should now consider
really 'exceptional' the case of a missing stat.

Change-Id: Ic2655dc84c063a2dde43742647b02dba4066312b
Signed-off-by: Francesco Romani <[email protected]>
---
M vdsm/virt/vm.py
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/19/27419/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 4b81b74..54f96d5 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -284,7 +284,7 @@
                 sampleInterval)
 
         except (TypeError, ZeroDivisionError) as e:
-            self._log.debug("CPU stats not available: %s", e)
+            self._log.exception("CPU stats not available: %s", e)
 
     @classmethod
     def _getNicStats(cls, name, model, mac,
@@ -352,7 +352,7 @@
                     dStats['writeRate'] = (
                         (eInfo[dName][3] - sInfo[dName][3]) / sampleInterval)
             except (AttributeError, KeyError, TypeError, ZeroDivisionError):
-                self._log.debug("Disk %s stats not available", dName)
+                self._log.exception("Disk %s stats not available", dName)
 
             stats[dName] = dStats
 
@@ -395,7 +395,7 @@
                         dLatency['flushLatency']) = _avgLatencyCalc(
                             sInfo[dName], eInfo[dName])
                 except (KeyError, TypeError):
-                    self._log.debug("Disk %s latency not available", dName)
+                    self._log.exception("Disk %s latency not available", dName)
 
             stats[dName].update(dLatency)
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2655dc84c063a2dde43742647b02dba4066312b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to