Bug 1869046

Summary: Click on CPUs, Error refreshing hardware page: attrib must be dict, not NoneType
Product: [Fedora] Fedora Reporter: Chris Murphy <bugzilla>
Component: virt-managerAssignee: Cole Robinson <crobinso>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: berrange, crobinso, ego.cordatus, philip.wyett
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-manager-3.1.0-1.fc33 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-03 00:56:25 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:
Attachments:
Description Flags
virsh dumpxml uefivm none

Description Chris Murphy 2020-08-15 21:20:02 UTC
Description of problem:

Brand new VM, click on CPUs and I consistently get an error message.


Version-Release number of selected component (if applicable):
virt-manager-2.2.1-3.fc32.noarch

qemu-kvm-5.0.0-5.fc33.x86_64
libvirt-daemon-6.6.0-1.fc33.x86_64
edk2-ovmf-20200201stable-5.fc33.noarch
xorg-x11-drv-qxl-0.1.5-16.fc33.x86_64
kernel-5.8.0-1.fc33.x86_64


How reproducible:
Always


Steps to Reproduce:
1. Clean install Fedora-Workstation-Live-x86_64-33-20200813.n.2.iso
2. dnf group install virtualization
3. Create a new UEFI or BIOS VM using virt-manager
4. Click on show virtual machine details (lightbulb icon)
5. Click on CPUs

Actual results:

Error refreshing hardware page: attrib must be dict, not NoneType

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/details/details.py", line 1025, in hw_selected
    self.refresh_config_cpu()
  File "/usr/share/virt-manager/virtManager/details/details.py", line 2223, in refresh_config_cpu
    if not self._cpu_secure_is_available():
  File "/usr/share/virt-manager/virtManager/details/details.py", line 2167, in _cpu_secure_is_available
    features = domcaps.get_cpu_security_features()
  File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 308, in get_cpu_security_features
    cpu = self._get_expanded_cpu(m)
  File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 273, in _get_expanded_cpu
    cpuXML = self._convert_mode_to_cpu(mode.get_xml())
  File "/usr/share/virt-manager/virtinst/domcapabilities.py", line 267, in _convert_mode_to_cpu
    root.attrib = None
TypeError: attrib must be dict, not NoneType
[chris@fmac ~]$ 



Expected results:


Should not get an error.


Additional info:



If I connect remotely from Fedora 32, also with virt-manager-2.2.1-3.fc32.noarch, the error doesn't happen. Must actually be a libvirt bug but I'm not sure what's really complaining.

Comment 1 Chris Murphy 2020-08-15 21:26:37 UTC
Created attachment 1711503 [details]
virsh dumpxml uefivm

Comment 2 Cole Robinson 2020-08-18 17:51:48 UTC
Thanks for the report. Fixed upstream now:

commit bea401a2cf084a28588663391c61a9b3d792334e
Author: Cole Robinson <crobinso>
Date:   Tue Aug 18 13:49:16 2020 -0400

    domcapabilities: Fix backtrace on python3.9

Comment 3 Cole Robinson 2020-09-09 14:23:08 UTC
*** Bug 1877231 has been marked as a duplicate of this bug. ***

Comment 4 Fedora Update System 2020-09-15 21:52:21 UTC
FEDORA-2020-656e86b662 has been submitted as an update to Fedora 33. https://bodhi.fedoraproject.org/updates/FEDORA-2020-656e86b662

Comment 5 Fedora Update System 2020-09-16 18:57:41 UTC
FEDORA-2020-656e86b662 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-656e86b662`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-656e86b662

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2020-10-01 01:20:43 UTC
FEDORA-2020-c30055ffe4 has been pushed to the Fedora 33 testing repository.
In short time you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --advisory=FEDORA-2020-c30055ffe4`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-c30055ffe4

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2020-10-03 00:56:25 UTC
FEDORA-2020-c30055ffe4 has been pushed to the Fedora 33 stable repository.
If problem still persists, please make note of it in this bug report.