Dan Kenigsberg has submitted this change and it was merged.
Change subject: vmstats: take in account missing bulk stats fields ......................................................................
vmstats: take in account missing bulk stats fields
One of the cornerstones of how libvirt's bulk stats work is accumulate as much as we can, raise errors only on the most critical paths.
This was well understood for actual sampled data, e.g. disk traffic, network traffic, but was unexptected for static (meta) data, like interface/block name.
We discovered in the SR-IOV case that this can indeed be true, so we add defensive code for this scenario, taking into account that also the static data may be absent. This also means that the '<group>.count' attribute (e.g. net.count, block.count) must be considered an upper bound, not an exact amount.
It is worth checking if the observed behaviour it is actually OK inside libvirt; anyway, this added defense fits nicely in the bulk stats consuming code.
Change-Id: I5a0eae867305dead8a96a23801ff2429605522ea Signed-off-by: Francesco Romani fromani@redhat.com Bug-Url: https://bugzilla.redhat.com/1273837 Reviewed-on: https://gerrit.ovirt.org/47760 Reviewed-by: Milan Zamazal mzamazal@redhat.com Continuous-Integration: Jenkins CI Reviewed-by: Dan Kenigsberg danken@redhat.com --- M tests/vmStatsTests.py M vdsm/virt/vmstats.py 2 files changed, 80 insertions(+), 1 deletion(-)
Approvals: Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved Francesco Romani: Verified Milan Zamazal: Looks good to me, but someone else must approve