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
Summary: Setting either of user.cifs or user.smb option to enable leads to enabling of...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: samba
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: RHGS 3.0.3
Assignee: Raghavendra Talur
QA Contact: surabhi
URL:
Whiteboard:
Depends On: 1105147
Blocks: 1162694
TreeView+ depends on / blocked
 
Reported: 2014-06-10 10:52 UTC by Raghavendra Talur
Modified: 2015-05-13 17:41 UTC (History)
9 users (show)

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.
Clone Of: 1105147
Environment:
Last Closed: 2015-01-15 13:37:45 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0038 0 normal SHIPPED_LIVE Red Hat Storage 3.0 enhancement and bug fix update #3 2015-01-15 18:35:28 UTC

Description Raghavendra Talur 2014-06-10 10:52:23 UTC
+++ 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 16:04:29 UTC
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 06:35:53 UTC
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 11:32:49 UTC
Patch posted at https://code.engineering.redhat.com/gerrit/#/c/36686/

Comment 5 surabhi 2014-11-25 08:17:50 UTC
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 11:48:40 UTC
Patch posted at https://code.engineering.redhat.com/gerrit/#/c/37464/

Comment 7 surabhi 2014-12-02 09:54:55 UTC
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 15:38:23 UTC
Raghavendra,

Please review the edited doc text and sign-off.

Comment 9 Raghavendra Talur 2015-01-13 09:06:30 UTC
The doc text looks good to me.

Comment 11 errata-xmlrpc 2015-01-15 13:37:45 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://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.