Change in vdsm[master]: storage.glusterVolume.getVmVolInfo: move logic to storage do...

2013-11-28 Thread danken
Dan Kenigsberg has abandoned this change.

Change subject: storage.glusterVolume.getVmVolInfo: move logic to storage domain
..


Abandoned

a proper solution for this breakage should include reporting the gluster-native 
parameter per chain element, not only per the link.

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

Gerrit-MessageType: abandon
Gerrit-Change-Id: I05352ee60546f03b8e6272abbdd923d0ec6074b7
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: Federico Simoncelli fsimo...@redhat.com
Gerrit-Reviewer: oVirt Jenkins CI Server
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage.glusterVolume.getVmVolInfo: move logic to storage do...

2013-11-11 Thread danken
Dan Kenigsberg has uploaded a new change for review.

Change subject: storage.glusterVolume.getVmVolInfo: move logic to storage domain
..

storage.glusterVolume.getVmVolInfo: move logic to storage domain

volume.getVmVolInfo is never used. The only usage of
glusterVolume.getVmVolInfo requires a cumbersome production of a
glusterVolume object. This patch moves the logic into the storage
domain, and enable the complete removal of glusterVolume in a subsequent
patch.

Change-Id: I05352ee60546f03b8e6272abbdd923d0ec6074b7
Signed-off-by: Dan Kenigsberg dan...@redhat.com
---
M vdsm/storage/glusterSD.py
M vdsm/storage/glusterVolume.py
M vdsm/storage/hsm.py
M vdsm/storage/sd.py
M vdsm/storage/volume.py
5 files changed, 39 insertions(+), 66 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/22/21122/1

diff --git a/vdsm/storage/glusterSD.py b/vdsm/storage/glusterSD.py
index 2931083..492413f 100644
--- a/vdsm/storage/glusterSD.py
+++ b/vdsm/storage/glusterSD.py
@@ -5,6 +5,8 @@
 import fileSD
 import mount
 import storage_exception as se
+import supervdsm
+from gluster.exception import GlusterException
 
 
 class GlusterStorageDomain(nfsSD.NfsStorageDomain):
@@ -27,6 +29,39 @@
 
 raise se.StorageDomainDoesNotExist(sdUUID)
 
+def getExtraVolumeInfo(self, volPath):
+volfileServer, gvolname = self.getRemotePath().rsplit(:, 1)
+
+# Volume transport to Libvirt transport mapping
+VOLUME_TRANS_MAP = {'TCP': 'tcp', 'RDMA': 'rdma'}
+
+# Extract the volume's transport using gluster cli
+svdsmProxy = supervdsm.getProxy()
+try:
+volInfo = svdsmProxy.glusterVolumeInfo(gvolname, volfileServer)
+volTrans = VOLUME_TRANS_MAP[volInfo[gvolname]['transportType'][0]]
+except GlusterException:
+# In case of issues with finding transport type, default to tcp
+self.log.warning(Unable to find transport type for GlusterFS
+  volume %s. GlusterFS server = %s.
+ Defaulting to tcp,
+ (gvolname, volfileServer), exc_info=True)
+volTrans = VOLUME_TRANS_MAP['TCP']
+
+# Use default port
+volPort = 0
+
+# sdUUID/images/imgUUID/volUUID
+imgFileRelPath = '/'.join(volPath.rsplit(/)[-4:])
+
+glusterPath = gvolname + '/' + imgFileRelPath
+
+return {'path': glusterPath,
+'protocol': 'gluster', 'volPort': volPort,
+'volTransport': volTrans,
+'volfileServer': volfileServer,
+'volType': 'network',
+}
 
 def findDomain(sdUUID):
 return GlusterStorageDomain(GlusterStorageDomain.findDomainPath(sdUUID))
diff --git a/vdsm/storage/glusterVolume.py b/vdsm/storage/glusterVolume.py
index 3368de3..1406cdd 100644
--- a/vdsm/storage/glusterVolume.py
+++ b/vdsm/storage/glusterVolume.py
@@ -1,8 +1,4 @@
-from volume import VmVolumeInfo
 import fileVolume
-from sdc import sdCache
-import supervdsm as svdsm
-from gluster.exception import GlusterException
 
 
 class GlusterVolume(fileVolume.FileVolume):
@@ -11,44 +7,3 @@
 fileVolume.FileVolume.__init__(self, repoPath, sdUUID, imgUUID,
volUUID)
 
-def getVmVolumeInfo(self):
-
-Send info to represent Gluster volume as a network block device
-
-rpath = sdCache.produce(self.sdUUID).getRemotePath()
-rpath_list = rpath.rsplit(:, 1)
-volfileServer = rpath_list[0]
-volname = rpath_list[1]
-
-# Volume transport to Libvirt transport mapping
-VOLUME_TRANS_MAP = {'TCP': 'tcp', 'RDMA': 'rdma'}
-
-# Extract the volume's transport using gluster cli
-svdsmProxy = svdsm.getProxy()
-
-try:
-volInfo = svdsmProxy.glusterVolumeInfo(volname, volfileServer)
-volTrans = VOLUME_TRANS_MAP[volInfo[volname]['transportType'][0]]
-except GlusterException:
-# In case of issues with finding transport type, default to tcp
-self.log.warning(Unable to find transport type for GlusterFS
-  volume %s. GlusterFS server = %s.
- Defaulting to tcp,
- (volname, volfileServer), exc_info=True)
-volTrans = VOLUME_TRANS_MAP['TCP']
-
-# Use default port
-volPort = 0
-
-imgFilePath = self.getVolumePath()
-imgFilePath_list = imgFilePath.rsplit(/)
-
-# Extract path to the image, relative to the gluster mount
-imgFileRelPath = /.join(imgFilePath_list[-4:])
-
-glusterPath = volname + '/' + imgFileRelPath
-
-return {'volType': VmVolumeInfo.TYPE_NETWORK, 'path': glusterPath,
-'protocol': 'gluster', 'volPort': volPort,
-'volTransport': volTrans,
-

Change in vdsm[master]: storage.glusterVolume.getVmVolInfo: move logic to storage do...

2013-11-11 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: storage.glusterVolume.getVmVolInfo: move logic to storage domain
..


Patch Set 1: Code-Review-1 Verified-1

Build Failed 

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4517/ : FAILURE

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5317/ : UNSTABLE

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5395/ : FAILURE

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I05352ee60546f03b8e6272abbdd923d0ec6074b7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches


Change in vdsm[master]: storage.glusterVolume.getVmVolInfo: move logic to storage do...

2013-11-11 Thread oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.

Change subject: storage.glusterVolume.getVmVolInfo: move logic to storage domain
..


Patch Set 2: Verified-1

Build Failed 

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/4522/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_pep8_gerrit/5322/ : SUCCESS

http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit/5400/ : FAILURE

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I05352ee60546f03b8e6272abbdd923d0ec6074b7
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg dan...@redhat.com
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches