]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Don't report spurious errors from vCPU tid validation on hotunplug timeout
authorShaleen Bathla <shaleen.bathla@oracle.com>
Fri, 11 Nov 2022 09:24:38 +0000 (14:54 +0530)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 5 Dec 2022 10:15:08 +0000 (11:15 +0100)
commit465f1b9d4cc3f3fee5de8ff5217c7a8a056d3419
treed733c28d359fe7c954898de1e160a0e31c246146
parent713578d77fec3a85eebe9aeaeec1c6be72e93e6a
qemu: Don't report spurious errors from vCPU tid validation on hotunplug timeout

Use of qemuDomainValidateVcpuInfo in the helpers for hotplug and unplug
of vCPUs can lead to spurious errors reported such as:

  internal error: qemu didn't report thread id for vcpu 'XX'"

The reason for this is that qemuDomainValidateVcpuInfo validates the
state of all vCPUs against the expected state of vCPUs. If an unplug
operation completed before libvirt was unable to process it yet the
expected state could not reflect the current state.

To avoid spurious errors the qemuDomainHotplugAddVcpu and
qemuDomainRemoveVcpu functions are modified to do localized validation
only for the vCPUs they actually modify.

We also now ensure that the cgroups are modified before bailing out on
error for any vCPUs which passed validation.

Additionally in order for qemuDomainRemoveVcpuAlias to be able to find
the unplugged vCPU we must ensure that qemuDomainRefreshVcpuInfo does
not clear out the alias in case when the vCPU is no longer reported by
qemu.

Co-authored-by: Partha Satapathy <partha.satapathy@oracle.com>
Signed-off-by: Shaleen Bathla <shaleen.bathla@oracle.com>
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_domain.c
src/qemu/qemu_hotplug.c