In qemu 1.6 and later, qemu info migrate changed from
    ...
    transferred ram: 980546 kbytes
    remaining ram: 0 kbytes
    total ram: 1049024 kbytes
    ...
to
    transferred ram: 61460 kbytes
    throughput: 671.42 mbps
    remaining ram: 358212 kbytes
    total ram: 1049672 kbytes
    ...

This stops migrates from showing progress for memory transfers that
take a long time. Update the regexp to handle this (should work with
up to at least qemu 2.7)

Thanks to [email protected] for the fix.

Signed-off-by: Brian Foley <[email protected]>
---
 lib/hypervisor/hv_kvm/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/hypervisor/hv_kvm/__init__.py 
b/lib/hypervisor/hv_kvm/__init__.py
index 8271e0e..174621f 100644
--- a/lib/hypervisor/hv_kvm/__init__.py
+++ b/lib/hypervisor/hv_kvm/__init__.py
@@ -389,7 +389,7 @@ class KVMHypervisor(hv_base.BaseHypervisor):
   _MIGRATION_STATUS_RE = re.compile(r"Migration\s+status:\s+(\w+)",
                                     re.M | re.I)
   _MIGRATION_PROGRESS_RE = \
-    re.compile(r"\s*transferred\s+ram:\s+(?P<transferred>\d+)\s+kbytes\s*\n"
+    re.compile(r"\s*transferred\s+ram:\s+(?P<transferred>\d+)\s+kbytes\s*\n.*"
                r"\s*remaining\s+ram:\s+(?P<remaining>\d+)\s+kbytes\s*\n"
                r"\s*total\s+ram:\s+(?P<total>\d+)\s+kbytes\s*\n", re.I)
 
-- 
2.8.0.rc3.226.g39d4020

Reply via email to