Bug 1724243

Summary: [Samba] Accommodate recent get_real_filename implementation changes in GlusterFS
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Anoop C S <anoopcs>
Component: sambaAssignee: Anoop C S <anoopcs>
Status: CLOSED ERRATA QA Contact: Vivek Das <vdas>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.5CC: amukherj, madam, rhs-smb
Target Milestone: ---   
Target Release: RHGS 3.5.0   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: samba-4.9.8-107.el7rhgs, samba-4.9.8-107.el6rhs Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-30 12:18:28 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:    
Bug Blocks: 1696809    

Description Anoop C S 2019-06-26 14:33:01 UTC
Description of problem:
Following situation is based on a configuration where FUSE mount of a GlusterFS volume is shared via Samba with or without glusterfs_fuse VFS module. With the change[1] to convert error code ENOENT to ESTALE in GlusterFS FUSE bridge layer(for certain operations) Samba's get_real_filename logic which is based on virtual xattrs(in GlusterFS) fails to perform resulting in denial of basic file operations to SMB clients.

There are two aspects to be considered - 
(a) Unable to create or rename files/directories anywhere inside GlusterFS volume shares:
This is seen when vfs_glusterfs_fuse module is loaded in Samba while re-exporting FUSE mount of a GlusterFS volume share

(b) Reduced performance during creation or renaming of files/directories:
Fixing (a) via [2] in GlusterFS leaves us with a performance degradation which would then need a fix from Samba side to correct itself in VFS modules.

The current bug report is to track changes for (b)

Version-Release number of selected component (if applicable):
samba-4.9.8-105
glusterfs-6.0-6 and glusterfs-3.12.2-47.2

How reproducible:
Always

Steps to Reproduce(error during creation/renaming of files and directories):
1. Create a basic distribute-replicate volume(use glusterfs-6.0-6) 
2. Have a Samba-CTDB setup with a share re-exporting FUSE mount of volume created via step 1 with vfs_glusterfs_fuse loaded with
"vfs objects = glusterfs_fuse" in smb.conf
3. Try creating a file/directory anywhere inside share

Steps to Reproduce(performance issue):
1. Create a basic distribute replicate volume(use glusterfs-3.12.2-47.2)
2. Have a Samba-CTDB setup with a share using vfs_glusterfs module as
"vfs objects = glusterfs" in smb.conf
3. Measure the numbers for creating large number of files
4. Update glusterfs to a 6.0-x version containing fix for [2]
5. record new numbers by repeating step 3
6. Compare numbers from step 3 and step 5 

Actual results:
SMB clients are presented with NT_STATUS_ACCESS_DENIED while trying to create or rename file/directory. And with updated glusterfs performance got reduced.

Expected results:
SMB clients should be able to create or rename files/directories without any errors and performance should not be impacted.

[1] https://code.engineering.redhat.com/gerrit/gitweb?p=rhs-glusterfs.git;a=commit;h=59629f1da9dca670d5dcc6425f7f89b3e96b46bf
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1724089

Comment 7 errata-xmlrpc 2019-10-30 12:18:28 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/RHSA-2019:3253