Change in vdsm[ovirt-3.4]: vm: fix odd migration progress reporting

fromani at redhat.com fromani at redhat.com
Wed Jun 4 13:39:45 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%

A real-word scenario that shows the need for this patch is
the following:
If during the the initialization of migration we experience
some delay, for example DNS resolve issues, libvirt returns 0
for all the progress values, and that incorrectly triggered
the old shortcut, leading to an incorrect initial progress
value of 100.

Change-Id: Ib2bfefb3ffc7d21f6a554f00eac6934fa89ab669
Bug-Url: https://bugzilla.redhat.com/1104670
Signed-off-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/vm.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/28362/1

diff --git a/vdsm/vm.py b/vdsm/vm.py
index 69f7cb4..a21d08b 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -765,7 +765,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/28362
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2bfefb3ffc7d21f6a554f00eac6934fa89ab669
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.4
Gerrit-Owner: Francesco Romani <fromani at redhat.com>


More information about the vdsm-patches mailing list