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