Change in vdsm[master]: storage: Fix the case when VDSM host is not a gluster peer

deepakcs at linux.vnet.ibm.com deepakcs at linux.vnet.ibm.com
Sat May 11 14:45:08 UTC 2013


Deepak C Shetty has uploaded a new change for review.

Change subject: storage: Fix the case when VDSM host is not a gluster peer
......................................................................

storage: Fix the case when VDSM host is not a gluster peer

Currently when using glusterSD, VDSM has the need to know the
transport type of gluster volume for which it uses gluster cli
which assumes that VDSM host is part of gluster cluster (peer).
This may not be true always and imposes a constraint that VDSM
host must be a gluster peer.

This patch uses the ability of gluster cli (--remote-host) to
retrieve the gluster volume info even when VDSM host is not a
gluster peer.

Change-Id: I54ad86d12e40973c9e50821506cb21a17fc2a1d7
Signed-off-by: Deepak C Shetty <deepakcs at linux.vnet.ibm.com>
---
M vdsm/storage/glusterVolume.py
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/67/14667/1

diff --git a/vdsm/storage/glusterVolume.py b/vdsm/storage/glusterVolume.py
index 73ded57..76ea37a 100644
--- a/vdsm/storage/glusterVolume.py
+++ b/vdsm/storage/glusterVolume.py
@@ -24,8 +24,15 @@
 
         # Extract the volume's transport using gluster cli
         svdsmProxy = svdsm.getProxy()
-        volInfo = svdsmProxy.glusterVolumeInfo(volname)
-        volTrans = VOLUME_TRANS_MAP[volInfo[volname]['transportType'][0]]
+        try:
+            volInfo = svdsmProxy.glusterVolumeInfo(volname, volfileServer)
+            volTrans = VOLUME_TRANS_MAP[volInfo[volname]['transportType'][0]]
+        except:
+            # 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",
+                             (volname, volfileServer), exc_info=True)
+            volTrans = VOLUME_TRANS_MAP['TCP']
 
         # Use default port
         volPort = "0"


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54ad86d12e40973c9e50821506cb21a17fc2a1d7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Deepak C Shetty <deepakcs at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list