render / rpms / libvirt

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