]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: nicer error message on failed graceful destroy
authorEric Blake <eblake@redhat.com>
Wed, 22 Feb 2012 18:41:17 +0000 (11:41 -0700)
committerEric Blake <eblake@redhat.com>
Thu, 23 Feb 2012 15:47:06 +0000 (08:47 -0700)
https://bugzilla.redhat.com/show_bug.cgi?id=795656 mentions
that a graceful destroy request can time out, meaning that the
error message is user-visible and should be more appropriate
than just internal error.

* src/qemu/qemu_driver.c (qemuDomainDestroyFlags): Swap error type.

src/qemu/qemu_driver.c

index 63a070311ca98e22fb81ef7421ed05e4f78fd886..d3cf9ac5f69dff352a6329e49cbf94f06372c721 100644 (file)
@@ -1792,7 +1792,7 @@ qemuDomainDestroyFlags(virDomainPtr dom,
      */
     if (flags & VIR_DOMAIN_DESTROY_GRACEFUL) {
         if (qemuProcessKill(driver, vm, 0) < 0) {
-            qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+            qemuReportError(VIR_ERR_OPERATION_FAILED, "%s",
                             _("failed to kill qemu process with SIGTERM"));
             goto cleanup;
         }