Change in vdsm[master]: vm: fix odd migration progress reporting

fromani at redhat.com fromani at redhat.com
Wed May 7 12:56:18 UTC 2014


Francesco Romani has uploaded a new change for review.

Change subject: vm: fix odd migration progress reporting
......................................................................

vm: fix odd migration progress reporting

migration progress should not start from 100,
otherwise the user will see smething like:

progress: 100 -> 0% ... X% ... 100%

And this is confusing to say the least.

Change-Id: Ib9d72b0b8b956d79a7f69df61f4b45048dc9443e
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/65/27465/1

diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index 36be2e0..3c01b8e 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -391,7 +391,7 @@
 
     def run(self):
         def calculateProgress(remaining, total):
-            if remaining == 0:
+            if remaining == 0 and total:
                 return 100
             progress = 100 - 100 * remaining / total if total else 0
             return progress if (progress < 100) else 99


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib9d72b0b8b956d79a7f69df61f4b45048dc9443e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list