Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1107606 - Setting either of user.cifs or user.smb option to enable leads to enabling of smb shares. Enable only when none are disable
Setting either of user.cifs or user.smb option to enable leads to enabling of...
Status: CLOSED ERRATA
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: samba (Show other bugs)
unspecified
Unspecified Unspecified
medium Severity medium
: ---
: RHGS 3.0.3
Assigned To: Raghavendra Talur
surabhi
: ZStream
Depends On: 1105147
Blocks: 1162694
  Show dependency treegraph
 
Reported: 2014-06-10 06:52 EDT by Raghavendra Talur
Modified: 2015-05-13 13:41 EDT (History)
9 users (show)

See Also:
Fixed In Version: glusterfs-3.6.0.35-1
Doc Type: Bug Fix
Doc Text:
Previously, setting either the user.cifs or user.smb option to disable did not stop the sharing of SMB shares when the SMB share is already available. With this fix, setting either user.cifs or user.smb to disable ensures that the SMB share is immediately stopped.
Story Points: ---
Clone Of: 1105147
Environment:
Last Closed: 2015-01-15 08:37:45 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0038 normal SHIPPED_LIVE Red Hat Storage 3.0 enhancement and bug fix update #3 2015-01-15 13:35:28 EST

  None (edit)
Description Raghavendra Talur 2014-06-10 06:52:23 EDT
+++ This bug was initially created as a clone of Bug #1105147 +++

Description of problem:
We have two volume options, user.cifs and user.smb which are considered
valid keys for enabling/disabling of smb shares.

user.smb was introduced later and user.cifs is maintained for backwards
compatibility.

The approach taken is disable has more weightage than enable.
If either of the two keys have value as disable then the combined effect is
that of disable.

Start and stop volume hookscripts work as per above approach.
Set option hookscript does not. This leads to a inconsistent behaviour.


Version:


How reproducible:
Always


Steps to Reproduce:
1. gluster volume set volname user.cifs disable
2. smbclient -L localhost
check that share related to volume is not available.
3. gluster volume set volname user.smb enable
4.smbclient -L localhost


Actual results:
smbclient output shows that share related to this volume is available.

Expected results:
smbclient output should not have share related to this volume.

Additional info:
Comment 2 Jose A. Rivera 2014-06-12 12:04:29 EDT
What we SHOULD have is user.cifs being deprecated and user.smb as a synonym for user.cifs. That is, they are both actually the same option. Or, if that is technically a problem, just have either one update both options, such that user.cifs and user.smb are ALWAYS identical and thus there would be no question about the state of SMB shares for that volume.
Comment 3 Raghavendra Talur 2014-06-13 02:35:53 EDT
Yup, that is the right way of doing things.
To do that we need to change the code in glusterd.
Targeting it for next release.
Comment 4 Raghavendra Talur 2014-11-14 06:32:49 EST
Patch posted at https://code.engineering.redhat.com/gerrit/#/c/36686/
Comment 5 surabhi 2014-11-25 03:17:50 EST
After disabling user.cifs for the volume,the samba share still exists in smb.conf.
Even if we disable user.smb still teh samba share exists in smb.conf.

Volume Name: verify-vol
Type: Distributed-Replicate
Volume ID: 201ca6bc-5693-40aa-bd2f-6c9767225fa5
Status: Started
Snap Volume: no
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 10.16.159.81:/rhs/brick1/verify-vol/b1
Brick2: 10.16.159.63:/rhs/brick1/verify-vol/b2
Brick3: 10.16.159.81:/rhs/brick1/verify-vol/b3
Brick4: 10.16.159.63:/rhs/brick1/verify-vol/b4
Options Reconfigured:
user.smb: disable
user.cifs: disable

testparm:
[gluster-verify-vol]
	comment = For samba share of volume verify-vol
	path = /
	read only = No
	guest ok = Yes
	vfs objects = glusterfs
	glusterfs:loglevel = 7
	glusterfs:logfile = /var/log/samba/glusterfs-verify-vol.%M.log
	glusterfs:volume = verify-vol

Version:
glusterfs-server-3.6.0.33-1.el6rhs.x86_64

Moving the BZ back to Assigned.And this also hits regression where even with disabling one of the options the share is not getting removed from smb.conf.
Comment 6 Raghavendra Talur 2014-11-27 06:48:40 EST
Patch posted at https://code.engineering.redhat.com/gerrit/#/c/37464/
Comment 7 surabhi 2014-12-02 04:54:55 EST
Verified the BZ with build glusterfs-3.6.0.35-1.el6rhs.x86_64.

Now setting one of the option user.cifs/user.smb to disable removes the share from smb.conf.
Verified with following combinations:
user.smb ,user.cifs : Both enabled : share is present in smb.conf
user.smb , user.cifs : Both disabled : share is removed from smb.conf
User.smb :enabled , user.cifs : disabled : share is removed from smb.conf
user.smb :disbaled , user.cifs : enabled : share is removed from smb.conf.

Also if one of these options is disabled, even with stop and start or start force : share will not be present in smb.conf.

Moving the BZ to verified.
Comment 8 Divya 2014-12-30 10:38:23 EST
Raghavendra,

Please review the edited doc text and sign-off.
Comment 9 Raghavendra Talur 2015-01-13 04:06:30 EST
The doc text looks good to me.
Comment 11 errata-xmlrpc 2015-01-15 08:37:45 EST
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://rhn.redhat.com/errata/RHBA-2015-0038.html

Note You need to log in before you can comment on or make changes to this bug.