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

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

 



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@xxxxxxxxxx>
---
 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

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]