mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
qemu: Don't update count of vCPUs if hot-unplug has failed
After live change of cpu counts, the number of processor threads is verified. This patch makes use of this approach to check if qemu ignored the request for cpu hot-unplug and report an appropriate message.
This commit is contained in:
parent
dc350eabb3
commit
761fc48136
@ -3697,6 +3697,15 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* check if hotplug has failed */
|
||||
if (vcpus < oldvcpus && ncpupids == oldvcpus) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
|
||||
_("qemu didn't unplug the vCPUs properly"));
|
||||
vcpus = oldvcpus;
|
||||
ret = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (ncpupids != vcpus) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("got wrong number of vCPU pids from QEMU monitor. "
|
||||
|
Loading…
Reference in New Issue
Block a user