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

[libvirt] [PATCH 3/6] qemu: migrate: Disable errors in MigrateFinish if MigratePerform failed.



This way we won't squash the original error report in MigratePerform as
done for P2P and Tunneled migration.

Signed-off-by: Cole Robinson <crobinso redhat com>
---
 src/qemu/qemu_driver.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5463951..91fdd3b 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6753,6 +6753,12 @@ qemudDomainMigrateFinish2 (virConnectPtr dconn,
     virDomainEventPtr event = NULL;
     int newVM = 1;
 
+    /* Migration failed. Disable error reporting so we don't squash the
+     * original error report */
+    if (retcode != 0) {
+        virDisableErrors();
+    }
+
     qemuDriverLock(driver);
     vm = virDomainFindByName(&driver->domains, dname);
     if (!vm) {
@@ -6823,6 +6829,7 @@ qemudDomainMigrateFinish2 (virConnectPtr dconn,
     }
 
 cleanup:
+    virEnableErrors();
     if (vm)
         virDomainObjUnlock(vm);
     if (event)
-- 
1.6.5.1


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