Nir Soffer has posted comments on this change.

Change subject: storage: Use mismatched_vm_conf_disk workaround in copy_data
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/64231/1/vdsm/storage/sdm/api/copy_data.py
File vdsm/storage/sdm/api/copy_data.py:

Line 62
Line 63
Line 64
Line 65
Line 66
If we add a is_bad_vm_conf() method to DivEndpoint:

    if self._source.is_bad_vm_conf():
        src_fmt, dst_fmt = RAW, RAW
    else:
        src_fmt = self._source.qemu_format
        dst_fmt = self._dest.qemu_format

Very similar to the code in image.py, the workaround looks now like a 
workaround.


Line 119:             if workarounds.mismatched_vm_conf_disk(self._vol):
Line 120:                 self._qemu_format = qemuimg.FORMAT.RAW
Line 121:             else:
Line 122:                 self._qemu_format = sc.fmt2str(self._vol.getFormat())
Line 123:         return self._qemu_format
We need this check only for the source image, and then we want to apply the 
change to the destination.

Integrating the workaround here is not a good idea, the workaround should be 
applied externally to this nice object - this is a workaround, it should not be 
transparent.

What if we have:

    def is_bad_vm_conf(self):
        return workarounds.is_bad_vm_conf(self._vol)
Line 124: 
Line 125:     @property
Line 126:     def backing_path(self):
Line 127:         parent_vol = self._vol.getParentVolume()


-- 
To view, visit https://gerrit.ovirt.org/64231
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iecfd3e0fd5923e9a333379ab21e01c9b12def78c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <ali...@redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com>
Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list -- vdsm-patches@lists.fedorahosted.org
To unsubscribe send an email to vdsm-patches-le...@lists.fedorahosted.org

Reply via email to