[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH v2] Don't throw away QEMU startup errors when migrating.



The attached patch removes the error message squashing that can take
place in the qemu driver when launching a new VM via restore or migrate.

Thanks,
Cole
commit cd93c8247c9df7e98b3f2b092c18e4be45d46059
Author: Cole Robinson <crobinso redhat com>
Date:   Thu Apr 23 15:01:29 2009 -0400

    Don't throw away StartVM errors when migrating/restoring in qemu driver.

diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 5c8a883..a44861d 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -225,7 +225,7 @@ qemudAutostartConfigs(struct qemud_driver *driver) {
                 virErrorPtr err = virGetLastError();
                 VIR_ERROR(_("Failed to autostart VM '%s': %s\n"),
                           vm->def->name,
-                          err ? err->message : NULL);
+                          err ? err->message : "");
             } else {
                 virDomainEventPtr event =
                     virDomainEventNewFromObj(vm,
@@ -3283,8 +3283,6 @@ static int qemudDomainRestore(virConnectPtr conn,
     close(fd);
     fd = -1;
     if (ret < 0) {
-        qemudReportError(conn, NULL, NULL, VIR_ERR_OPERATION_FAILED,
-                         "%s", _("failed to start VM"));
         if (!vm->persistent) {
             virDomainRemoveInactive(&driver->domains,
                                     vm);
@@ -4780,8 +4778,6 @@ qemudDomainMigratePrepare2 (virConnectPtr dconn,
      */
     snprintf (migrateFrom, sizeof (migrateFrom), "tcp:0.0.0.0:%d", this_port);
     if (qemudStartVMDaemon (dconn, driver, vm, migrateFrom, -1) < 0) {
-        qemudReportError (dconn, NULL, NULL, VIR_ERR_OPERATION_FAILED,
-                          "%s", _("failed to start listening VM"));
         if (!vm->persistent) {
             virDomainRemoveInactive(&driver->domains, vm);
             vm = NULL;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]