Adam Litke has posted comments on this change. Change subject: virt: Use libvirt to get drive size ......................................................................
Patch Set 1: (3 comments) https://gerrit.ovirt.org/#/c/55399/1/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 3498 Line 3499 Line 3500 Line 3501 Line 3502 You don't need to use the qemuimg method anymore (and you can remove the above comment). Line 3499: # Patches have been submitted to avoid this behavior, the virtual Line 3500: # and apparent sizes will be returned by the qemu process and Line 3501: # through the libvirt blockInfo call. Line 3502: curVirtualSize = qemuimg.info(drive.path, "qcow2")['virtualsize'] Line 3503: def _getSize(): Put this embedded function at the top of this function. Line 3504: # Due to an old bug in libvirt (BZ#963881) this call used to be Line 3505: # broken for NFS domains when squash_root was enabled. This has Line 3506: # been fixed since libvirt-0.10.2-29 Line 3507: try: Line 3510: self.log.exception("An error occurred while getting the " Line 3511: "current disk size") Line 3512: return errCode['resizeErr'] Line 3513: Line 3514: currentSize = _getSize() should be curVirtualSize Line 3515: if curVirtualSize > newSizeBytes: Line 3516: self.log.error( Line 3517: "Requested extension size %s for disk %s is smaller " Line 3518: "than the current size %s", newSizeBytes, drive.name, -- To view, visit https://gerrit.ovirt.org/55399 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I19b9f452bae0a1c03f2efe543a4bfa0d671e932d Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Tal Nisan <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: gerrit-hooks <[email protected]> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
