summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster/volume_libs.py
diff options
context:
space:
mode:
authorShwetha Panduranga <spandura@redhat.com>2016-11-07 15:13:05 +0530
committerShwetha Panduranga <spandura@redhat.com>2016-11-07 23:31:02 +0530
commit695c9b55d0e31b8153e70340261751432bece920 (patch)
tree0cd27bdac43e86c434e58e322f4d6715614b2792 /glustolibs-gluster/glustolibs/gluster/volume_libs.py
parenteb6af7c29007a922f64ac52fcc7f9ca24b3198aa (diff)
set nfs.disable to off on the volume to start nfs server on that volume.
Change-Id: Ic63a69ec0d0cafcb71059b41625fe054167910d0 Signed-off-by: Shwetha Panduranga <spandura@redhat.com>
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster/volume_libs.py')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/volume_libs.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/volume_libs.py b/glustolibs-gluster/glustolibs/gluster/volume_libs.py
index 24aac82..c3a67f6 100644
--- a/glustolibs-gluster/glustolibs/gluster/volume_libs.py
+++ b/glustolibs-gluster/glustolibs/gluster/volume_libs.py
@@ -216,6 +216,13 @@ def setup_volume(mnode, all_servers_info, volume_config, force=False):
g.log.error("Unable to create volume %s" % volname)
return False
+ # Set volume option nfs.disable to 'off' to start gluster-nfs server
+ cmd = "gluster volume set %s nfs.disable off" % volname
+ ret, out, err = g.run(mnode, cmd)
+ if ret != 0:
+ g.log.error("Unable to set the volume option nfs.disable to off.")
+ return False
+
# Start Volume
time.sleep(2)
ret = volume_start(mnode, volname)