ed8822
From 338a37710209d5fc35e326925318f087d572ba25 Mon Sep 17 00:00:00 2001
ed8822
Message-Id: <338a37710209d5fc35e326925318f087d572ba25@dist-git>
ed8822
From: Jiri Denemark <jdenemar@redhat.com>
ed8822
Date: Tue, 11 Sep 2018 19:26:07 +0200
ed8822
Subject: [PATCH] qemu: Report more appropriate running reasons
ed8822
MIME-Version: 1.0
ed8822
Content-Type: text/plain; charset=UTF-8
ed8822
Content-Transfer-Encoding: 8bit
ed8822
ed8822
This patch replaces some rather generic VIR_DOMAIN_RUNNING_UNPAUSED
ed8822
reasons when changing domain state to running with more specific ones.
ed8822
All of them are done when libvirtd reconnects to an existing domain
ed8822
after being restarted and sees an unfinished migration or save.
ed8822
ed8822
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
ed8822
Reviewed-by: John Ferlan <jferlan@redhat.com>
ed8822
(cherry picked from commit 54b5b0ac3945ad5417b67bec8443cf6e7b3d482b)
ed8822
ed8822
https://bugzilla.redhat.com/show_bug.cgi?id=1634758
ed8822
https://bugzilla.redhat.com/show_bug.cgi?id=1634759
ed8822
ed8822
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
ed8822
Reviewed-by: Ján Tomko <jtomko@redhat.com>
ed8822
---
ed8822
 src/qemu/qemu_process.c | 6 +++---
ed8822
 1 file changed, 3 insertions(+), 3 deletions(-)
ed8822
ed8822
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
ed8822
index a4b1f97df5..26979faa72 100644
ed8822
--- a/src/qemu/qemu_process.c
ed8822
+++ b/src/qemu/qemu_process.c
ed8822
@@ -3247,7 +3247,7 @@ qemuProcessRecoverMigrationIn(virQEMUDriverPtr driver,
ed8822
         VIR_DEBUG("Incoming migration finished, resuming domain %s",
ed8822
                   vm->def->name);
ed8822
         if (qemuProcessStartCPUs(driver, vm,
ed8822
-                                 VIR_DOMAIN_RUNNING_UNPAUSED,
ed8822
+                                 VIR_DOMAIN_RUNNING_MIGRATED,
ed8822
                                  QEMU_ASYNC_JOB_NONE) < 0) {
ed8822
             VIR_WARN("Could not resume domain %s", vm->def->name);
ed8822
         }
ed8822
@@ -3354,7 +3354,7 @@ qemuProcessRecoverMigrationOut(virQEMUDriverPtr driver,
ed8822
             (reason == VIR_DOMAIN_PAUSED_MIGRATION ||
ed8822
              reason == VIR_DOMAIN_PAUSED_UNKNOWN)) {
ed8822
             if (qemuProcessStartCPUs(driver, vm,
ed8822
-                                     VIR_DOMAIN_RUNNING_UNPAUSED,
ed8822
+                                     VIR_DOMAIN_RUNNING_MIGRATION_CANCELED,
ed8822
                                      QEMU_ASYNC_JOB_NONE) < 0) {
ed8822
                 VIR_WARN("Could not resume domain %s", vm->def->name);
ed8822
             }
ed8822
@@ -3412,7 +3412,7 @@ qemuProcessRecoverJob(virQEMUDriverPtr driver,
ed8822
                 reason == VIR_DOMAIN_PAUSED_MIGRATION)) ||
ed8822
               reason == VIR_DOMAIN_PAUSED_UNKNOWN)) {
ed8822
              if (qemuProcessStartCPUs(driver, vm,
ed8822
-                                      VIR_DOMAIN_RUNNING_UNPAUSED,
ed8822
+                                      VIR_DOMAIN_RUNNING_SAVE_CANCELED,
ed8822
                                       QEMU_ASYNC_JOB_NONE) < 0) {
ed8822
                  VIR_WARN("Could not resume domain '%s' after migration to file",
ed8822
                           vm->def->name);
ed8822
-- 
ed8822
2.19.1
ed8822