Change in vdsm[master]: Avoid going into 'Paused' status during long during migrations

vfeenstr at redhat.com vfeenstr at redhat.com
Tue Dec 3 14:43:12 UTC 2013


Vinzenz Feenstra has uploaded a new change for review.

Change subject: Avoid going into 'Paused' status during long during migrations
......................................................................

Avoid going into 'Paused' status during long during migrations

If a migration is taking longer than 'migration_timeout' the
migration is moving into 'Paused' state. To avoid that we'll
no longer continue after the timeout, but wait indefinitely
until the event is triggered.

Change-Id: I6bb1c9ae7ead92093c0d300df7c3567ab20b1e09
Bug-Url: https://bugzilla.redhat.com/1028917
Signed-off-by: Vinzenz Feenstra <vfeenstr at redhat.com>
---
M vdsm/vm.py
1 file changed, 8 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/21963/1

diff --git a/vdsm/vm.py b/vdsm/vm.py
index ccdf950..88c2508 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -3484,24 +3484,14 @@
             hooks.after_vm_dehibernate(self._dom.XMLDesc(0), self.conf,
                                        {'FROM_SNAPSHOT': fromSnapshot})
         elif 'migrationDest' in self.conf:
-            timeout = config.getint('vars', 'migration_timeout')
-            self.log.debug("Waiting %s seconds for end of migration" % timeout)
-            self._incomingMigrationFinished.wait(timeout)
-            try:
-                # Would fail if migration isn't successful,
-                # or restart vdsm if connection to libvirt was lost
-                self._dom = NotifyingVirDomain(
-                    self._connection.lookupByUUIDString(self.id),
-                    self._timeoutExperienced)
-            except Exception as e:
-                # Improve description of exception
-                if not self._incomingMigrationFinished.isSet():
-                    newMsg = ('%s - Timed out '
-                              '(did not receive success event)' %
-                              (e.args[0] if len(e.args) else
-                               'Migration Error'))
-                    e.args = (newMsg,) + e.args[1:]
-                raise
+            self.log.debug("Waiting for the end of the migration")
+            self._incomingMigrationFinished.wait()
+
+            # Would fail if migration isn't successful,
+            # or restart vdsm if connection to libvirt was lost
+            self._dom = NotifyingVirDomain(
+                self._connection.lookupByUUIDString(self.id),
+                self._timeoutExperienced)
 
             self._domDependentInit()
             del self.conf['migrationDest']


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bb1c9ae7ead92093c0d300df7c3567ab20b1e09
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeenstr at redhat.com>


More information about the vdsm-patches mailing list