Nir Soffer has posted comments on this change. Change subject: vm: Use blockRebase if blockCopy is not supported ......................................................................
Patch Set 2: (2 comments) Francesco, trying a call is the simplest method, and it will work if libvirt guys port blockCopy to 1.2.8 without any change in the code. We can perform the tests once and cache the capability (HAS_BLOCK_COPY), and then use the cached value. However I don't think it worth the effort for a temporary fix. https://gerrit.ovirt.org/#/c/40158/2/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 3570: except libvirt.libvirtError as e: Line 3571: if e.get_error_code() != libvirt.VIR_ERR_NO_SUPPORT: Line 3572: raise Line 3573: Line 3574: self.log.warning("blockCopy not supportted, using blockRebase") > typo: "supportted" vs "supported" Will fix in next version Line 3575: Line 3576: base = drive.diskReplicate["path"] Line 3577: self.log.debug("Replicating drive %s to %s", drive.name, base) Line 3578: Line 3582: Line 3583: if drive.diskReplicate["diskType"] == DISK_TYPE.BLOCK: Line 3584: flags |= libvirt.VIR_DOMAIN_BLOCK_REBASE_COPY_DEV Line 3585: Line 3586: self._dom.blockRebase(drive.name, base, flags=flags) > question: would it make sense to encapsulate all this code (from 'raise' to I considered this, but it creates a method that you should never call. This code encapsulate the logic in one place. The plan is to revert this patch as soon as 7.2 is out, and we don't need to support version without working blockCopy. Line 3587: Line 3588: def _diskSizeExtendCow(self, drive, newSizeBytes): Line 3589: # Apparently this is what libvirt would do anyway, except that Line 3590: # it would fail on NFS when root_squash is enabled, see BZ#963881 -- To view, visit https://gerrit.ovirt.org/40158 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic03474e36d7e073b7e5924cb02f417e12d4ad75e Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Ala Hino <[email protected]> Gerrit-Reviewer: Allon Mureinik <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Freddy Rolland <[email protected]> Gerrit-Reviewer: Nir Soffer <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
