Hello Michal Skrivanek, Milan Zamazal,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/65306
to review the following change.
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.
Backport-To: 4.0 Bug-Url: https://bugzilla.redhat.com/1380822 Change-Id: I1885940843d705ead161c13258f1979025a03873 Signed-off-by: Milan Zamazal mzamazal@redhat.com Reviewed-on: https://gerrit.ovirt.org/64468 Reviewed-by: Michal Skrivanek michal.skrivanek@redhat.com Continuous-Integration: Jenkins CI Reviewed-by: Francesco Romani fromani@redhat.com Reviewed-on: https://gerrit.ovirt.org/64499 --- M vdsm/virt/migration.py 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/06/65306/1
diff --git a/vdsm/virt/migration.py b/vdsm/virt/migration.py index 8f2af23..e502756 100644 --- a/vdsm/virt/migration.py +++ b/vdsm/virt/migration.py @@ -769,7 +769,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