Bug 2027462

Summary: [virt-manager] Can't open/edit vm details when VM has attached hostdev mdev
Product: Red Hat Enterprise Linux 9 Reporter: smitterl
Component: virt-managerAssignee: Virtualization Maintenance <virt-maint>
virt-manager sub component: GUI QA Contact: Virtualization Bugs <virt-bugs>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: urgent    
Priority: unspecified CC: hongzliu, jjongsma, juzhou, thuth, tyan, tzheng, virt-bugs, virt-maint, virt-qe-z
Version: 9.0   
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2026987 Environment:
Last Closed: 2021-12-09 20:41:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1995131    

Description smitterl 2021-11-29 17:47:56 UTC
+++ This bug was initially created as a clone of Bug #2026987 +++

Description of problem:
If a VM has an mdev attached, the details can't be reviewed or edited.


Version-Release number of selected component (if applicable):
virt-manager-3.2.0-1.el8.noarch

How reproducible:
100%


Steps to Reproduce:
0. Have VM with attached MDEV on $remote_server
1. Connect to $remote_server
2. Open VM details

Actual results:
Error launching details: Argument 1 does not allow None as a value

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/vmwindow.py", line 40, in get_instance
    cls._instances[key] = vmmVMWindow(vm)
  File "/usr/share/virt-manager/virtManager/vmwindow.py", line 158, in __init__
    self.activate_default_page()
  File "/usr/share/virt-manager/virtManager/vmwindow.py", line 459, in activate_default_page
    self.activate_default_console_page()
  File "/usr/share/virt-manager/virtManager/vmwindow.py", line 451, in activate_default_console_page
    self._console.vmwindow_activate_default_console_page()
  File "/usr/share/virt-manager/virtManager/details/console.py", line 976, in vmwindow_activate_default_console_page
    return self._activate_default_console_page()
  File "/usr/share/virt-manager/virtManager/details/console.py", line 931, in _activate_default_console_page
    self._toggle_first_console_menu_item()
  File "/usr/share/virt-manager/virtManager/details/console.py", line 909, in _toggle_first_console_menu_item
    self._populate_console_list_menu()
  File "/usr/share/virt-manager/virtManager/details/console.py", line 904, in _populate_console_list_menu
    self._console_list_menu_toggled)
  File "/usr/share/virt-manager/virtManager/details/console.py", line 281, in rebuild_menu
    item.set_sensitive(sensitive)
TypeError: Argument 1 does not allow None as a value

Expected results:
Details can be opened and edited.


Additional info:
1. Any installation with an additional MDEV host dev will end in the same error although the machine is created correctly.

--- Additional comment from  on 2021-11-26 18:34:12 UTC ---

Comment 1 Jonathon Jongsma 2021-12-07 19:53:34 UTC
Are you sure that you were able to reproduce this on rhel9? I believe the bug is only exhibited when using an older version of the python gobject bindings. I think that rhel 9 has new enough bindings so that the issue doesn't occur on rhel9. 

Personally, I was not able to reproduce it on rhel9.

Comment 2 Hongzhou Liu 2021-12-08 02:55:02 UTC
This bug cannot reproduce on rhel9 with
  libvirt-7.10.0-1.el9.x86_64
  qemu-kvm-6.1.0-8.el9.x86_64
  virt-manager-3.2.0-11.el9.noarch
  kernel-5.14.0-7.el9.x86_64


Steps to Reproduce:
1. Prepare a VM 
2. Open VM details and check the virtual device detail 
3. Click VirtIO

expected result: show the detail of VirtIO
actual result: show the detail of VirtIO
4. use virt-manager to created a VM, customize a virtual disk before install.

expected result: virtual disk can be customized successfully
actual result: virtual disk can be customized successfully

This problem only can be reproduced on RHEL8.6, I think this not architecture-specific because I can reproduce this on x86_64.

Comment 3 Jonathon Jongsma 2021-12-09 20:41:38 UTC
Closing this due to comment #2. I believe the bug doesn't exist with the packages that are in rhel9. Please re-open if you actually can reproduce on rhel9.

Comment 4 smitterl 2021-12-13 17:58:58 UTC
I don't remember, sorry for any churn this might have caused.