Change in vdsm[master]: virt: Do not count time spent on migrationCreate against tim...

vfeenstr at redhat.com vfeenstr at redhat.com
Thu Mar 5 07:23:30 UTC 2015


Vinzenz Feenstra has uploaded a new change for review.

Change subject: virt: Do not count time spent on migrationCreate against timeout
......................................................................

virt: Do not count time spent on migrationCreate against timeout

In some cases the migration can timeout when expensive and time consuming
operations are executed during the preparation of the VM on the destination
server.
To avoid this, we'll now excluding the time spent on the migrationCreate
call during the migration from the measured time.

Change-Id: Iafdaa13136757d455e405328173aa3243bea3995
Bug-Url: https://bugzilla.redhat.com/1188543
Signed-off-by: Vinzenz Feenstra <vfeenstr at redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/97/38397/1

diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 6afa9d4..1d87a52 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -295,7 +295,17 @@
                     dev._deviceXML, self._vm.conf, dev.custom)
             hooks.before_vm_migrate_source(self._vm._dom.XMLDesc(0),
                                            self._vm.conf)
+
+            # Do not measure the time spent for creating the VM on the
+            # destination. In some cases some expensive operations can cause
+            # the migration to get cancelled right after the transfer started.
+            destinationCreateStartTime = time.time()
             response = self.destServer.migrationCreate(self._machineParams)
+            # Adds the time spent on migrationCreate to the startTime
+            startTime += time.time() - destinationCreateStartTime
+            self.log.info('Creation of destination VM took: %d seconds',
+                          time.time() - destinationCreateStartTime)
+
             if response['status']['code']:
                 self.status = response
                 raise RuntimeError('migration destination error: ' +


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

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