Bug 1611062
Summary: | "virsh vcpucount --guest" fails after hotunplug a vcpu with intermediate order by "setvcpu" | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Fangge Jin <fjin> |
Component: | qemu-guest-agent | Assignee: | Marc-Andre Lureau <marcandre.lureau> |
Status: | CLOSED ERRATA | QA Contact: | FuXiangChun <xfu> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 7.6 | CC: | chayang, hhuang, jiyan, juzhang, pkrempa |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | qemu-guest-agent-2.12.0-3.el7 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-08-06 12:51:26 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: | 1651787 |
Description
Fangge Jin
2018-08-02 03:18:27 UTC
I'm in favour of Laszlo's opinion [1] that --guest variant shouldn't be used when real cpu-hotplug is in use so libvirt shouldn't allow simultaneous of fake/real hcpu hotplug. Given there were no objections from CCed libvirt folks, reassigning BZ to libvirt. 1) https://www.mail-archive.com/qemu-devel@nongnu.org/msg559421.html I don't see a reason to disallow it since it is technically possible. Additionally at certain points of the VM lifecycle we are unable to know whether the user wishes to do either approach. Also the boot cpu(s) which are non-unpluggable can't be disabled in any other way. Note that we query the data from qemu first and modify it for the desired vcpu count so if qemu is reporting wrong data in the get API it should be fixed, especially if the data is not accepted back via the set API. There are two kind of APIs: 1) old one where we magically disable some vcpus to satisfy users request for a target vcpu count 2) new one where user is able to select which vcpus are online We also have an API to provide the guest topology from the get command to the user so if the data is misleading users may complain. Looking at the conversation in the linked thread, the data is invalid and we even do have a check for it: 1630 /* This shouldn't happen, but we can't trust the guest agent */ 1631 if (!cpuinfo[i].online && !cpuinfo[i].offlinable) { 1632 virReportError(VIR_ERR_INTERNAL_ERROR, "%s", 1633 _("Invalid data provided by guest agent")); 1634 return -1; 1635 } I don't see a compelling reason to cripple this feature and libvirt is correctly able to handle sparse output of the get API. This seems plainly like a bug in qemu-ga. I've also replied to the e-mail trhead. Back to the guest-agent component to fix the output. Igor wrote a patch, we can backport b4bf912a6c19449e68af7b4173a8c6da21904d99 "qga: ignore non present cpus when handling qmp_guest_get_vcpus()" Fix included in qemu-guest-agent-2.12.0-3.el7 verified bug with qemu-guest-agent-2.12.0-3.el7. It is expected result. so move this bug to verified. # virsh vcpucount rhel7 maximum config 240 maximum live 240 current config 6 current live 6 # virsh setvcpu rhel7 4 --disable # virsh vcpucount rhel7 --guest 4 # virsh setvcpu rhel7 5 --disable # virsh vcpucount rhel7 --guest 4 # virsh vcpucount rhel7 maximum config 240 maximum live 240 current config 6 current live 4 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, 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-2019:2124 |