Bug 1450836

Summary: [GANESHA] While Ganesha running as non-root user, "Permission denied" messages were observed while creating files on mount point
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Manisha Saini <msaini>
Component: nfs-ganeshaAssignee: Soumya Koduri <skoduri>
Status: CLOSED NOTABUG QA Contact: Manisha Saini <msaini>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: amukherj, ffilz, msaini, rcyriac, rhinduja, rhs-bugs, skoduri, storage-qa-internal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-19 11:56:30 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: 1441131    

Description Manisha Saini 2017-05-15 09:23:12 UTC
Description of problem:

This bug is to track the issue reported in bug -
https://bugzilla.redhat.com/show_bug.cgi?id=1441131  comment #8

Permission denied messages were observed on mount point while creating files on non-root ganesha setup

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

nfs-ganesha-2.4.4-4.el7rhgs.x86_64

How reproducible:


Steps to Reproduce:
1.Create ganesha cluster with non-root user.
https://bugzilla.redhat.com/show_bug.cgi?id=1441131
2.Create a volume 3*2  Distributed-Replicate volume.Enable ganesha on it.
3.Mount the volume via v3 on client and Create files on mount point.


Actual results:

While creating files on mount point "Permission denied" messages were observed on mount point.But after doing "ls" on mount point ,the file were present on mount point.



[root@dhcp37-192 ganesha_Mount]# touch f1
touch: setting times of ‘f1’: Permission denied
[root@dhcp37-192 ganesha_Mount]# touch f2
touch: setting times of ‘f2’: Permission denied
[root@dhcp37-192 ganesha_Mount]# ls
f1  f2



In brick logs where file is present,these messages were observed while creating and opening file

[2017-05-03 09:20:53.722045] I [MSGID: 115072] [server-rpc-fops.c:1642:server_setattr_cbk] 0-ganeshaVol1-server: 206: SETATTR /f1 (9aba96b8-8547-48e6-88db-ab0631ead6be) ==> (Permission denied) [Permission denied]
[2017-05-03 09:21:42.221003] I [MSGID: 115072] [server-rpc-fops.c:1642:server_setattr_cbk] 0-ganeshaVol1-server: 224: SETATTR /.f1.swpx (9f47540f-2802-424c-ad0c-fda14bc7a118) ==> (Permission denied) [Permission denied]
[2017-05-03 09:21:42.240186] E [MSGID: 115062] [server-rpc-fops.c:1037:server_unlink_cbk] 0-ganeshaVol1-server: 228: UNLINK /.f1.swpx (00000000-0000-0000-0000-000000000001/.f1.swpx) ==> (Permission denied) [Permission denied]
[2017-05-03 09:21:47.266568] I [MSGID: 115072] [server-rpc-fops.c:1642:server_setattr_cbk] 0-ganeshaVol1-server: 247: SETATTR /.f1.swn (2ee2effc-cfc8-4fa9-8e9e-a628038d8eba) ==> (Permission denied) [Permission denied]
[2017-05-03 09:21:47.286859] E [MSGID: 115062] [server-rpc-fops.c:1037:server_unlink_cbk] 0-ganeshaVol1-server: 251: UNLINK /.f1.swn (00000000-0000-0000-0000-000000000001/.f1.swn) ==> (Permission denied) [Permission denied]


On bricks,the file are being created as root user

[root@dhcp47-141 1]# ll
total 0
-rw-r--r--. 2 root root 0 May  3 14:50 f1
-rw-r--r--. 2 root root 0 May  3 15:28 f2

Expected results:
No permission denied messgaes should be observed.

Additional info:

Comment 2 Soumya Koduri 2017-05-15 13:47:42 UTC
Fix for the issue posted upstream for review - https://review.gerrithub.io/#/c/360840/

Will try to provide a private build with the fix applied (to continue testing) while this bug gets approved and fixed downstream.

Comment 7 Soumya Koduri 2017-05-19 07:25:42 UTC
The issue was that ganesha-gfapi.log* file was already existing with owner_uid/gid set to root. 

On dhcp42-129.lab.eng.blr.redhat.com, I deleted existing /var/log/ganesha-gfapi.log* files and restarted nfs-ganesha service. The volume got exported. 

[root@dhcp42-129 ~]# showmount -e localhost
Export list for localhost:
/test (everyone)
[root@dhcp42-129 ~]# 

Could you please check if the same steps would work on other nodes as well. Thanks!

Comment 12 Manisha Saini 2017-07-14 13:28:10 UTC
As the non-root user patch is been reverted from 3.3,we need to either close or defer this bug from 3.3.