]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu_hotplug.c: user-friendlier setvcpus timeout error message
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Fri, 18 Oct 2019 18:36:34 +0000 (15:36 -0300)
committerCole Robinson <crobinso@redhat.com>
Wed, 13 Nov 2019 20:03:40 +0000 (15:03 -0500)
The current 'setvcpus' timeout message requires a deeper
understanding of QEMU/Libvirt internals to proper react to it.
One who knows how setvcpus unplug work (it is an asynchronous
operation between QEMU and guest that Libvirt can't know for
sure if it failed, unless an explicit error happened during the
timeout period) will read the message and not assume a failed
operation. But the regular user, most often than not, will read
it and believe that the unplug operation failed.

This leads to situations where the user isn't exactly relieved
when accessing the guest and seeing that the unplug operation
worked. Instead, the user feel mislead by the timeout message
setvcpus threw.

Changing the timeout message to let the user know that the
unplug status is not known, and manual inspection in the guest
is required, is not a silver bullet. But it gives a more
realistic expectation of what happened, as best as we can tell
from Libvirt side anyways.

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/qemu/qemu_hotplug.c

index 522755ae4b0187ea52072a8b128e9dd5aad29663..7632ad060951907fe9220582f08ec2af0c20e859 100644 (file)
@@ -5989,8 +5989,9 @@ qemuDomainHotplugDelVcpu(virQEMUDriverPtr driver,
 
     if ((rc = qemuDomainWaitForDeviceRemoval(vm)) <= 0) {
         if (rc == 0)
-            virReportError(VIR_ERR_OPERATION_FAILED, "%s",
-                           _("vcpu unplug request timed out"));
+            virReportError(VIR_ERR_OPERATION_TIMEOUT, "%s",
+                           _("vcpu unplug request timed out. Unplug result "
+                             "must be manually inspected in the domain"));
 
         goto cleanup;
     }