Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1358020 - rgw_setattr does not change attrs
rgw_setattr does not change attrs
Status: CLOSED ERRATA
Product: Red Hat Ceph Storage
Classification: Red Hat
Component: RGW (Show other bugs)
2.0
All All
low Severity low
: rc
: 2.2
Assigned To: Matt Benjamin (redhat)
Ramakrishnan Periyasamy
Bara Ancincova
:
Depends On: 1357932
Blocks: 1383917 1412948
  Show dependency treegraph
 
Reported: 2016-07-19 16:19 EDT by Matt Benjamin (redhat)
Modified: 2017-07-30 11:51 EDT (History)
12 users (show)

See Also:
Fixed In Version: RHEL: ceph-10.2.5-7.el7cp Ubuntu: ceph_10.2.5-3redhat1xenial
Doc Type: Bug Fix
Doc Text:
.Setting file permissions and ownership attributes no longer fails on existing files and directories Previously, the NFS Ganesha file system failed to serialize and store UNIX attributes on existing files and directories. Consequently, file permissions and ownership attributes that were set after file or directory creation were not correctly stored. The underlying source code has been modified, and setting file permissions and ownership attributes no longer fails on existing files and directories.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-14 11:44:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0514 normal SHIPPED_LIVE Red Hat Ceph Storage 2.2 bug fix and enhancement update 2017-03-21 03:24:26 EDT

  None (edit)
Description Matt Benjamin (redhat) 2016-07-19 16:19:38 EDT
Description of problem:

The rgw_setattr operation, though called by the RGW FSAL, has no effect.


How reproducible:
100%


Steps to Reproduce:
1. mount NFS RGW namespace
2. create any objects
3. chown objects to any uid or gid

Actual results:
Ownership does not change (shows as nobody/nogroup, typically)

Expected results:
Ownership matches that requested
Comment 3 Matt Benjamin (redhat) 2016-07-19 16:23:16 EDT
Fixed in cc106aaab6d5a745c17e678a15266b9cd3a6787e.
Comment 5 Matt Benjamin (redhat) 2016-07-19 17:20:44 EDT
(In reply to Matt Benjamin (redhat) from comment #3)
> Fixed in cc106aaab6d5a745c17e678a15266b9cd3a6787e.


Sorry, ignore this SHA, rather:

On ceph-rhel-2-patches, it's ae5487e912fac971db5d84af9ac136054f306f07

    Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
    (cherry picked from commit 4de1c3c260265f821ebee842d49cb35bf49d8e4e)
Comment 12 Matt Benjamin (redhat) 2016-09-20 17:45:15 EDT
I do not reproduce an EIO result in testing with current master.

HOWEVER.

1. I found a regression in nfs-ganesha setting unix gid caused by a copy-paste of a similar error--a fix for this has been submitted to nfs-ganesha upstream and should merge in 2.4.0-rc6

2. I found that discretionary set_attr operations were not being restored successfully, whereas attrs set on file creation were restored;  the root cause of this was a) failure of RGWLibFS::setattr to set a value for RGW_ATTR_UNIX_KEY1, while RGWLibFS::expects it.

Fix proposed in https://github.com/ceph/ceph/pull/11159
Comment 16 Ramakrishnan Periyasamy 2016-11-02 13:53:51 EDT
Hi Matt, 
         As per below output chown for root user is passing but still ownership is with "4294967294" user, is this expected  or it should be updated while listing the files ?

[ubuntu@magna105 bucket-from-nfs]$ ll
total 9884
-rw-r--r--. 1 4294967294 4294967294       66 Nov  2 17:12 ceph.client.magna104.keyring
-rw-r--r--. 1 4294967294 4294967294 10118605 Nov  2 17:10 ceph_output
-rw-r--r--. 1 4294967294 4294967294     1043 Nov  2 17:11 old_ceph.conf
-rw-r--r--. 1 4294967294 4294967294     1913 Nov  2 17:11 old_ganesha.conf
[ubuntu@magna105 bucket-from-nfs]$ sudo chown root:root ceph.client.magna104.keyring 
[ubuntu@magna105 bucket-from-nfs]$ ls -l
total 9884
-rw-r--r--. 1 4294967294 4294967294       66 Nov  2 17:12 ceph.client.magna104.keyring
-rw-r--r--. 1 4294967294 4294967294 10118605 Nov  2 17:10 ceph_output
-rw-r--r--. 1 4294967294 4294967294     1043 Nov  2 17:11 old_ceph.conf
-rw-r--r--. 1 4294967294 4294967294     1913 Nov  2 17:11 old_ganesha.conf
[ubuntu@magna105 bucket-from-nfs]$ 

Regards,
Ramakrishnan
Comment 17 Matt Benjamin (redhat) 2016-11-02 14:25:50 EDT
(In reply to Ramakrishnan Periyasamy from comment #16)
> Hi Matt, 
>          As per below output chown for root user is passing but still
> ownership is with "4294967294" user, is this expected  or it should be
> updated while listing the files ?
> 

Hi Ramakrishnan,

It should be updated, however, setuid can fail due to nfs permissions--which looks to be the case here, because "4294967294" is the nfs-ganesha value for nobody or nogroup (i.e., the object has been root-squashed).

To avoid this, you need to run nfs-ganesha with 

NFSV4 {
    Allow_Numeric_Owners = true;
    Only_Numeric_Owners = true;
}

If testing with those settings still yields uid or gid of "4294967294", it's still not likely to be an actual RGW bug.
Comment 18 Ramakrishnan Periyasamy 2016-11-03 02:54:05 EDT
(In reply to Matt Benjamin (redhat) from comment #17)
> (In reply to Ramakrishnan Periyasamy from comment #16)
> > Hi Matt, 
> >          As per below output chown for root user is passing but still
> > ownership is with "4294967294" user, is this expected  or it should be
> > updated while listing the files ?
> > 
> 
> Hi Ramakrishnan,
> 
> It should be updated, however, setuid can fail due to nfs permissions--which
> looks to be the case here, because "4294967294" is the nfs-ganesha value for
> nobody or nogroup (i.e., the object has been root-squashed).
> 
> To avoid this, you need to run nfs-ganesha with 
> 
> NFSV4 {
>     Allow_Numeric_Owners = true;
>     Only_Numeric_Owners = true;
> }
>
> If testing with those settings still yields uid or gid of "4294967294", it's
> still not likely to be an actual RGW bug.

Hi Matt,

NFS service is running with above values in config file. Discussed with you about this in irc, as per our discussion not moving this bug to verified state also this needs to be documented for this release.

Regards,
Ramakrishnan
Comment 29 Matt Benjamin (redhat) 2017-01-05 13:51:10 EST
fix is on jewel/rhcs 2.2 baseline
Comment 32 Ramakrishnan Periyasamy 2017-01-30 11:42:50 EST
moving this bug to verified state. comment 31 has the verification results.
Verified in following build:
ceph: 10.2.5-12.el7cp (8614488f8c3e7a9be34e58fb1aaf23416156152c)
NFS-Ganesha: nfs-ganesha-rgw-2.4.2-1.el7cp.x86_64
Comment 36 errata-xmlrpc 2017-03-14 11:44:17 EDT
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-2017-0514.html

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