Bug 2004429
Summary: | Can't get vcpuinfo when the guest is shutoff | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | Meina Li <meili> |
Component: | libvirt | Assignee: | Peter Krempa <pkrempa> |
libvirt sub component: | General | QA Contact: | Luyao Huang <lhuang> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | unspecified | ||
Priority: | high | CC: | jdenemar, lhuang, pkrempa, virt-maint, weizhan, xuzhang |
Version: | 9.0 | Keywords: | Automation, Regression, Triaged |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | libvirt-7.7.0-3.el9 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-05-17 12:45:32 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: |
Description
Meina Li
2021-09-15 09:41:41 UTC
Can't reproduce in the last version: libvirt-7.6.0-2.el9.x86_64 I've traced this to one of cleanup refactors of XML parsing in commit bd1f40fe7d4 Fixed upstream: commit eb2e317c65fdbbf45117d5f423da12870842cc59 Author: Peter Krempa <pkrempa> Date: Wed Sep 15 15:13:24 2021 +0200 virshDomainGetVcpuBitmap: Refactor cleanup Rename the temp variable that is being returned and use automatic pointer clearing for it. Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Pavel Hrdina <phrdina> Reviewed-by: Jiri Denemark <jdenemar> Reviewed-by: Jonathon Jongsma <jjongsma> commit 59e74c319384b766a50669c6248222da0cf10fd0 Author: Peter Krempa <pkrempa> Date: Wed Sep 15 15:09:00 2021 +0200 virshDomainGetVcpuBitmap: Return bitmap when taking the fallback path In case the specific VCPU states are not present in the XML we were taking a fallback code path just noting that all cpus of the VM are enabled. This was broken by a mistake in a recent refactor where a 'goto cleanup' was mistakenly replaced by a 'return NULL'. This broke reporting of cpus and also caused a memory leak. Return the fallback cpu map. Fixes: bd1f40fe7d4 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2004429 Signed-off-by: Peter Krempa <pkrempa> Reviewed-by: Pavel Hrdina <phrdina> Reviewed-by: Jiri Denemark <jdenemar> Reviewed-by: Jonathon Jongsma <jjongsma> Test passed on libvirt-7.8.0-1.el9.x86_64 Verify this bug with libvirt-7.8.0-1.el9.x86_64: # virsh domstate vm1 shut off # virsh setvcpus vm1 1 --config # virsh vcpucount vm1 maximum config 2 current config 1 # virsh vcpuinfo vm1 VCPU: 0 CPU: N/A State: N/A CPU time N/A CPU Affinity: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (new packages: libvirt), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2022:2390 |