Vinzenz Feenstra has uploaded a new change for review.

Change subject: vdsm: Reduce the migration progress timeout
......................................................................

vdsm: Reduce the migration progress timeout

The progress of the migration should indicate a stuck migration
way before the currently configured migration_timeout, which has
by default 300 seconds.

Half of the time should be more than enough for now.

This commit introduces the migration_progress_timeout configuration
value to be able adjusting this value.

Change-Id: I8f314d70b8f32cfff58f9776bcc2182a748a9b67
Signed-off-by: Vinzenz Feenstra <vfeen...@redhat.com>
---
M lib/vdsm/config.py.in
M vdsm/vm.py
2 files changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/02/16602/1

diff --git a/lib/vdsm/config.py.in b/lib/vdsm/config.py.in
index 2a5618a..d95c78d 100644
--- a/lib/vdsm/config.py.in
+++ b/lib/vdsm/config.py.in
@@ -52,6 +52,11 @@
             'Please note, that this is not overall migration timeout. '
             'Source waits twice as long (to avoid races).'),
 
+        ('migration_progress_timeout', '150',
+            'Maximum time the source host waits during a migration in case '
+            'that there is no progress. If the time has passed, the migration '
+            'will be aborted.'),
+
         ('migration_listener_timeout', '30',
             'Time to wait (in seconds) for migration destination to start '
             'listening before migration begins.'),
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 281c584..309a1bd 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -746,6 +746,7 @@
 
         lastProgressTime = time.time()
         smallest_dataRemaining = None
+        progress_timeout = config.getint('vars', 'migration_progress_timeout')
 
         while not self._stop.isSet():
             self._stop.wait(self._MIGRATION_MONITOR_INTERVAL)
@@ -758,8 +759,7 @@
                     smallest_dataRemaining > dataRemaining):
                 smallest_dataRemaining = dataRemaining
                 lastProgressTime = time.time()
-            elif (time.time() - lastProgressTime >
-                  config.getint('vars', 'migration_timeout')):
+            elif (time.time() - lastProgressTime) > progress_timeout:
                 # Migration is stuck, abort
                 self._vm.log.warn(
                     'Migration is stuck: Hasn\'t progressed in %s seconds. '


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f314d70b8f32cfff58f9776bcc2182a748a9b67
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Vinzenz Feenstra <vfeen...@redhat.com>
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to