Bug 1001102

Summary: Stale smb share still shows up after deleting the gluster volume
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Lalatendu Mohanty <lmohanty>
Component: sambaAssignee: Raghavendra Talur <rtalur>
Status: CLOSED EOL QA Contact: Lalatendu Mohanty <lmohanty>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 2.1CC: dpal, jarrpa, pgurusid, rjoseph, rwheeler, spalai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: core
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-03 17:11:07 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:

Description Lalatendu Mohanty 2013-08-26 13:51:13 UTC
Description of problem:

Stale smb share still shows up after deleting the gluster volume on rhs node. 

But restarting the smb i.e. "service smb restart" fixes the issue.


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

root@bvt-rhs1 ~]# rpm -qa | grep samba
samba-doc-3.6.9-159.1.el6rhs.x86_64
samba-winbind-3.6.9-159.1.el6rhs.x86_64
samba-glusterfs-3.6.9-159.1.el6rhs.x86_64
samba-swat-3.6.9-159.1.el6rhs.x86_64
samba-winbind-krb5-locator-3.6.9-159.1.el6rhs.x86_64
samba-domainjoin-gui-3.6.9-159.1.el6rhs.x86_64
samba-common-3.6.9-159.1.el6rhs.x86_64
samba-3.6.9-159.1.el6rhs.x86_64
samba-client-3.6.9-159.1.el6rhs.x86_64
samba-winbind-devel-3.6.9-159.1.el6rhs.x86_64
samba4-libs-4.0.0-55.el6.rc4.x86_64
samba-winbind-clients-3.6.9-159.1.el6rhs.x86_64


[root@bvt-rhs1 ~]# rpm -qa | grep gluster
glusterfs-libs-3.4.0.22rhs-2.el6rhs.x86_64
glusterfs-server-3.4.0.22rhs-2.el6rhs.x86_64
samba-glusterfs-3.6.9-159.1.el6rhs.x86_64
gluster-swift-container-1.8.0-6.11.el6rhs.noarch
glusterfs-3.4.0.22rhs-2.el6rhs.x86_64
glusterfs-geo-replication-3.4.0.22rhs-2.el6rhs.x86_64
glusterfs-rdma-3.4.0.22rhs-2.el6rhs.x86_64
gluster-swift-proxy-1.8.0-6.11.el6rhs.noarch
gluster-swift-account-1.8.0-6.11.el6rhs.noarch
gluster-swift-plugin-1.8.0-6.el6rhs.noarch
vdsm-gluster-4.10.2-23.0.1.el6rhs.noarch
glusterfs-fuse-3.4.0.22rhs-2.el6rhs.x86_64
glusterfs-api-3.4.0.22rhs-2.el6rhs.x86_64
gluster-swift-1.8.0-6.11.el6rhs.noarch
gluster-swift-object-1.8.0-6.11.el6rhs.noarch



How reproducible:
always

Steps to Reproduce:
1.Create a gluster volume and start it
2. on the windows client(win7)  verify the samba share is visible and accessible i.e. \\<server ip> 
3.stop the gluster volume and delete it
  gluster v stop testvol
  gluster v delete testvol

4. Check if the volume is still shows up as samba share in windows client i.e. \\<server ip>

Actual results:

The stale entry of samba share will be visible, though it will be not be accessible 

Expected results:

After deleting the samba share of rhs volume, should not be visible.


Additional info:

After deleting the volume, I verified that smb.conf didn't have any entry for the corresponding volume.

Comment 2 Christopher R. Hertel 2013-08-28 03:16:49 UTC
Try the following command:

  smbcontrol all reload-config

When run from the root account, that command should cause all Samba daemons (including winbindd) to immediately reload the smb.conf configuration files.

Note that the Samba daemons will eventually reload the configuration file on their own, but it may be a minutes before the automatic reload occurs.

Comment 3 Susant Kumar Palai 2013-08-28 07:17:27 UTC
Chris, 
 
   "smbcontrol all reload-config" works fine. May be hook script change will do the job.
  
   Is there any smb.conf parameter which does this job of reading smb.conf file ?

Comment 4 Susant Kumar Palai 2013-08-28 07:40:38 UTC
Currently in the hook script we are sending a SIGHUP to smbd daemon. 
But for windows client to reload the smb.conf we have to send SIGHUP to winbindd ,which I think will fix this issue.

Comment 5 Susant Kumar Palai 2013-08-29 09:09:43 UTC
Chris , 
    I tested the for SAMBA+XFS just to confirm that whether glusterfs plays any role in it. And I am finding the same issue of stale shares.

And "smbconbtrol all reload-config" doesn't work always.

I think the reloading of smb-conf is confined to the smbd process only and the client does not go for refresh.

I think we can document the above findings if needed.

Comment 6 Poornima G 2013-09-13 06:56:41 UTC
Also we observe that, when the gluster volume is stopped, the "smbclient -L" does not show any entry for the volume stopped, but the volume still continues to appear in the windows client.

Comment 7 Susant Kumar Palai 2013-09-20 05:44:11 UTC
I filed a bug in SAMBA Bugzilla for this. 

Here is the link : https://bugzilla.samba.org/show_bug.cgi?id=10156

Their resolution is ---> restart smbd.

Comment 8 Jose A. Rivera 2013-10-18 19:39:09 UTC
See if this will help:

https://lists.samba.org/archive/samba/2010-August/157687.html

The command in question is "smbcontrol close-share", and should be done BEFORE the volume is stopped. Note the concerns that the email author brings up, but I don't think they impact us.

Comment 9 Vivek Agarwal 2015-12-03 17:11:07 UTC
Thank you for submitting this issue for consideration in Red Hat Gluster Storage. The release for which you requested us to review, is now End of Life. Please See https://access.redhat.com/support/policy/updates/rhs/

If you can reproduce this bug against a currently maintained version of Red Hat Gluster Storage, please feel free to file a new report against the current release.