Peter V. Saveliev has uploaded a new change for review. Change subject: vdsm: migration progress: count memRemaining also ......................................................................
vdsm: migration progress: count memRemaining also Take into account that not only dataRemaining can grow, but memRemaining cat it too. So, we should check both of them. + make code slightly more readable. Signed-off-by: Peter V. Saveliev <[email protected]> Change-Id: I92f37a507ead4cccf835302d25cd02eb344bbcb1 --- M vdsm/libvirtvm.py 1 file changed, 8 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/24/15124/1 diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py index 14bd92e..5b16d69 100644 --- a/vdsm/libvirtvm.py +++ b/vdsm/libvirtvm.py @@ -388,7 +388,7 @@ self._vm.log.debug('starting migration monitor thread') lastProgressTime = time.time() - smallest_dataRemaining = None + lowmark = None while not self._stop.isSet(): self._stop.wait(self._MIGRATION_MONITOR_INTERVAL) @@ -397,9 +397,9 @@ memTotal, memProcessed, memRemaining, fileTotal, fileProcessed, _) = self._vm._dom.jobInfo() - if (smallest_dataRemaining is None or - smallest_dataRemaining > dataRemaining): - smallest_dataRemaining = dataRemaining + remaining = dataRemaining + memRemaining + if (lowmark is None) or (lowmark > remaining): + lowmark = remaining lastProgressTime = time.time() elif (time.time() - lastProgressTime > config.getint('vars', 'migration_timeout')): @@ -411,13 +411,13 @@ self.stop() break - if dataRemaining > smallest_dataRemaining: + if remaining > lowmark: MiB = 1024 * 1024 self._vm.log.warn( - 'Migration stalling: dataRemaining (%sMiB)' - ' > smallest_dataRemaining (%sMiB).' + 'Migration stalling: remaining (%sMiB)' + ' > lowmark (%sMiB).' ' Refer to RHBZ#919201.', - dataRemaining / MiB, smallest_dataRemaining / MiB) + remaining / MiB, lowmark / MiB) if jobType == 0: continue -- To view, visit http://gerrit.ovirt.org/15124 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I92f37a507ead4cccf835302d25cd02eb344bbcb1 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Peter V. Saveliev <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
