render / rpms / libvirt

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