Bug 1668278

Summary: [Samba] Improve logic in Samba hook scripts for adding volume share section in smb.conf
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Vivek Das <vdas>
Component: doc-Administration_GuideAssignee: Srijita Mukherjee <srmukher>
doc-Administration_Guide sub component: Default QA Contact: Vivek Das <vdas>
Status: CLOSED CURRENTRELEASE Docs Contact:
Severity: urgent    
Priority: unspecified CC: asriram, nlevinki, rhs-bugs, rmusil, rwheeler, srmukher, storage-doc
Version: rhgs-3.4Keywords: ZStream
Target Milestone: ---   
Target Release: RHGS 3.4.z Batch Update 3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-08 13:09:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1660873    

Description Vivek Das 2019-01-22 10:50:43 UTC
Document URL: 
https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.4/html/administration_guide/sect-smb

Section Number and Name: 
6.3.3. Sharing Volumes over SMB

Describe the issue: 
Previously all GlusterFS volumes were being exported by default via smb.conf in a Samba-CTDB setup. This includes creating a share section for CTDB lock volume too which is not recommended. Along with few syntactical errors these scripts failed to execute in a non-Samba setup in the absence of necessary configuration/binary files.

Result: Hereafter newly created GlusterFS volumes are not exported as SMB share via Samba unless either of 'user.cifs' or 'user.smb' volume set options are enabled on the volume.

Suggestions for improvement: 

gluster volume set user.cifs enable
or 
gluster volume set user.smb enable
Additional information: