RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1087670 - Error info is not clear/useful and hit AttributeError in debug mode when try to add new device "Filesystem" into guest
Summary: Error info is not clear/useful and hit AttributeError in debug mode when try ...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: virt-manager
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Giuseppe Scrivano
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-15 02:33 UTC by zhengqin
Modified: 2014-04-18 08:02 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-18 08:02:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zhengqin 2014-04-15 02:33:26 UTC
Description of problem:


Version-Release number of selected component:
virt-manager-0.10.0-20.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. Start virt-manager with --debug, and prepare a shutoff rhel guest.
#virt-manager --debug

2. Open the guest's detail page, and click "Add Hardware" -> "Filesystem", and Error "Not supported for this hypervisor/libvirt combination" shows.

3. Click "Finish" button




Actual result:
1. Debug mode hit AttributeError:
--------------------------------------
2014-04-14 05:53:00,511 (addhardware:164): Showing addhw
2014-04-14 05:53:05,816 (error:81): error dialog message:
summary=Unable to add device: 'NoneType' object has no attribute 'virtual_device_type'
details=Unable to add device: 'NoneType' object has no attribute 'virtual_device_type'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 1032, in finish
    failure, errinfo = self.add_device()
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 1308, in add_device
    ret = self.setup_device()
  File "/usr/share/virt-manager/virtManager/addhardware.py", line 1301, in setup_device
    if (self._dev.virtual_device_type == self._dev.VIRTUAL_DEV_DISK and
AttributeError: 'NoneType' object has no attribute 'virtual_device_type'
--------------------------------------

2. Error info for virt-manager will show:
Unable to add device: 'NoneType' object has no attribue 'virtual_device_type'


Expected results:
1. No error will be shown in debug mode
2. It is better to disable the "Finish" button since the error shows at step 2 is good enough, and this error from virt-manager is not clear and not useful.


Additional info:
1. This issue also occurs on latest rhel6u5.

Comment 1 Giuseppe Scrivano 2014-04-18 08:02:00 UTC
fixed upstream by:

commit 06e480c8474d0c0ecce66804c473f675a47afe68
Author: Giuseppe Scrivano <gscrivan>
Date:   Thu Apr 17 11:25:01 2014 +0200

    virt-manager, addhardware: disable "Finish" with unsupported devs
    
    Disabled the "Finish" button in the "Add Hardware" window when the
    specified dev is not supported by the HV.
    
    Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1087670
    
    Signed-off-by: Giuseppe Scrivano <gscrivan>


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