Milan Zamazal has uploaded a new change for review.

Change subject: virt: Report paused VM status in post-copy
......................................................................

virt: Report paused VM status in post-copy

When a migration enters a post-copy mode, it gets paused.  While we are
still in migration source status from the point of view of Vdsm, Engine
wants to know the actual libvirt status, i.e. paused.  Thus we report
the VM as paused when it is in post-copy mode.

Change-Id: I4738a7519f8d1af2ee30bfe766f3407853263cf2
Signed-off-by: Milan Zamazal <mzama...@redhat.com>
Bug-Url: https://bugzilla.redhat.com/1354343
---
M vdsm/virt/vm.py
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/47/64147/7

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 2fb498a..195453f 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -1347,6 +1347,11 @@
                 return self._guestEvent
             return vmstatus.UP
 
+        if self.lastStatus == vmstatus.MIGRATION_SOURCE and self.in_post_copy:
+            # We are still in MIGRATION_SOURCE state, but Engine developers
+            # prefer to get the actual libvirt state, which is PAUSED during
+            # post-copy migration (until it switches to DOWN).
+            return vmstatus.PAUSED
         statuses = (vmstatus.SAVING_STATE, vmstatus.RESTORING_STATE,
                     vmstatus.MIGRATION_SOURCE, vmstatus.MIGRATION_DESTINATION,
                     vmstatus.PAUSED, vmstatus.DOWN)


-- 
To view, visit https://gerrit.ovirt.org/64147
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4738a7519f8d1af2ee30bfe766f3407853263cf2
Gerrit-PatchSet: 7
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Milan Zamazal <mzama...@redhat.com>
Gerrit-Reviewer: Arik Hadas <aha...@redhat.com>
Gerrit-Reviewer: Francesco Romani <from...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to