Bug 1541568

Summary: [GSS] logic in S30samba-start.sh hook script needs tweaking
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Pan Ousley <pousley>
Component: sambaAssignee: Anoop C S <anoopcs>
Status: CLOSED ERRATA QA Contact: Vivek Das <vdas>
Severity: low Docs Contact:
Priority: low    
Version: rhgs-3.3CC: amukherj, anoopcs, atoborek, atumball, bkunal, gdeschner, rhs-bugs, rhs-smb, sankarshan, sheggodu, srmukher, storage-qa-internal
Target Milestone: ---Keywords: Reopened, ZStream
Target Release: RHGS 3.4.z Batch Update 3   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.12.2-33 Doc Type: Enhancement
Doc Text:
With this release, the Samba hook script has been improved for adding volume share section in the smb.conf file. To export gluster volume as SMB share via Samba, one of the following volume options, user.cifs or user.smb is required. The existing glusterfs volume share sections in smb.conf will remain unchanged.
Story Points: ---
Clone Of:
: 1575836 (view as bug list) Environment:
Last Closed: 2019-02-04 07:41:25 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: 1575836    
Bug Blocks:    

Description Pan Ousley 2018-02-02 22:21:03 UTC
Description of problem: 

Syntax issues (shellcheck)
- /var/lib/glusterd/hooks/1/start/post/S30samba-start.sh: line 114: [: =: unary operator expected

Hiding unwanted error messages
- /var/lib/glusterd/hooks/1/start/post/S30samba-start.sh: line 71: smbd: command not found
- Samba is not installed + exit code '1' should be enough

Bad script logic
- volume info file needs to be checked for presence of all configuration possibilities 'user.smb|user.cifs' = 'enable|on'

There is an upstream patch created for these issues here: https://review.gluster.org/#/c/19204/


Version-Release number of selected component (if applicable): RHGS 3.3


Additional info: Please let me know if anything else is needed.

Comment 12 Guenther Deschner 2018-11-13 11:19:34 UTC
Sorry, closed the wrong bug.

Comment 14 Anoop C S 2018-12-05 06:02:36 UTC
Following required patches landed in upstream:

* https://review.gluster.org/c/glusterfs/+/19204
* https://review.gluster.org/c/glusterfs/+/21124

Comment 19 Vivek Das 2019-01-04 08:56:12 UTC
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.
The above is validated and is working as expected in glusterfs-3.12.2-34.

Comment 21 errata-xmlrpc 2019-02-04 07:41:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:0263