Bug 1043886 - [RFE] Add two more options in `gluster volume set` command server.anonuid and server.anongid
Summary: [RFE] Add two more options in `gluster volume set` command server.anonuid and...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: rpc
Version: pre-release
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Niels de Vos
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1043915
TreeView+ depends on / blocked
 
Reported: 2013-12-17 12:05 UTC by Vikhyat Umrao
Modified: 2015-11-24 23:53 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.6.0beta1
Doc Type: Enhancement
Doc Text:
Feature: Two more options in `gluster volume set` command server.anonuid and server.anongid Reason: For setting anonymous user uid and gid to a specific user uid and gid Result (if any):
Clone Of:
: 1043915 (view as bug list)
Environment:
Last Closed: 2014-11-11 08:25:45 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Vikhyat Umrao 2013-12-17 12:05:23 UTC
Hi,

We do not have any feature in glusterFS to set anonymous user uid and gid to a specific value like for any normal user uid and gid just like NFS has it in /etc/exports(anonuid,anongid).

NFS feature in /etc/exports

anonuid and anongid options:
These options explicitly set the uid and gid of the anonymous account.  This option is primarily useful for PC/NFS clients,  where  you might  want  all  requests  appear  to  be from one user. As an example, consider the export entry for /home/joe in the example section below, which maps all requests to uid 150 (which is supposedly that of user joe).

EXAMPLE:
/home/joe       pc001(rw,all_squash,anonuid=150,anongid=100)

We can come up with two new options storage.anonuid and storage.anongid to our  `gluster volume set` command so we can set root user uid and gid to a given value to these options.

It wiil be a RFE for `gluster volume set` command to add two new options storage.anonuid and storage.anongid which will help users to set anonymous user uid and gid to given uid and gid in storage.anonuid and storage.anongid.

Comment 1 Anand Avati 2013-12-20 09:01:20 UTC
REVIEW: http://review.gluster.org/6546 (rpc/server: add anonuid and anongid options for root-squash) posted (#1) for review on master by Niels de Vos (ndevos)

Comment 2 Anand Avati 2013-12-20 09:06:44 UTC
REVIEW: http://review.gluster.org/6546 (rpc/server: add anonuid and anongid options for root-squash) posted (#2) for review on master by Niels de Vos (ndevos)

Comment 3 Anand Avati 2013-12-20 12:07:22 UTC
REVIEW: http://review.gluster.org/6546 (rpc/server: add anonuid and anongid options for root-squash) posted (#3) for review on master by Niels de Vos (ndevos)

Comment 4 Anand Avati 2013-12-23 11:54:32 UTC
REVIEW: http://review.gluster.org/6546 (rpc/server: add anonuid and anongid options for root-squash) posted (#4) for review on master by Niels de Vos (ndevos)

Comment 5 Anand Avati 2013-12-31 03:49:51 UTC
COMMIT: http://review.gluster.org/6546 committed in master by Vijay Bellur (vbellur) 
------
commit 7e3dd526c62b3a1bb59945efdfed2c2fbbcf9cf9
Author: Niels de Vos <ndevos>
Date:   Mon Dec 23 12:53:32 2013 +0100

    rpc/server: add anonuid and anongid options for root-squash
    
    Introduce new options to modify the behaviour of server.root-squash.
    With server.anonuid and server.anongid the uid/gid can be specified and
    the root user (uid=0 and gid=0) will be mapped to the given uid/gid
    instead of nfsnobody (uid=65534 and gid=65534).
    
    Many thanks to Vikhyat Umrao for writing the majority of the test-case!
    
    Change-Id: I6379a3d2ef52b9b9707f2f6f0529657580c8d779
    BUG: 1043886
    CC: Vikhyat Umrao <vumrao>
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/6546
    Reviewed-by: Santosh Pradhan <spradhan>
    Reviewed-by: Vikhyat Umrao <vumrao>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 6 Niels de Vos 2014-09-22 12:33:49 UTC
A beta release for GlusterFS 3.6.0 has been released. Please verify if the release solves this bug report for you. In case the glusterfs-3.6.0beta1 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-September/018836.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 7 Niels de Vos 2014-11-11 08:25:45 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-3.6.1, please reopen this bug report.

glusterfs-3.6.1 has been announced [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://supercolony.gluster.org/pipermail/gluster-users/2014-November/019410.html
[2] http://supercolony.gluster.org/mailman/listinfo/gluster-users

Comment 8 Earl Ruby 2015-11-24 23:33:00 UTC
The request was to implement all_squash, anonuid and anongid. The example given was the export line:

/home/joe       pc001(rw,all_squash,anonuid=150,anongid=100)

... which will map all incoming user requests to UID 150, GID 100.

glusterfs-3.6.1 implements root_squash, anonuid and anongid.

root_squash maps UID 0 / GID 0 requests to anonuid / anongid.

all_squash maps all UIDs to anonuid and all GIDs to anongid.

Until server.all-squash is implemented this request should remain open.

Comment 9 Earl Ruby 2015-11-24 23:53:19 UTC
Added a new ticket https://bugzilla.redhat.com/show_bug.cgi?id=1285126 requesting an all_squash option.


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