|
|
3e5111 |
From 28079e51b504ad2e5849d38dc994c41d319bf133 Mon Sep 17 00:00:00 2001
|
|
|
3e5111 |
Message-Id: <28079e51b504ad2e5849d38dc994c41d319bf133@dist-git>
|
|
|
3e5111 |
From: Jiri Denemark <jdenemar@redhat.com>
|
|
|
3e5111 |
Date: Thu, 6 Apr 2017 09:23:18 +0200
|
|
|
3e5111 |
Subject: [PATCH] qemu: Don't overwrite existing error in qemuMigrationReset
|
|
|
3e5111 |
|
|
|
3e5111 |
https://bugzilla.redhat.com/show_bug.cgi?id=1439130
|
|
|
3e5111 |
|
|
|
3e5111 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
3e5111 |
(cherry picked from commit 45b639bdbabe59056a6fc89ee4189fe695d6fae2)
|
|
|
3e5111 |
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
|
|
|
3e5111 |
---
|
|
|
3e5111 |
src/qemu/qemu_migration.c | 13 ++++++++++---
|
|
|
3e5111 |
1 file changed, 10 insertions(+), 3 deletions(-)
|
|
|
3e5111 |
|
|
|
3e5111 |
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
|
|
|
3e5111 |
index ae0ab368d..8c6d1385e 100644
|
|
|
3e5111 |
--- a/src/qemu/qemu_migration.c
|
|
|
3e5111 |
+++ b/src/qemu/qemu_migration.c
|
|
|
3e5111 |
@@ -5871,15 +5871,22 @@ qemuMigrationReset(virQEMUDriverPtr driver,
|
|
|
3e5111 |
qemuDomainAsyncJob job)
|
|
|
3e5111 |
{
|
|
|
3e5111 |
qemuMonitorMigrationCaps cap;
|
|
|
3e5111 |
+ virErrorPtr err = virSaveLastError();
|
|
|
3e5111 |
|
|
|
3e5111 |
if (!virDomainObjIsActive(vm))
|
|
|
3e5111 |
- return;
|
|
|
3e5111 |
+ goto cleanup;
|
|
|
3e5111 |
|
|
|
3e5111 |
if (qemuMigrationResetTLS(driver, vm, job) < 0)
|
|
|
3e5111 |
- return;
|
|
|
3e5111 |
+ goto cleanup;
|
|
|
3e5111 |
|
|
|
3e5111 |
for (cap = 0; cap < QEMU_MONITOR_MIGRATION_CAPS_LAST; cap++) {
|
|
|
3e5111 |
if (qemuMigrationSetOption(driver, vm, cap, false, job) < 0)
|
|
|
3e5111 |
- return;
|
|
|
3e5111 |
+ goto cleanup;
|
|
|
3e5111 |
+ }
|
|
|
3e5111 |
+
|
|
|
3e5111 |
+ cleanup:
|
|
|
3e5111 |
+ if (err) {
|
|
|
3e5111 |
+ virSetError(err);
|
|
|
3e5111 |
+ virFreeError(err);
|
|
|
3e5111 |
}
|
|
|
3e5111 |
}
|
|
|
3e5111 |
--
|
|
|
3e5111 |
2.12.2
|
|
|
3e5111 |
|