Nir Soffer has uploaded a new change for review. Change subject: vm: Workaround for libvirt bug in el7.2 ......................................................................
vm: Workaround for libvirt bug in el7.2 In RHEL 7.2, physical is always reported as 0. Using our storage apis to get that until this issue is resolved. Change-Id: I3bb8d725ef877f8496933ef8a36faf61a2abb13c Relates-To: https://bugzilla.redhat.com/1250982 Signed-off-by: Nir Soffer <[email protected]> --- M vdsm/virt/vm.py 1 file changed, 13 insertions(+), 5 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/44489/1 diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py index 2aa9ce4..86c866a 100644 --- a/vdsm/virt/vm.py +++ b/vdsm/virt/vm.py @@ -962,18 +962,26 @@ """ capacity, alloc, physical = self._dom.blockInfo(drive.path, 0) - # Libvirt reports watermarks only for the source drive, but for - # file-based drives it reports the same alloc and physical, which - # breaks our extend logic. Since drive is chunked, we must have a - # disk-based replica, so we get the physical size from the replica. - if not drive.chunked: + # Libvirt reports watermarks only for the source drive, but for + # file-based drives it reports the same alloc and physical, which + # breaks our extend logic. Since drive is chunked, we must have a + # disk-based replica, so we get the physical size from the replica. replica = drive.diskReplicate volsize = self._getVolumeSize(replica["domainID"], replica["poolID"], replica["imageID"], replica["volumeID"]) physical = volsize.apparentsize + elif physical == 0: + # In RHEL 7.2, physical is always reported as 0. Using our storage + # apis to get that until this issue is resolved. See + # https://bugzilla.redhat.com/1250982 + volsize = self._getVolumeSize(drive["domainID"], + drive["poolID"], + drive["imageID"], + drive["volumeID"]) + physical = volsize.apparentsize return capacity, alloc, physical -- To view, visit https://gerrit.ovirt.org/44489 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I3bb8d725ef877f8496933ef8a36faf61a2abb13c Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
