Bug 1575707 - Gluster volume smb share options are getting overwritten after restating the gluster volume
Summary: Gluster volume smb share options are getting overwritten after restating the ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: scripts
Version: 4.1
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
Assignee: Anoop C S
QA Contact:
URL:
Whiteboard:
Depends On: 1558921
Blocks: 1164778
TreeView+ depends on / blocked
 
Reported: 2018-05-07 17:02 UTC by Anoop C S
Modified: 2018-06-20 18:06 UTC (History)
15 users (show)

Fixed In Version: glusterfs-v4.1.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1558921
Environment:
Last Closed: 2018-06-20 18:06:01 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Description Anoop C S 2018-05-07 17:02:15 UTC
+++ This bug was initially created as a clone of Bug #1558921 +++

+++ This bug was initially created as a clone of Bug #1164778 +++

Description of problem:
Gluster volume smb share options are getting overwritten whenever we restart the volume.

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

How reproducible:
Always

Steps to Reproduce:
1. Modify any of the field from gluster volume share in /etc/samba/smb.conf
2. Like "read only" = "no" to "yes"
3. Stop and start the volume 
4. It will again become "read only" = "no" 

Actual results:
Changed configuration parameters are coming back to default value

Expected results:
They should not 

Additional info:
This is happening because we delete all gluster volume share at the time of stopping the volume with help of gluster smb hook scripts and again we freshly create these gluster volume shares when we start the volume.

--- Additional comment from Anoop C S on 2018-03-21 19:46:41 IST ---

https://review.gluster.org/#/c/19750/

--- Additional comment from Worker Ant on 2018-05-05 00:38:29 IST ---

REVIEW: https://review.gluster.org/19750 (extras/hooks: Do not blindly remove volume share from smb.conf) posted (#2) for review on master by Anoop C S

--- Additional comment from Worker Ant on 2018-05-07 10:34:31 IST ---

COMMIT: https://review.gluster.org/19750 committed in master by "Poornima G" <pgurusid@redhat.com> with a commit message- extras/hooks: Do not blindly remove volume share from smb.conf

When Gluster volumes are shared via Samba, any extra smb.conf parameter
setting done by administrator to those shares are lost during restart
of the volume. Instead of removing the whole share completely from
smb.conf(via hook scripts during volume stop) it is better to make it
temporarily unavailable to end-users till the volume is started again.
Therefore we make use of a smb.conf parameter named 'available'[1] to
achieve the above intend.

[1] https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html

Change-Id: I68a9055b50791f6ffd3b95a3c13d858a75fa6530
fixes: bz#1558921
BUG: 1558921
Signed-off-by: Anoop C S <anoopcs@redhat.com>

Comment 1 Worker Ant 2018-05-07 17:09:57 UTC
REVIEW: https://review.gluster.org/19972 (extras/hooks: Do not blindly remove volume share from smb.conf) posted (#1) for review on release-4.1 by Anoop C S

Comment 2 Worker Ant 2018-05-09 13:35:16 UTC
COMMIT: https://review.gluster.org/19972 committed in release-4.1 by "Shyamsundar Ranganathan" <srangana@redhat.com> with a commit message- extras/hooks: Do not blindly remove volume share from smb.conf

When Gluster volumes are shared via Samba, any extra smb.conf parameter
setting done by administrator to those shares are lost during restart
of the volume. Instead of removing the whole share completely from
smb.conf(via hook scripts during volume stop) it is better to make it
temporarily unavailable to end-users till the volume is started again.
Therefore we make use of a smb.conf parameter named 'available'[1] to
achieve the above intend.

[1] https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html

Change-Id: I68a9055b50791f6ffd3b95a3c13d858a75fa6530
fixes: bz#1575707
BUG: 1575707
Signed-off-by: Anoop C S <anoopcs@redhat.com>
(cherry picked from commit 33131131469e18d3ebbdc6ce741c2984dc77b290)

Comment 3 Shyamsundar 2018-06-20 18:06:01 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-v4.1.0, please open a new bug report.

glusterfs-v4.1.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/announce/2018-June/000102.html
[2] https://www.gluster.org/pipermail/gluster-users/


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