Bug 1281337 - VmStats - Error in vdsm.log for (_getRunningVmStats) --> KeyError: 'block.0.rd.bytes' from time to time
Summary: VmStats - Error in vdsm.log for (_getRunningVmStats) --> KeyError: 'block.0.r...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: vdsm
Classification: oVirt
Component: Core
Version: 4.17.11
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: ovirt-3.6.3
: ---
Assignee: Francesco Romani
QA Contact: Michael Burman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-12 10:43 UTC by Michael Burman
Modified: 2016-02-24 15:42 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-18 11:19:37 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-3.6.z+
rule-engine: planning_ack+
tjelinek: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)
Logs (753.16 KB, application/x-gzip)
2015-11-12 10:52 UTC, Michael Burman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 48493 0 master MERGED virt: stats: make disk_rate more robust 2016-01-24 07:25:00 UTC
oVirt gerrit 50593 0 master MERGED virt: stats: make compute_latency more robust 2016-01-24 07:25:06 UTC
oVirt gerrit 50594 0 master MERGED virt: stats: make _disk_iops_bytes more robust 2016-01-24 07:25:12 UTC
oVirt gerrit 50598 0 master MERGED tests: improve vmstats.disks coverage 2016-01-15 11:38:07 UTC
oVirt gerrit 51854 0 master MERGED tests: extend coverage for vmstats.disks() 2016-01-15 11:37:49 UTC
oVirt gerrit 53991 0 ovirt-3.6 MERGED vmstats: make nic_traffic private 2016-03-02 09:44:50 UTC
oVirt gerrit 53992 0 ovirt-3.6 MERGED vmstats: handle known-missing stats 2016-03-02 11:04:30 UTC
oVirt gerrit 53993 0 ovirt-3.6 MERGED tests: extend coverage for vmstats.disks() 2016-02-25 15:50:01 UTC
oVirt gerrit 53994 0 ovirt-3.6 MERGED tests: improve vmstats.disks coverage 2016-02-25 15:50:19 UTC
oVirt gerrit 53995 0 ovirt-3.6 MERGED virt: stats: make disk_rate more robust 2016-03-02 11:04:50 UTC
oVirt gerrit 53996 0 ovirt-3.6 MERGED virt: stats: make compute_latency more robust 2016-03-02 11:05:08 UTC
oVirt gerrit 53997 0 ovirt-3.6 MERGED virt: stats: make _disk_iops_bytes more robust 2016-03-02 11:05:20 UTC

Description Michael Burman 2015-11-12 10:43:57 UTC
Description of problem:
VmStats - Error in vdsm.log for (_getRunningVmStats) --> KeyError: 'block.0.rd.bytes' from time to time 

There is an error in vdsm log while trying to collect running VMs stats -

- Thread-19808::ERROR::2015-11-11 08:24:02,400::vm::1390::virt.vm::(_getRunningVmStats) vmId=`0d211260-2c0b-4626-a438-4fc8fc8c76a3`::Error fetching vm stats
Traceback (most recent call last):
  File "/usr/share/vdsm/virt/vm.py", line 1387, in _getRunningVmStats
    vm_sample.interval)
  File "/usr/share/vdsm/virt/vmstats.py", line 43, in produce
    disks(vm, stats, first_sample, last_sample, interval)
  File "/usr/share/vdsm/virt/vmstats.py", line 262, in disks
    interval))
  File "/usr/share/vdsm/virt/vmstats.py", line 292, in _disk_rate
    first_sample['block.%d.rd.bytes' % first_index])
KeyError: 'block.0.rd.bytes'

- I'm not sure what invoking this or what the reason for this error.
I have 1 running on this server for 8 days and this error appears in vdsm log from time to time.

Version-Release number of selected component (if applicable):
3.6.0.3-0.1.el6
vdsm-4.17.10.1-0.el7ev.noarch
libvirt-1.2.17-13.el7.x86_64
qemu-kvm-common-rhev-2.3.0-31.el7.x86_64

Comment 1 Michael Burman 2015-11-12 10:52:59 UTC
Created attachment 1093143 [details]
Logs

Comment 2 Francesco Romani 2015-11-12 11:04:09 UTC
(In reply to Michael Burman from comment #0)
> Description of problem:
> VmStats - Error in vdsm.log for (_getRunningVmStats) --> KeyError:
> 'block.0.rd.bytes' from time to time 
> 
> There is an error in vdsm log while trying to collect running VMs stats -
> 
> - Thread-19808::ERROR::2015-11-11
> 08:24:02,400::vm::1390::virt.vm::(_getRunningVmStats)
> vmId=`0d211260-2c0b-4626-a438-4fc8fc8c76a3`::Error fetching vm stats
> Traceback (most recent call last):
>   File "/usr/share/vdsm/virt/vm.py", line 1387, in _getRunningVmStats
>     vm_sample.interval)
>   File "/usr/share/vdsm/virt/vmstats.py", line 43, in produce
>     disks(vm, stats, first_sample, last_sample, interval)
>   File "/usr/share/vdsm/virt/vmstats.py", line 262, in disks
>     interval))
>   File "/usr/share/vdsm/virt/vmstats.py", line 292, in _disk_rate
>     first_sample['block.%d.rd.bytes' % first_index])
> KeyError: 'block.0.rd.bytes'
> 
> - I'm not sure what invoking this or what the reason for this error.
> I have 1 running on this server for 8 days and this error appears in vdsm
> log from time to time.
> 
> Version-Release number of selected component (if applicable):
> 3.6.0.3-0.1.el6
> vdsm-4.17.10.1-0.el7ev.noarch
> libvirt-1.2.17-13.el7.x86_64
> qemu-kvm-common-rhev-2.3.0-31.el7.x86_64

Looking at the logs, this happened when storage is unresponsive, which is a bigger problem per se. Nevertheless, VDSM should handle missing block stats. Working on a patch.

Comment 3 Francesco Romani 2015-11-12 11:04:43 UTC
This is about noise in the logs - doesn't affect customers flow at all

Comment 4 Francesco Romani 2015-11-16 16:33:16 UTC
patch posted -> POST

Comment 5 Red Hat Bugzilla Rules Engine 2015-12-09 16:21:27 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 6 Red Hat Bugzilla Rules Engine 2015-12-09 16:21:27 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 7 Red Hat Bugzilla Rules Engine 2016-01-28 12:25:18 UTC
Bug tickets that are moved to testing must have target release set to make sure tester knows what to test. Please set the correct target release before moving to ON_QA.

Comment 8 Red Hat Bugzilla Rules Engine 2016-01-28 12:38:52 UTC
Bug tickets that are moved to testing must have target release set to make sure tester knows what to test. Please set the correct target release before moving to ON_QA.

Comment 9 Red Hat Bugzilla Rules Engine 2016-01-28 13:01:43 UTC
Bug tickets that are moved to testing must have target release set to make sure tester knows what to test. Please set the correct target release before moving to ON_QA.

Comment 10 Michael Burman 2016-02-17 13:30:53 UTC
Verified on -
vdsm-4.17.21-0.el7ev.noarch
3.6.3.2-0.1.el6


Note You need to log in before you can comment on or make changes to this bug.