Adam Litke has posted comments on this change. Change subject: Live Merge: add reconcileVolumeChain verb ......................................................................
Patch Set 2: -Verified (3 comments) http://gerrit.ovirt.org/#/c/31788/2/client/vdsClient.py File client/vdsClient.py: Line 2555: '<spUUID> <sdUUID> <imgUUID> [<volUUID>]', Line 2556: 'Teardown an image, releasing the prepared volumes.' Line 2557: )), Line 2558: 'reconcileVolumeChain': (serv.reconcileVolumeChain, ( Line 2559: '<spUUID> <sdUUID> <imgUUID> <leafVolUUID>', > To generalize this verb we probably want leafVolUUID to be optional. I am not sure if this is possible. Without knowing the leaf, we don't know where to start the qemu-img calls. Line 2560: 'Reconcile an image volume chain and return the current chain.' Line 2561: )), Line 2562: 'moveMultiImage': (serv.moveMultiImage, Line 2563: ('<spUUID> <srcDomUUID> <dstDomUUID> ' http://gerrit.ovirt.org/#/c/31788/2/vdsm/storage/hsm.py File vdsm/storage/hsm.py: Line 1837: Line 1838: imageResourcesNamespace = sd.getNamespace(sdUUID, IMAGE_NAMESPACE) Line 1839: with rmanager.acquireResource(imageResourcesNamespace, imgUUID, Line 1840: rm.LockType.shared): Line 1841: curChain = img.getChain(sdUUID, imgUUID, volUUID) > Related to a following comment below: this logic seems to belong to image.p ok Line 1842: subChain = [] Line 1843: for vol in curChain: Line 1844: if vol.volUUID not in newChain: Line 1845: subChain.insert(0, vol.volUUID) Line 1876: Line 1877: # Walk the volume chain using qemu-img. Not safe for running VMs Line 1878: retVolumes = [] Line 1879: volUUID = leafVolUUID Line 1880: while volUUID is not None: > All the logic doesn't belong here. It should probably go in image.py. This seems like this request will require a fairly substantial refactoring of this function and imageSyncVolumeChain. Can you live with it the way it is in order to get this into 3.5 or must it be rewritten now? Line 1881: retVolumes.insert(0, volUUID) Line 1882: vol = dom.produceVolume(imgUUID, volUUID) Line 1883: qemuImgFormat = volume.fmt2str(vol.getFormat()) Line 1884: imgInfo = qemuimg.info(vol.volumePath, qemuImgFormat) -- To view, visit http://gerrit.ovirt.org/31788 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia8927a42d2bc9adcf7c6b26babb327a00e91e49e Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <[email protected]> Gerrit-Reviewer: Adam Litke <[email protected]> Gerrit-Reviewer: Dan Kenigsberg <[email protected]> Gerrit-Reviewer: Federico Simoncelli <[email protected]> Gerrit-Reviewer: Francesco Romani <[email protected]> Gerrit-Reviewer: Greg Padgett <[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
