Change in vdsm[master]: virt: migration: avoid implicit thread start

fromani at redhat.com fromani at redhat.com
Thu Sep 18 06:58:04 UTC 2014


Francesco Romani has uploaded a new change for review.

Change subject: virt: migration: avoid implicit thread start
......................................................................

virt: migration: avoid implicit thread start

migration.DowntimeThread used to implicitely
start() itself at the end of its __init__().

This is bad practice, so this patch removes
the implicit start and make the method be called
when needed.

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


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/31/33031/1

diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index c4fddef..da1465e 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -312,6 +312,7 @@
                                'with miguri %s', duri, muri)
 
             t = DowntimeThread(self._vm, int(self._downtime))
+            t.start()
             self._monitorThread = MonitorThread(self._vm, startTime)
             with utils.running(self._monitorThread):
                 try:
@@ -368,7 +369,6 @@
         self._wait = (delay_per_gib * max(memSize, 2048) + 1023) / 1024
 
         self.daemon = True
-        self.start()
 
     def run(self):
         self._vm.log.debug('migration downtime thread started')


-- 
To view, visit http://gerrit.ovirt.org/33031
To unsubscribe, visit http://gerrit.ovirt.org/settings

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