Change in vdsm[master]: sampling: do not produce stats for missing disks
nsoffer at redhat.com
nsoffer at redhat.com
Thu Sep 4 18:01:16 UTC 2014
Nir Soffer has posted comments on this change.
Change subject: sampling: do not produce stats for missing disks
......................................................................
Patch Set 3: Code-Review+1
(2 comments)
http://gerrit.ovirt.org/#/c/30029/3/vdsm/virt/vm.py
File vdsm/virt/vm.py:
Line 542: vmDrive.name in sInfo and vmDrive.name in eInfo):
Line 543: # will be None if sampled during recovery
Line 544: dStats.update(self._calcDiskRate(vmDrive, sInfo, eInfo,
Line 545: sampleInterval))
Line 546: except (AttributeError, TypeError, ZeroDivisionError):
Same issue with TypeError as bellow, for another patch.
Line 547: self._log.exception("Disk %s stats not available",
Line 548: vmDrive.name)
Line 549:
Line 550: stats[vmDrive.name] = dStats
Line 598: # in case of hotplugged disk, start samples will
Line 599: # be missed until the sampling code catches up.
Line 600: try:
Line 601: dLatency = _avgLatencyCalc(sInfo[dName], eInfo[dName])
Line 602: except TypeError:
For another patch - remove the TypeError. Code calculating latency should not raise TypeError when latency is not available.
I guess that sInfo[dName] is None in this case, so lets replaced with this explicit check:
if sInfo[dName] is None...
Line 603: self._log.warning("Disk %s latency not available", dName)
Line 604:
Line 605: stats[dName].update(dLatency)
Line 606:
--
To view, visit http://gerrit.ovirt.org/30029
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If93572c21ecd47fe0bb2a6c6e13c0555034be881
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list