Francesco Romani has posted comments on this change.

Change subject: vm: Use blockRebase if blockCopy is not supported
......................................................................


Patch Set 2:

(2 comments)

I hate when libvirt force us to try an operation and see what happens, to learn 
if a feature is actually supported or not. But what can we do?

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"
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 
here) in a helper method, to make it easier to remove later on, or it will be 
wasted effort?
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

Reply via email to