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