Eduardo has posted comments on this change.

Change subject: hsm: deleteImage fails because of wrong dictionary use
......................................................................


Patch Set 1:

(2 comments)

....................................................
File vdsm/storage/hsm.py
Line 1525:             # hence no need to create fake template if postZero is 
true.
Line 1526:             self._spmSchedule(spUUID, "zeroImage_%s" % imgUUID, 
dom.zeroImage,
Line 1527:                               sdUUID, imgUUID, volsByImg)
Line 1528:         else:
Line 1529:             dom.deleteImage(sdUUID, imgUUID, volsByImg)
A fake volume is a small void volume, there is no real gain optimizing here.

Reading the metadata in order to verify legality /  fake is what we want to 
avoid. This produce more disk operations than simply remove this fake.

Failing to the delete the fake volume will lead to fail the subsequent images 
operations since override flag is not set.

We want to simplify the logic, and not little gains that are minor compared 
with the image that is deleted.

The real solution is to remove fake volumes at all, started at: 
http://gerrit.ovirt.org/8280
Line 1530:             # This is a hack to keep the interface consistent
Line 1531:             # We currently have race conditions in delete image, to 
quickly fix
Line 1532:             # this we delete images in the "synchronous" state. This 
only works
Line 1533:             # because Engine does not send two requests at a time. 
This hack is


Line 1536:             # an eliminate all race conditions
Line 1537:             if needFake:
Line 1538:                 img = 
image.Image(os.path.join(self.storage_repository,
Line 1539:                                                spUUID))
Line 1540:                 tName = volsByImg.keys()[0]
Can't be more than one volume in a template image since ovirt images require 
that the template image is composed by a unique volume.

For performance reasons we avoid to read MD multiple times and we want to 
simplify the logic as far we can.

The complexity is a product of the ovirt images layout.
Line 1541:                 tParams = dom.produceVolume(imgUUID, 
tName).getVolumeParams()
Line 1542:                 img.createFakeTemplate(sdUUID=sdUUID, 
volParams=tParams)
Line 1543:             self._spmSchedule(spUUID, "deleteImage_%s" % imgUUID, 
lambda: True)
Line 1544: 


-- 
To view, visit http://gerrit.ovirt.org/17383
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I81f9a5aa63c0914e3b934046454df64ccd39c269
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Eduardo <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[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