Deepak C Shetty has posted comments on this change.

Change subject: Support for GLUSTERFS_DOMAIN
......................................................................


Patch Set 14: (4 inline comments)

@Dan,
   Responded to your comments. Pls take a look.

....................................................
File vdsm/storage/glusterVolume.py
Line 14:         """
Line 15:         Send info to represent Gluster volume as a network block device
Line 16:         """
Line 17:         rpath = sdCache.produce(self.sdUUID).getRemotePath()
Line 18:         rpath_list = rpath.rsplit(":")
remotePath comes from the user as part of the 'spec', typically server:/export 
( in case of NFS) and server:volumename (in case of gluster). I need to extract 
the volume name hence the need to split using ':'. IIUC, ':' will be present in 
NFS' getRemotePath() as well. Is there a better way of doing this w/o using ':' 
?

I will use maxsplit=1 for the rsplit, since it always should be of the form 
server:volumename for gluster case.
Line 19:         volfileServer = rpath_list[0]
Line 20:         volname = rpath_list[1]
Line 21: 
Line 22:         # Volume transport to Libvirt transport mapping


Line 31:         volPort = "0"
Line 32: 
Line 33:         imgFilePath = self.getVolumePath()
Line 34:         imgFilePath_list = imgFilePath.rsplit("/")
Line 35:         imgFileRelPath = "/".join(imgFilePath_list[4:])
I agree, hard-coding needs to be removed. Let me see how I can do that. 

4: means i need to find the path relative to the start of the mount point. 
Basically the path to the image starting from the sdUUID/... bcos this gets fed 
to the qemu's gluster:// cmdline that expects a path relative to the gluster 
volume.
Line 36: 
Line 37:         glusterPath = volname + '/' + imgFileRelPath
Line 38: 
Line 39:         return {'volType': VmVolumeInfo.TYPE_NETWORK, 'path': 
glusterPath,


....................................................
File vdsm/storage/sdc.py
Line 132:     def _findDomain(self, sdUUID):
Line 133:         import blockSD
Line 134:         import localFsSD
Line 135:         import nfsSD
Line 136:         import glusterSD
Done
Line 137: 
Line 138:         # The order is somewhat important, it's ordered
Line 139:         # by how quickly get can find the domain. For instance
Line 140:         # if an nfs mount is unavailable we will get stuck


....................................................
File vdsm/storage/storageServer.py
Line 248: class GlusterFSConnection(MountConnection):
Line 249: 
Line 250:     def _getLocalPath(self):
Line 251:         return os.path.join(
Line 252:             self.localPathBase, "glusterSD",
I thought using os.path.join was portable and preferred ? In fact in one of my 
prev. patchsets.. fsimonce had asked me to use os.path.join instead of +=.

is there any advantage of usign += here instead of the preferred os.path.join ? 
I am not clear.

What i am doing here is to get a glusterSD specific mnt path something like
mnt/glusterSD/<servername:volname>.
Line 253:             self._remotePath.replace("_", "__").replace("/", "_"))
Line 254: 
Line 255: 
Line 256: class NFSConnection(object):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9ac37da88625f20d148beaf53bb6371c15b33ad7
Gerrit-PatchSet: 14
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Deepak C Shetty <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Bala.FA <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Deepak C Shetty <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Royce Lv <[email protected]>
Gerrit-Reviewer: Ryan Harper <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Shu Ming <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to