Change in vdsm[master]: volume: changing un-shared treatment in the share function

oourfali at redhat.com oourfali at redhat.com
Thu Jan 16 07:22:58 UTC 2014


Oved Ourfali has posted comments on this change.

Change subject: volume: changing un-shared treatment in the share function
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.ovirt.org/#/c/23260/5/vdsm/storage/volume.py
File vdsm/storage/volume.py:

Line 299:         """
Line 300:         self.log.debug("Share volume %s to %s", self.volUUID, dstImgPath)
Line 301: 
Line 302:         if not self.isShared():
Line 303:             if self.getParent() == BLANK_UUID:
> Actually now that I think of it, this part may be misplaced and we may forg
Well, seems like changing it in sp.py will touch more flows, won't it? (afraid of the damage it might cause :-) ).... and it is a bigger change I guess.

But if you'll insist, did you mean to do something like the following in sp.py createVolume?

        imageResourcesNamespace = sd.getNamespace(sdUUID, IMAGE_NAMESPACE)

        with rmanager.acquireResource(imageResourcesNamespace, srcImgUUID,
                                      rm.LockType.exclusive):
            if imgUUID != srcImgUUID:
                srcDom = sdCache.produce(sdUUID)
                srcVol = srcDom.produceVolume(imgUUID=srcImgUUID,
                                              volUUID=srcVolUUID)
                if not srcVol.isShared():
                    if srcVol.getParent() == BLANK_UUID:
                        srcVol.serShared()
                    else:
                        raise se.VolumeNonShareable(srcVol)


Or am I really in the wrong path here?
Line 304:                 self.log.debug("Volume %s is not shared. Setting it as shared",
Line 305:                                self.volUUID)
Line 306:                 self.setShared()
Line 307:             else:


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Id9a4b84795b176b9696684045e9774d324a42eca
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Itamar Heim <iheim at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list