Hello Francesco Romani, Michal Skrivanek,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/64499
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
Change-Id: I1885940843d705ead161c13258f1979025a03873
Signed-off-by: Milan Zamazal <mzamazal(a)redhat.com>
Reviewed-on:
https://gerrit.ovirt.org/64468
Reviewed-by: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Continuous-Integration: Jenkins CI
Reviewed-by: Francesco Romani <fromani(a)redhat.com>
---
M vdsm/virt/migration.py
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/64499/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
--
To view, visit
https://gerrit.ovirt.org/64499
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1885940843d705ead161c13258f1979025a03873
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-4.0
Gerrit-Owner: Milan Zamazal <mzamazal(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>