summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Avuthu <vavuthu@redhat.com>2018-12-27 11:13:06 +0530
committerVijay Avuthu <vavuthu@redhat.com>2018-12-27 11:13:06 +0530
commit7b832ca01329894c57ccddea3156035cb856d353 (patch)
tree33fb46f13a577fba05d2caf4a151d549cbb8ef5d
parent9439573ea62f2fe0221f953db21ea7991609d679 (diff)
setting user.cifs to on for all cifs volumes
Change-Id: I4c0b5c9e39d1e7903a64ad9fe91c2feb6ecf7f8e
-rw-r--r--glustolibs-gluster/glustolibs/gluster/samba_libs.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/samba_libs.py b/glustolibs-gluster/glustolibs/gluster/samba_libs.py
index bffe6a12c..3051579ab 100644
--- a/glustolibs-gluster/glustolibs/gluster/samba_libs.py
+++ b/glustolibs-gluster/glustolibs/gluster/samba_libs.py
@@ -244,6 +244,14 @@ def share_volume_over_smb(mnode, volname, smb_users_info):
"""
g.log.info("Start sharing the volume over SMB")
+ # Set volume option 'user.cifs' to 'on'.
+ cmd = "gluster volume set %s user.cifs on" % volname
+ ret, _, _ = g.run(mnode, cmd)
+ if ret != 0:
+ g.log.error("Failed to set the volume option user.cifs on")
+ return False
+ g.log.info("Successfully set 'user.cifs' to 'on' on %s", volname)
+
# Set volume option 'stat-prefetch' to 'on'.
cmd = "gluster volume set %s stat-prefetch on" % volname
ret, _, _ = g.run(mnode, cmd)