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