Bug 791245 - [ovirt] [vdsm] AttributeError when starting VM with floppy attached on statistics sampling
Summary: [ovirt] [vdsm] AttributeError when starting VM with floppy attached on statis...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Igor Lvovsky
QA Contact: Haim
URL:
Whiteboard: virt
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-16 15:23 UTC by Haim
Modified: 2014-01-13 00:51 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-09 12:48:24 UTC
oVirt Team: ---


Attachments (Terms of Use)

Description Haim 2012-02-16 15:23:59 UTC
Description of problem:

- start new vm with floppy attached
- query logs 

read-221::ERROR::2012-02-16 17:12:43,462::utils::399::vm.Vm::(collect) vmId=`2aed27de-bc3f-40cb-85b3-1839f8e38279`::Stats function failed: <AdvancedStatsFunction _sampleDiskL
atency at 0x207a7a0>
Traceback (most recent call last):
  File "/usr/share/vdsm/utils.py", line 395, in collect
    statsFunction()
  File "/usr/share/vdsm/utils.py", line 272, in __call__
    retValue = self._function(*args, **kwargs)
  File "/usr/share/vdsm/libvirtvm.py", line 158, in _sampleDiskLatency
    diskLatency[vmDrive.name] = stats[vmDrive.alias]
AttributeError: 'Drive' object has no attribute 'alias'


Inside the code, vdsm catch the exception from type KeyError, but not AttributeError.  

 156         for vmDrive in self._vm._devices[vm.DISK_DEVICES]:                                                                                                                 
 157             try:                                                                                                                                                           
 158                 diskLatency[vmDrive.name] = stats[vmDrive.alias]                                                                                                           
 159             except KeyError, AttributeError:                                                                                                                               
 160                 diskLatency[vmDrive.name] = {'rd_op':0, 'wr_op':0, 'flush_op':0,                                                                                           
 161                                              'rd_total_time_ns':0,                                                                                                         
 162                                              'wr_total_time_ns':0,                                                                                                         
 163                                              'flush_total_time_ns':0}                                                                                                      
 164                 self._log.warn("Disk %s latency not available", vmDrive.name) 

last commit in git: b183748699b00fc1396059e946d5772eaa471e26

Comment 1 Haim 2012-05-08 14:49:19 UTC
need to check on downstream.

Comment 2 Omri Hochman 2012-05-09 08:52:30 UTC
(In reply to comment #1)
> need to check on downstream.

Not reproducible 3.1 downstream 
build (si3), vdsm-4.9.6-8.


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