Change in vdsm[master]: sampling: do not produce stats for missing disks
Francesco Romani has posted comments on this change. Change subject: sampling: do not produce stats for missing disks .. Patch Set 3: Verified+1 Re-verified: Thread-13::DEBUG::2014-09-10 10:42:44,741::vm::3566::vm.Vm::(hotplugDisk) vmId=`56d1c657-dd76-4609-a207-c050699be5be`::Hotplug disk xml: disk device=disk snapshot=no type=block address bus=0x00 domain=0x function=0x0 slot=0x07 type=pci/ source dev=/rhev/data-center/0002-0002-0002-0002-03dd/8ceb838a-4e74-420d-b1e2-817c0e9f8eea/images/84142b8c-7c06-4767-9ff9-16f43597fbad/0d781ab0-4b01-4ab2-8e81-fa11a9a830ed/ target bus=virtio dev=vdb/ serial84142b8c-7c06-4767-9ff9-16f43597fbad/serial driver cache=none error_policy=stop io=native name=qemu type=qcow2/ /disk then, after some time: GENji 10:53:08 root [~]$ vdsClient localhost getAllVmStats | grep vdb disks = {'vda': {'readLatency': '0', 'apparentsize': '11811160064', 'writeLatency': '0', 'imageID': 'd5ed26d5-3d35-4ef8-b52c-a65d99e12ad0', 'flushLatency': '0', 'readRate': '0.00', 'truesize': '11811160064', 'writeRate': '0.00'}, 'vdb': {'readLatency': '0', 'apparentsize': '1073741824', 'writeLatency': '0', 'imageID': '84142b8c-7c06-4767-9ff9-16f43597fbad', 'flushLatency': '0', 'readRate': '0.00', 'truesize': '1073741824', 'writeRate': '0.00'}, 'hdc': {'readLatency': '0', 'apparentsize': '0', 'writeLatency': '0', 'flushLatency': '0', 'readRate': '0.00', 'truesize': '0', 'writeRate': '0.00'}} (no error in the logs). Thread-13::DEBUG::2014-09-10 10:54:33,173::vm::3619::vm.Vm::(hotunplugDisk) vmId=`56d1c657-dd76-4609-a207-c050699be5be`::Hotunplug disk xml: disk device=disk snapshot=no type=block address bus=0x00 domain=0x function=0x0 slot=0x07 type=pci/ source dev=/rhev/data-center/0002-0002-0002-0002-03dd/8ceb838a-4e74-420d-b1e2-817c0e9f8eea/images/84142b8c-7c06-4767-9ff9-16f43597fbad/0d781ab0-4b01-4ab2-8e81-fa11a9a830ed/ target bus=virtio dev=vdb/ serial84142b8c-7c06-4767-9ff9-16f43597fbad/serial driver cache=none error_policy=stop io=native name=qemu type=qcow2/ /disk and GENji 10:55:18 root [~]$ vdsClient localhost getAllVmStats | grep disks disks = {'vda': {'readLatency': '0', 'apparentsize': '11811160064', 'writeLatency': '0', 'imageID': 'd5ed26d5-3d35-4ef8-b52c-a65d99e12ad0', 'flushLatency': '0', 'readRate': '0.00', 'truesize': '11811160064', 'writeRate': '0.00'}, 'hdc': {'readLatency': '0', 'apparentsize': '0', 'writeLatency': '0', 'flushLatency': '0', 'readRate': '0.00', 'truesize': '0', 'writeRate': '0.00'}} -- 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 from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
Dan Kenigsberg has submitted this change and it was merged. Change subject: sampling: do not produce stats for missing disks .. sampling: do not produce stats for missing disks Adding of a new disk using hotplug (hotplugDisk verb) can trigger an error during the stats reporting (getVmStats verb). This error is transient, so it was likely got unnoticed so far. When a disk is hot-plugged, VDSM correctly updates the list of the drives of a VM. When stats for such a VM are asked, VDSM iterates over the list of the drives of a VM, and looks up for disk samples of each drive. The stats are collected (by default) every 60s, and VDSM considers the oldest and the newest samples; so, until the oldest set of samples collected includes values for the hotplugged disk, we will have an error. We have a vulerabilility window up to (sampling_window * sampling_interval) in the worst case. With default values this is 2 * 60s = 120s. After that, everything goes back to normality, and the stats for the new disk are reported correctly. This patch fixes this issue by just ignoring stats for disks which are part of a VM, but for which samples aren't yet available. Change-Id: If93572c21ecd47fe0bb2a6c6e13c0555034be881 Bug-Url: https://bugzilla.redhat.com/1119051 Signed-off-by: Francesco Romani from...@redhat.com Reviewed-on: http://gerrit.ovirt.org/30029 Reviewed-by: Nir Soffer nsof...@redhat.com Reviewed-by: Dan Kenigsberg dan...@redhat.com --- M vdsm/virt/vm.py 1 file changed, 7 insertions(+), 4 deletions(-) Approvals: Nir Soffer: Looks good to me, but someone else must approve Dan Kenigsberg: Looks good to me, approved Francesco Romani: Verified -- To view, visit http://gerrit.ovirt.org/30029 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: If93572c21ecd47fe0bb2a6c6e13c0555034be881 Gerrit-PatchSet: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
oVirt Jenkins CI Server has posted comments on this change. Change subject: sampling: do not produce stats for missing disks .. Patch Set 4: Build Successful http://jenkins.ovirt.org/job/vdsm_master_create-rpms_merged/1827/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_create-rpms_merged_test_debug/168/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_verify-error-codes_merged/5801/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit-tests_merged/3960/ : SUCCESS -- 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: 4 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
Dan Kenigsberg has posted comments on this change. Change subject: sampling: do not produce stats for missing disks .. Patch Set 3: Code-Review+2 -- 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 from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
Francesco Romani has posted comments on this change. Change subject: sampling: do not produce stats for missing disks .. Patch Set 3: rebased. Dropped the KeyError from the except clause, and added extra safety precautions to make sure this is safe. the except clauses can be simplified further, but I think this is better done in followup patches. -- 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 from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
oVirt Jenkins CI Server has posted comments on this change. Change subject: sampling: do not produce stats for missing disks .. Patch Set 3: Build Failed http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11330/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12274/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12119/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1623/ : There was an infra issue, please contact in...@ovirt.org -- 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 from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
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 from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
Francesco Romani 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? Probably yes. Let me check. 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? Same as above. 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 from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
Vinzenz Feenstra has posted comments on this change. Change subject: sampling: do not produce stats for missing disks .. Patch Set 2: Code-Review+1 -- 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 from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
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 from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
Francesco Romani has posted comments on this change. Change subject: sampling: do not produce stats for missing disks .. Patch Set 2: changes: rebased (not trivial rebase) improved commit message -- 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 from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
oVirt Jenkins CI Server has posted comments on this change. Change subject: sampling: do not produce stats for missing disks .. Patch Set 2: Build Failed http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/11164/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/12106/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/11953/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1574/ : There was an infra issue, please contact in...@ovirt.org -- 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 from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
Adam Litke has posted comments on this change. Change subject: sampling: do not produce stats for missing disks .. Patch Set 2: Code-Review+1 -- 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 from...@redhat.com Gerrit-Reviewer: Adam Litke ali...@redhat.com Gerrit-Reviewer: Antoni Segura Puimedon asegu...@redhat.com Gerrit-Reviewer: Dan Kenigsberg dan...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: Nir Soffer nsof...@redhat.com Gerrit-Reviewer: Vinzenz Feenstra vfeen...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
Francesco Romani has posted comments on this change. Change subject: sampling: do not produce stats for missing disks .. Patch Set 1: Verified+1 verified by hotplugging one virtio disk (repeated a few times). The stats for the new disk eventually where reported, and no error was present in the logs. -- 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: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani from...@redhat.com Gerrit-Reviewer: Francesco Romani from...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
Francesco Romani has uploaded a new change for review. Change subject: sampling: do not produce stats for missing disks .. sampling: do not produce stats for missing disks The adding of a new disk using hotplug (hotplugDisk verb) can trigger an error during the stats reporting (getVmStats verb). This error is transient, so it was likely unnoticed so far. When a disk is hot-plugged, VDSM correctly updates the list of the drives of a VM. When stats for such a VM are asked, VDSM iterates over the list of the drives of a VM, and looks up for disk samples of each drive. The stats are collected (by default) every 60s, and VDSM considers the oldest and the newst samples; so, until the oldest samples collected has the values for the new disk, we will have an error. We have a vulerabilility window up to (sampling_window * sampling_interval) in the worst case. With default values is 2 * 60s = 120s. After that, everything should goes back to normality, and the stats for the new disk start appearing correctly. This patch fixes this issue by just ignoring stats for disks which are part of a VM, but for which samples aren't yet available. Change-Id: If93572c21ecd47fe0bb2a6c6e13c0555034be881 Bug-Url: https://bugzilla.redhat.com/1119051 Signed-off-by: Francesco Romani from...@redhat.com --- M vdsm/virt/vm.py 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/29/30029/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 7835e99..6773099 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -514,8 +514,10 @@ dStats['imageID'] = vmDrive.imageID elif GUID in vmDrive: dStats['lunGUID'] = vmDrive.GUID -if sInfo is not None: +if sInfo is not None and dName in sInfo: # will be None if sampled during recovery +# in case of hotplugged disk, start samples will +# be missed until the sampling code catches up. dStats['readRate'] = ( (eInfo[dName][1] - sInfo[dName][1]) / sampleInterval) dStats['writeRate'] = ( @@ -558,8 +560,10 @@ 'writeLatency': '0', 'flushLatency': '0'} -if sInfo is not None: +if sInfo is not None and dName in sInfo: # will be None if sampled during recovery +# in case of hotplugged disk, start samples will +# be missed until the sampling code catches up. try: dLatency = _avgLatencyCalc(sInfo[dName], eInfo[dName]) except (KeyError, TypeError): -- To view, visit http://gerrit.ovirt.org/30029 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If93572c21ecd47fe0bb2a6c6e13c0555034be881 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani from...@redhat.com ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[master]: sampling: do not produce stats for missing disks
oVirt Jenkins CI Server has posted comments on this change. Change subject: sampling: do not produce stats for missing disks .. Patch Set 1: Build Failed http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/10216/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/11001/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_virt_functional_tests_gerrit/1263/ : SUCCESS http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/11158/ : FAILURE -- 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: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Francesco Romani from...@redhat.com Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches