Nir Soffer has posted comments on this change.
Change subject: vm: Add qcow2_compat on create ......................................................................
Patch Set 19: Code-Review-1
(3 comments)
https://gerrit.ovirt.org/#/c/64377/19/vdsm/virt/vm.py File vdsm/virt/vm.py:
Line 21: Line 22: # stdlib imports Line 23: from collections import namedtuple Line 24: from contextlib import contextmanager Line 25: from storage.sdc import sdCache We already importing sdc, see LiveMergeCleanupThread.teardown_top_volume. Line 26: from xml.dom.minidom import parseString as _domParseStr Line 27: import itertools Line 28: import logging Line 29: import os
Line 2699: transientHandle, transientPath = tempfile.mkstemp( Line 2700: dir=config.get('vars', 'transient_disks_repository'), Line 2701: prefix="%s-%s." % (diskParams['domainID'], diskParams['volumeID'])) Line 2702: Line 2703: sdDom = sdCache.produce(sdUUID=diskParams['domainID']).manifest Produce manifest, this is a safer and easier to test object. Line 2704: try: Line 2705: qemuimg.create(transientPath, Line 2706: format=qemuimg.FORMAT.QCOW2, Line 2707: backing=diskParams['path'],
Line 2702: Line 2703: sdDom = sdCache.produce(sdUUID=diskParams['domainID']).manifest Line 2704: try: Line 2705: qemuimg.create(transientPath, Line 2706: format=qemuimg.FORMAT.QCOW2, Put qcow2Compat here (this is the third time I'm commenting about this in this patch). Line 2707: backing=diskParams['path'], Line 2708: backingFormat=driveFormat, Line 2709: qcow2Compat=sdDom.qcow2_compat()) Line 2710: os.fchmod(transientHandle, 0o660)