Nir Soffer has posted comments on this change. Change subject: sampling: do not produce stats for missing disks ......................................................................
Patch Set 2: (2 comments) http://gerrit.ovirt.org/#/c/30029/2/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 540: if sInfo is not None and vmDrive.name in sInfo: Line 541: # will be None if sampled during recovery Line 542: dStats.update(self._calcDiskRate(vmDrive, sInfo, eInfo, Line 543: sampleInterval)) Line 544: except (AttributeError, KeyError, TypeError, ZeroDivisionError): With this change, can we remove some of these errors from the try block? Line 545: self._log.exception("Disk %s stats not available", Line 546: vmDrive.name) Line 547: Line 548: stats[vmDrive.name] = dStats Line 596: # in case of hotplugged disk, start samples will Line 597: # be missed until the sampling code catches up. Line 598: try: Line 599: dLatency = _avgLatencyCalc(sInfo[dName], eInfo[dName]) Line 600: except (KeyError, TypeError): Can we now remove one of the possible exceptions? Line 601: self._log.warning("Disk %s latency not available", dName) Line 602: Line 603: stats[dName].update(dLatency) Line 604: -- 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: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: Vinzenz Feenstra <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
