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 1081373 - "Remove Hardware" context memu displayed for none hardware item on guest detail page and could not work.
Summary: "Remove Hardware" context memu displayed for none hardware item on guest deta...
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: 1081374
TreeView+ depends on / blocked
 
Reported: 2014-03-27 06:14 UTC by zhengqin
Modified: 2014-03-27 12:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1081374 (view as bug list)
Environment:
Last Closed: 2014-03-27 12:52:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description zhengqin 2014-03-27 06:14:20 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.

2. Open a guest's detail page.

3. Right-click on "Overview" item, and the context memu pops up with options "Add Hardware" and "Remove Hardware".

4. Choose option "Remove Hardware".

Actual result:
1. Debug error will pop up "AttributeError: str object has no attribute 'virtual_device_type'"
----------------------------------------------------------------
2014-03-27 13:37:56,618 (details:576): Showing VM details: <vmmDomain object at 0x2764d70 (virtManager+domain+vmmDomain at 0x1b7fae0)>
2014-03-27 13:38:01,480 (cliutils:87): Uncaught exception:
Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1532, in remove_xml_dev
    devtype = info.virtual_device_type
AttributeError: 'str' object has no attribute 'virtual_device_type'

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details.py", line 1532, in remove_xml_dev
    devtype = info.virtual_device_type
AttributeError: 'str' object has no attribute 'virtual_device_type'
----------------------------------------------------------------
2. There is no response when choosing "Remove Hardware"
3. There is no "Remove" button at right-lower window for Overview page.


Expected results:
1. "Remove Hardware" option should be removed on context memu since "Overview" is not a hardware.





Additional info:
1. This issue also occurs on RHEL6.
2. This issue also occurs for "Performance", "Processor", "Memory" and "Boot Options"
3. Could not remove Mouse if only one mouse device exists.

Comment 1 Giuseppe Scrivano 2014-03-27 12:52:09 UTC
closed upstream with:

commit 37eecb215d137ffb6e98f36adfa37f96220d7287
Author: Giuseppe Scrivano <gscrivan>
Date:   Thu Mar 27 12:40:42 2014 +0100

    virtManager: hide "Remove Hardware" for non-devices
    
    The menu item "Remove Hardware" in the Overview window is valid only
    when a hardware device is selected, hide it in any other case.
    
    Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1081373
    
    Signed-off-by: Giuseppe Scrivano <gscrivan>


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