Change in vdsm[master]: Changed the convergence from num of seconds to num of iterat...
tjelinek at redhat.com
tjelinek at redhat.com
Mon Apr 25 07:56:58 UTC 2016
Tomas Jelinek has uploaded a new change for review.
Change subject: Changed the convergence from num of seconds to num of iterations
......................................................................
Changed the convergence from num of seconds to num of iterations
Change-Id: I99874120d929b055395a598baffad20aac8fcf39
Signed-off-by: Tomas Jelinek <tjelinek at redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 18 insertions(+), 11 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/57/56557/1
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 5ca5993..f74f194 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -119,19 +119,11 @@
self._monitorThread = None
self._destServer = None
- progress_timeout = config.getint('vars', 'migration_progress_timeout')
+
self._convergence_schedule = {
'init': [],
- 'stalling': [
- {
- 'limit': progress_timeout,
- 'action': {
- 'name': CONVERGENCE_SCHEDULE_SET_ABORT,
- 'params': []
- }
- }
- ]
+ 'stalling': []
}
self._use_convergence_schedule = False
@@ -582,12 +574,24 @@
migrationMaxTime = (maxTimePerGiB * memSize + 1023) / 1024
lastProgressTime = time.time()
lowmark = None
+ lastDataRemaining = None
+ iterationCount = 0
+
self._execute_init(self._conv_schedule['init'])
while not self._stop.isSet():
self._stop.wait(self._MIGRATION_MONITOR_INTERVAL)
prog = Progress.from_job_stats(self._vm._dom.jobStats())
now = time.time()
+ if lastDataRemaining is not None and\
+ lastDataRemaining < prog.data_remaining:
+ self._vm.log.debug('new iteration detected')
+ iterationCount += 1
+ if self._use_conv_schedule:
+ self._next_action(iterationCount)
+
+ lastDataRemaining = prog.data_remaining
+
if not self._use_conv_schedule and\
(0 < migrationMaxTime < now - self._startTime):
self._vm.log.warn('The migration took %d seconds which is '
@@ -608,6 +612,9 @@
' > lowmark (%sMiB).'
' Refer to RHBZ#919201.',
prog.data_remaining / Mbytes, lowmark / Mbytes)
+
+ if not self._use_conv_schedule and\
+ progress_timeout < now - lastProgressTime:
self._next_action(now - lastProgressTime)
@@ -630,7 +637,7 @@
def _next_action(self, stalling):
head = self._conv_schedule['stalling'][0]
- self._vm.log.debug('Stalling for %d seconds, '
+ self._vm.log.debug('Stalling for %d iterations, '
'checking to make next action: '
'%s', stalling, head)
if head['limit'] < stalling:
--
To view, visit https://gerrit.ovirt.org/56557
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I99874120d929b055395a598baffad20aac8fcf39
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Tomas Jelinek <tjelinek at redhat.com>
More information about the vdsm-patches
mailing list