Milan Zamazal has uploaded a new change for review.
Change subject: virt: Inform Engine about switching to post-copy ......................................................................
virt: Inform Engine about switching to post-copy
Engine must be informed when a migration switches to post-copy mode (to know where to get further events and stats from). We use status event for that purpose. We report paused state for VMs in post-copy migration mode on the source, so we must distinguish between paused state in post-copy migration and paused state for other reasons. We use pauseCode for that purpose.
Change-Id: I281ec36a6bd65b816afbdeef79205e6241d4a27c Signed-off-by: Milan Zamazal mzamazal@redhat.com Bug-Url: https://bugzilla.redhat.com/1354343 --- M vdsm/virt/vm.py 1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/64149/8
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 195453f..abf2d75 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -4200,6 +4200,9 @@ elif detail == libvirt.VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY: self._in_post_copy = True self.log.debug("Migration entered post-copy mode") + with self._confLock: + self.conf['pauseCode'] = 'POSTCOPY' + self.send_status_event(pauseCode='POSTCOPY') elif detail == libvirt.VIR_DOMAIN_EVENT_SUSPENDED_POSTCOPY_FAILED: # This can happen on both the ends of the migration. # After a failed post-copy migration, the VM remains in a