Change in vdsm[master]: virt: event: send status event on migrations

fromani at redhat.com fromani at redhat.com
Thu Jul 9 11:00:13 UTC 2015


Francesco Romani has uploaded a new change for review.

Change subject: virt: event: send status event on migrations
......................................................................

virt: event: send status event on migrations

Make sure to send to Engine the events when
migration starts, ends or aborts.

Change-Id: Ibef280723286987cfaee601eafa20054115ebe36
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/migration.py
M vdsm/virt/vm.py
2 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/77/43377/1

diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index d6994ed..54cbde0 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -216,6 +216,7 @@
             self._vm.cont()
         # either way, migration has finished
         self._vm.lastStatus = vmstatus.UP
+        self._vm.send_status_event()
 
     def _finishSuccessfully(self):
         self._progress = 100
diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 0e8a64d..dec63e8 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -1581,6 +1581,7 @@
                 self, **params)
             self._migrationSourceThread.start()
             self._migrationSourceThread.getStat()
+            self.send_status_event()
             return self._migrationSourceThread.status
         finally:
             self._guestCpuLock.release()
@@ -1594,6 +1595,7 @@
             self._migrationSourceThread.stop()
             self._migrationSourceThread.status['status']['message'] = \
                 'Migration process cancelled'
+            self.send_status_event()
             return self._migrationSourceThread.status
         except libvirt.libvirtError as e:
             if e.get_error_code() == libvirt.VIR_ERR_OPERATION_INVALID:
@@ -1869,6 +1871,8 @@
             # rebooting it. Evident on, but not limited to, the HE case.
             self._fixLegacyConf()
 
+        self.send_status_event()
+
         self._devices = self.devMapFromDevSpecMap(dev_spec_map)
 
         # We should set this event as a last part of drives initialization


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibef280723286987cfaee601eafa20054115ebe36
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list