Change in vdsm[master]: virt: use only SourceThread.stop()

fromani at redhat.com fromani at redhat.com
Tue May 5 08:34:26 UTC 2015


Francesco Romani has uploaded a new change for review.

Change subject: virt: use only SourceThread.stop()
......................................................................

virt: use only SourceThread.stop()

the migration orchestration code used
to change the SourceThread.status from the outside,
adding unneeded coupling.

This should be avoided, and should be done automatically
by the stop() method.

Change-Id: I8803b40eec10d0c5b82debcf2f3f454bbbe785b8
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/vm.py
1 file changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/21/40521/1

diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py
index 6741f06..d0d116c 100644
--- a/vdsm/virt/vm.py
+++ b/vdsm/virt/vm.py
@@ -1471,10 +1471,7 @@
     def migrateCancel(self):
         self._acquireCpuLockWithTimeout()
         try:
-            self._migrationSourceThread.stop()
-            self._migrationSourceThread.status['status']['message'] = \
-                'Migration process cancelled'
-            return self._migrationSourceThread.status
+            return self._migrationSourceThread.stop()
         except libvirt.libvirtError as e:
             if e.get_error_code() == libvirt.VIR_ERR_OPERATION_INVALID:
                 return errCode['migCancelErr']


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8803b40eec10d0c5b82debcf2f3f454bbbe785b8
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