ShaoHe Feng has uploaded a new change for review. Change subject: fix dataProgress of migration ......................................................................
fix dataProgress of migration even if migeration is finished, dataProcessed may be less than dataTotal, it will not up to 100%. so the dataRemaining is more reasonable to calculate dataProgress. also, we can see that libvirt also use dataRemaining to calculate dataProgress in print_job_progress function of virsh-domain.c. Change-Id: I8ff16da7a0bfb6a28cb8bae6b127bff46575d5f6 Signed-off-by: ShaoHe Feng <[email protected]> --- M vdsm/libvirtvm.py 1 file changed, 2 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/14/7914/1 diff --git a/vdsm/libvirtvm.py b/vdsm/libvirtvm.py index 3306cc2..e00d918 100644 --- a/vdsm/libvirtvm.py +++ b/vdsm/libvirtvm.py @@ -378,7 +378,8 @@ if jobType == 0: continue - dataProgress = 100 * dataProcessed / dataTotal if dataTotal else 0 + dataProgress = (100 - 100 * dataRemaining) / dataTotal \ + if dataTotal else 0 memProgress = 100 * memProcessed / memTotal if memTotal else 0 self._vm.log.info( -- To view, visit http://gerrit.ovirt.org/7914 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I8ff16da7a0bfb6a28cb8bae6b127bff46575d5f6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: ShaoHe Feng <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
