Nir Soffer has posted comments on this change.
Change subject: vm: Add qcow2_compat on create ......................................................................
Patch Set 21:
(1 comment)
https://gerrit.ovirt.org/#/c/64377/21/vdsm/virt/vm.py File vdsm/virt/vm.py:
Line 2698: transientHandle, transientPath = tempfile.mkstemp( Line 2699: dir=config.get('vars', 'transient_disks_repository'), Line 2700: prefix="%s-%s." % (diskParams['domainID'], diskParams['volumeID'])) Line 2701: Line 2702: sdDom = sdc.sdCache.produce_manifest(diskParams['domainID'])
It seems like the tempfile at line 2698 should be in the try block, and the
The way the termpfile is created and closed is correct:
open file try: use it except ... clean up finally: close it
If you cannot open the file, we raise before the try, and there is nothing to close.
Please move the sd creation into the try. Line 2703: try: Line 2704: qemuimg.create(transientPath, Line 2705: format=qemuimg.FORMAT.QCOW2, Line 2706: qcow2Compat=sdDom.qcow2_compat(),