summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs
diff options
context:
space:
mode:
Diffstat (limited to 'glustolibs-gluster/glustolibs')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/nfs_libs.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/nfs_libs.py b/glustolibs-gluster/glustolibs/gluster/nfs_libs.py
index 003ebc2..ad0f1e7 100644
--- a/glustolibs-gluster/glustolibs/gluster/nfs_libs.py
+++ b/glustolibs-gluster/glustolibs/gluster/nfs_libs.py
@@ -37,13 +37,6 @@ def export_volume_through_nfs(mnode, volname, enable_ganesha=False,
bool: If volume is successfully exported through nfs returns True.
False Otherwise.
"""
- # Enable nfs on the volume
- cmd = ("gluster volume set %s nfs.disable off --mode=script" % volname)
- ret, _, _ = g.run(mnode, cmd)
- if ret != 0:
- g.log.error("Failed to enable nfs for the volume %s", volname)
- return False
-
# Enable ganesha on the volume if enable_ganesha is True
if enable_ganesha:
cmd = ("gluster volume set %s ganesha.enable on --mode=script" %
@@ -52,6 +45,13 @@ def export_volume_through_nfs(mnode, volname, enable_ganesha=False,
if ret != 0:
g.log.error("Failed to enable nfs ganesha for volume %s", volname)
return False
+ else:
+ # Enable nfs on the volume
+ cmd = ("gluster volume set %s nfs.disable off --mode=script" % volname)
+ ret, _, _ = g.run(mnode, cmd)
+ if ret != 0:
+ g.log.error("Failed to enable nfs for the volume %s", volname)
+ return False
time.sleep(time_delay)
# Verify if volume is exported