Milan Zamazal has uploaded a new change for review.

Change subject: virt: Don't crash in migration progress on compression bytes
......................................................................

virt: Don't crash in migration progress on compression bytes

If compression is not enabled for a migration then compression stats are
not provided by libvirt.  So when we try to retrieve them in migration
Progress, we must not expect their presence, otherwise we crash there.

Change-Id: I1885940843d705ead161c13258f1979025a03873
Signed-off-by: Milan Zamazal <mzama...@redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/64468/1

diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py
index ef1f8a4..bed481e 100644
--- a/vdsm/virt/migration.py
+++ b/vdsm/virt/migration.py
@@ -790,7 +790,7 @@
             stats[libvirt.VIR_DOMAIN_JOB_MEMORY_REMAINING],
             stats[libvirt.VIR_DOMAIN_JOB_MEMORY_BPS],
             stats[libvirt.VIR_DOMAIN_JOB_MEMORY_CONSTANT],
-            stats[libvirt.VIR_DOMAIN_JOB_COMPRESSION_BYTES],
+            stats.get(libvirt.VIR_DOMAIN_JOB_COMPRESSION_BYTES, 0),
             # available since libvirt 1.3
             stats.get('memory_dirty_rate', -1),
             # available since libvirt 1.3


-- 
To view, visit https://gerrit.ovirt.org/64468
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1885940843d705ead161c13258f1979025a03873
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Milan Zamazal <mzama...@redhat.com>
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to